No module named ‘utils.data_prep.features_eng
i am facing an error where the system is trying to import a class from a module it gives me an error:
What is the fastest solution to remove lines from a text file?
In my project, I need to develop a program in Python to insert a UUID in a device. There will be 1.000 devices produced per day, the UUIDs need to be inserted into each device, and only once. I have a large input file (100.000 lines) containing all the available UUIDs, as follows:
Python : what is the fastest solution to remove lines from a text file
In my project, I need to develop a program in Python to insert a UUID in a device. There will be 1.000 devices produced per day, the UUIDs need to be inserted into each device, and only once. I have a large input file (100.000 lines) containing all the available UUIDs, as follows :
Getting directory of class through instance in python
I’m building a library where one of the modules need to write a file at an “unknown” location. to put it more concretely, I have some layout like this:
What is the most optimal and safe way to read a file in python?
I have implemented two methods to read a file in python. The one uses the os module while the other uses try-except. Which of the two you believe is the best and why?
how do you get the file extension with just the file name?
Lets say you have some path PythonProjectsome_image
but you don’t know the file extensions, since it’s a photo that could be any type (.png
, .jpg
, etc.)
Error in opening the text file in python from the other directory
The code is
Why is the open() function deleting all the data in my file?
I was doing a project in which I had to make a multiclipboard.
How can I fix “FileNotFoundError” so that I only have to type in the filename and not some absurdly long filepath everytime?
simple python in vscode and filenotfound error in terminal
I get this error everytime I try to reference a file in this way, or with the long file path.
I am stuck on this two assignments of python working with files
A. Create a Python program that initially generates three files named “Vito Corleone.txt”, “Michael Corleone.txt”, and “Apollonia Vitelli-Corleone.txt” in a user-specified directory. Following file creation, the program enables the user to search for files in this directory based on criteria specified by the user, using either string matches or regular expressions.
B. Develop a Python program that monitors a specified directory for new or updated files. Upon detecting changes, it prompts the user to enter a search pattern and choose between string methods or regex for searching. The program then checks the modified or new files against the search criteria.
Hint: The program lists full paths of files matching the search criteria.