Message162133
| Author |
javahaxxor |
| Recipients |
javahaxxor, ronaldoussoren |
| Date |
2012年06月02日.13:06:52 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1338642413.05.0.366116403314.issue14985@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
os.path.isfile doesn't reckognize a .picasa.ini file as a file
and os.path.isdir doesn't reckognize a directory as a directory
code:
def traverse (targetDir):
currentDir = targetDir
dirs = os.listdir(targetDir)
# dirs = [x for x in os.listdir('.') if x.endswith('.JPG')]
for entry in dirs:
if os.path.isdir(entry):
print("Traversing " + entry)
traverse(entry)
else:
print("Not dir: " + entry)
if os.path.isfile(entry):
print("Processing " + " " + currentDir + " " + entry)
else:
print("Not file: " + entry)
print("\n")
return True
The test directory contains jpg files and a folder with some other jpgs and a subfolder containing jpgs |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年06月02日 13:06:53 | javahaxxor | set | recipients:
+ javahaxxor, ronaldoussoren |
| 2012年06月02日 13:06:53 | javahaxxor | set | messageid: <1338642413.05.0.366116403314.issue14985@psf.upfronthosting.co.za> |
| 2012年06月02日 13:06:52 | javahaxxor | link | issue14985 messages |
| 2012年06月02日 13:06:52 | javahaxxor | create |
|