Dec-13-2023, 12:49 PM
(Dec-13-2023, 09:46 AM)Pedroski55 Wrote: Ok, so where is the file exactly? a little more info would help resolve your problem!
Try this, then see if you can see your path and file.
import glob # set your path here path = '/home/pedro/summer2021/OMR/' files = glob.glob(path + '/**', recursive=True) for f in files: # shows all paths and files in path print(f)
see i used Path.cwd() function to get my path, then i used OPEN function to open the file. The file is in the workspace or project folder. File LOcation image <--- is the image of the file location.
Below is the code
from pathlib import Path
path1 = Path.cwd()
some_file = open(path1 / "Sample.txt")
also i tried opening a simple file using python console not via ide and i get the same result. may be there are some permissions missing or something?