Created
August 19, 2014 18:19
-
-
Save moylop260/0b814b881316e51c521a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
path = '.' | |
for dirname, dirnames, filenames in os.walk(path): | |
# print path to all filenames with extension py. | |
for filename in filenames: | |
fname_path = os.path.join(dirname, filename) | |
fext = os.path.splitext(fname_path)[1] | |
if fext == '.py': | |
print fname_path | |
else: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment