[pypy-svn] r14353 - pypy/dist/pypy/translator/goal
arigo at codespeak.net
arigo at codespeak.net
Wed Jul 6 20:01:39 CEST 2005
Author: arigo
Date: Wed Jul 6 20:01:37 2005
New Revision: 14353
Modified:
pypy/dist/pypy/translator/goal/targetpypymain.py
Log:
Made targetpypymain.py importable (as opposed to only execfile-able).
Modified: pypy/dist/pypy/translator/goal/targetpypymain.py
==============================================================================
--- pypy/dist/pypy/translator/goal/targetpypymain.py (original)
+++ pypy/dist/pypy/translator/goal/targetpypymain.py Wed Jul 6 20:01:37 2005
@@ -11,7 +11,10 @@
# There is no easy way to build all caches manually,
# but the annotator can do it for us for free.
-this_dir = os.path.dirname(sys.argv[0])
+try:
+ this_dir = os.path.dirname(__file__)
+except NameError:
+ this_dir = os.path.dirname(sys.argv[0])
# __________ Entry point __________
More information about the Pypy-commit
mailing list