Created
August 1, 2012 09:58
-
-
Save erikkaplun/3225561 to your computer and use it in GitHub Desktop.
import with SyntaxError
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 "importing problematic_module through other_module:" | |
try: | |
import other_module | |
except Exception as e: | |
print "...got", e | |
print "importing problematic_module directly:" | |
try: | |
import problematic_module | |
except Exception as e: | |
print "...got", e |
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 problematic_module |
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
~/work/tmp/importtest$ python main.py | |
importing problematic_module through other_module: | |
...got invalid syntax (problematic_module.py, line 1) | |
importing problematic_module directly: | |
...got invalid syntax (problematic_module.py, line 1) |
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
asdasadsdas((; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment