I'm new to python. And something is confusing me today. Under the path c:\python\
, there are several folds. I edit a python script under this path, and run the code:
for dir_name in os.listdir("./"):
print dir_name
print os.path.isdir(dir_name)
It prints:
Daily
True
renafile.py
False
script
True
But when I put the script in fold Daily
which is under the path C:\python\
,and run code:
for dir_name in os.listdir("../"):
print dir_name
print os.path.isdir(dir_name)
It prints:
Daily
False
renafile.py
False
script
False
Did they have the difference?