Hi: I want to read files from the directory beneath that where the python program resides.
This is in windows XP
The code reads for the current directory:
files = [f for f in os.listdir('.') if os.path.isfile(f)]
but I want to read the directory 'import' off the current.
I have tried /import; /import/;./import; and ./import/!
I either get a warning that directory does not exist or the program executes with nothing returned. It does work when I copy the files into the current directory so the program is OK!
The directories and files are stored on a server, the program run from a local PC
Does anybody know how to set a different directory when reading in python?