I am new to python. And something bothers me today. There are several folds to the c:\python\ path. I am editing a python script along this path and running the code:
for dir_name in os.listdir("./"): print dir_name print os.path.isdir(dir_name)
He prints:
Daily True renafile.py False script True
But when I put the script in fold Daily , which is under the c:\python\ path, and ran the code:
for dir_name in os.listdir("../"): print dir_name print os.path.isdir(dir_name)
He prints:
Daily False renafile.py False script False
Did they have a difference?
L. Bes
source share