[pypy-svn] r16342 - pypy/dist/pypy/module/posix

tismer at codespeak.net tismer at codespeak.net
Tue Aug 23 21:59:53 CEST 2005


Author: tismer
Date: Tue Aug 23 21:59:52 2005
New Revision: 16342

Modified:
   pypy/dist/pypy/module/posix/__init__.py
   pypy/dist/pypy/module/posix/interp_posix.py
Log:
had to add os.system to our posix file as well

Modified: pypy/dist/pypy/module/posix/__init__.py
==============================================================================
--- pypy/dist/pypy/module/posix/__init__.py	(original)
+++ pypy/dist/pypy/module/posix/__init__.py	Tue Aug 23 21:59:52 2005
@@ -24,6 +24,7 @@
     'fstat'     : 'interp_posix.fstat',
     'stat'      : 'interp_posix.stat',
     'dup'       : 'interp_posix.dup',
+    'system'    : 'interp_posix.system',
     }
     if hasattr(os, 'ftruncate'):
         interpleveldefs['ftruncate'] = 'interp_posix.ftruncate'

Modified: pypy/dist/pypy/module/posix/interp_posix.py
==============================================================================
--- pypy/dist/pypy/module/posix/interp_posix.py	(original)
+++ pypy/dist/pypy/module/posix/interp_posix.py	Tue Aug 23 21:59:52 2005
@@ -116,3 +116,12 @@
     else:
         return space.wrap(newfd)
 dup.unwrap_spec = [ObjSpace, int]
+
+def system(space, cmd):
+    try:
+        rc = os.system(cmd)
+    except OSError, e: 
+        raise wrap_oserror(space, e) 
+    else: 
+        return space.wrap(rc)
+system.unwrap_spec = [ObjSpace, str]



More information about the Pypy-commit mailing list