Created
August 9, 2011 03:48
-
-
Save EntityReborn/1133365 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
print "__init__" |
This file contains hidden or 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
> test | |
> test2 | |
Ohai | |
> __init__ |
This file contains hidden or 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 = "." # the original gave me a empty string for some odd reason | |
allmodules = os.listdir(path) | |
for filename in allmodules: | |
if filename.endswith(".py"): | |
filename = filename[:-3] | |
print ">", filename | |
if not filename.lower() in ["__init__", "test"]: # This file was named test.py | |
__import__(filename) |
This file contains hidden or 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
print "ohai" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment