[pypy-svn] r16669 - in pypy/release/0.7.x/pypy: interpreter module/sys

ale at codespeak.net ale at codespeak.net
Fri Aug 26 19:13:38 CEST 2005


Author: ale
Date: Fri Aug 26 19:13:35 2005
New Revision: 16669

Modified:
   pypy/release/0.7.x/pypy/interpreter/interactive.py
   pypy/release/0.7.x/pypy/module/sys/__init__.py
Log:
issue135 testing

Changed the sys.version to 0.7.0beta.

Added the information to the interactiive banner.

The solution is bit brittle relying on a specific format of the version string.

A pypy_version attribute of sys might be a better idea

Modified: pypy/release/0.7.x/pypy/interpreter/interactive.py
==============================================================================
--- pypy/release/0.7.x/pypy/interpreter/interactive.py	(original)
+++ pypy/release/0.7.x/pypy/interpreter/interactive.py	Fri Aug 26 19:13:35 2005
@@ -126,9 +126,11 @@
         #banner = "Python %s in pypy\n%s / %s" % (
         #    sys.version, self.__class__.__name__,
         #    self.space.__class__.__name__)
+        w_sys = self.space.sys
+        version = self.space.str_w(self.space.getattr(w_sys, self.space.wrap('version')))
         elapsed = time.time() - self.space._starttime
-        banner = "PyPy in %s on top of Python %s (startupttime: %.2f secs)" % (
-            self.space.__repr__(), sys.version.split()[0], elapsed)
+        banner = "PyPy %s in %s on top of Python %s (startupttime: %.2f secs)" % (
+            version.split()[2],self.space.__repr__(), sys.version.split()[0], elapsed)
         code.InteractiveConsole.interact(self, banner)
 
     def raw_input(self, prompt=""):

Modified: pypy/release/0.7.x/pypy/module/sys/__init__.py
==============================================================================
--- pypy/release/0.7.x/pypy/module/sys/__init__.py	(original)
+++ pypy/release/0.7.x/pypy/module/sys/__init__.py	Fri Aug 26 19:13:35 2005
@@ -50,7 +50,7 @@
         'copyright'             : 'space.wrap("MIT-License")', 
         'api_version'           : 'space.wrap(1012)', 
         'version_info'          : 'space.wrap((2,4,1, "alpha", 42))', 
-        'version'               : 'space.wrap("2.4.1 (pypy1 build)")', 
+        'version'               : 'space.wrap("2.4.1 (pypy 0.7.0beta build)")', 
         'hexversion'            : 'space.wrap(0x020401a0)', 
         'ps1'                   : 'space.wrap(">>>> ")', 
         'ps2'                   : 'space.wrap(".... ")', 



More information about the Pypy-commit mailing list