homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author javahaxxor
Recipients hynek, javahaxxor, ronaldoussoren
Date 2012年06月02日.18:13:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338660809.5.0.742630608034.issue14985@psf.upfronthosting.co.za>
In-reply-to
Content
You're right, my code was shite. Strange though it seemed to work on some files. The following updated version does everything as intended with the help of os.path.join:
def traverse (targetDir):
 currentDir = targetDir
 dirs = os.listdir(targetDir)
 for entry in dirs:
 if os.path.isdir(os.path.join(currentDir,entry)):
 print("Traversing " + os.path.join(targetDir,entry))
 traverse(os.path.join(targetDir,entry))
 else:
 if os.path.isfile(os.path.join(targetDir,entry)):
 print("Processing" + " " + os.path.join(currentDir,entry))
 else:
 print("Not file: " + entry)
 print("\n")
History
Date User Action Args
2012年06月02日 18:13:29javahaxxorsetrecipients: + javahaxxor, ronaldoussoren, hynek
2012年06月02日 18:13:29javahaxxorsetmessageid: <1338660809.5.0.742630608034.issue14985@psf.upfronthosting.co.za>
2012年06月02日 18:13:28javahaxxorlinkissue14985 messages
2012年06月02日 18:13:28javahaxxorcreate

AltStyle によって変換されたページ (->オリジナル) /