Created
June 8, 2013 18:34
-
-
Save Eugeny/5736155 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
eugeny@eugeny-thinkpad ~/tmp/b> find .. | |
.. | |
../a | |
../a/__init__.py | |
../a/__init__.pyc | |
../b | |
../b/__init__.pyc | |
../b/script.py | |
../p.pyc | |
eugeny@eugeny-thinkpad ~/tmp/b> find .. | grep -v pyc | |
.. | |
../a | |
../a/__init__.py | |
../b | |
../b/script.py | |
eugeny@eugeny-thinkpad ~/tmp/b> cat ../a/__init__.py | |
def foo(): | |
pass | |
print 'a imported' | |
eugeny@eugeny-thinkpad ~/tmp/b> cat script.py | |
import imp | |
a = imp.load_source('a', '../a/__init__.py') | |
eugeny@eugeny-thinkpad ~/tmp/b> python script.py | |
a imported |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment