[pypy-svn] r14266 - pypy/dist/pypy/interpreter

arigo at codespeak.net arigo at codespeak.net
Tue Jul 5 12:31:23 CEST 2005

Author: arigo
Date: Tue Jul  5 12:31:22 2005
New Revision: 14266

For now, move these import statements to a place where they will only execute
when running with the --pyparse option.  This avoids confusion created by
the "Loading grammar" message that shows up even if you forget --pyparse.

Modified: pypy/dist/pypy/interpreter/pycompiler.py
--- pypy/dist/pypy/interpreter/pycompiler.py	(original)
+++ pypy/dist/pypy/interpreter/pycompiler.py	Tue Jul  5 12:31:22 2005
@@ -169,13 +169,6 @@
-from pypy.interpreter import stablecompiler
-from pypy.interpreter.stablecompiler.pycodegen import ModuleCodeGenerator
-from pypy.interpreter.stablecompiler.pycodegen import InteractiveCodeGenerator
-from pypy.interpreter.stablecompiler.pycodegen import ExpressionCodeGenerator
-from pypy.interpreter.stablecompiler.transformer import Transformer
-from pyparser.pythonutil import ast_from_input
 class PythonCompiler(CPythonCompiler):
     """Uses the stdlib's python implementation of compiler
@@ -185,6 +178,13 @@
          the whole source after having only added a new '\n')
     def compile(self, source, filename, mode, flags):
+        from pypy.interpreter import stablecompiler
+        from pypy.interpreter.stablecompiler.pycodegen import ModuleCodeGenerator
+        from pypy.interpreter.stablecompiler.pycodegen import InteractiveCodeGenerator
+        from pypy.interpreter.stablecompiler.pycodegen import ExpressionCodeGenerator
+        from pypy.interpreter.stablecompiler.transformer import Transformer
+        from pyparser.pythonutil import ast_from_input
         flags |= __future__.generators.compiler_flag   # always on (2.2 compat)
         space = self.space

More information about the Pypy-commit mailing list