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

rhymes at codespeak.net rhymes at codespeak.net
Mon Aug 21 00:27:48 CEST 2006


Author: rhymes
Date: Mon Aug 21 00:27:46 2006
New Revision: 31427

Modified:
   pypy/dist/pypy/module/posix/__init__.py
Log:
more refactoring of the initialization

Modified: pypy/dist/pypy/module/posix/__init__.py
==============================================================================
--- pypy/dist/pypy/module/posix/__init__.py	(original)
+++ pypy/dist/pypy/module/posix/__init__.py	Mon Aug 21 00:27:46 2006
@@ -10,52 +10,25 @@
 disguised Unix interface).  Refer to the library manual and
 corresponding Unix manual entries for more information on calls."""
 
-    applevel_name = os.name
-
     appleveldefs = {
-    'error'      : 'app_posix.error',
-    'stat_result': 'app_posix.stat_result',
-    'fdopen'     : 'app_posix.fdopen',
+        'error': 'app_posix.error',
+        'stat_result': 'app_posix.stat_result',
+        'fdopen': 'app_posix.fdopen',
     }
     
     interpleveldefs = {
-    'open'      : 'interp_posix.open',
-    'lseek'     : 'interp_posix.lseek',
-    'write'     : 'interp_posix.write',
-    'isatty'    : 'interp_posix.isatty',
-    'read'      : 'interp_posix.read',
-    'close'     : 'interp_posix.close',
-    'fstat'     : 'interp_posix.fstat',
-    'stat'      : 'interp_posix.stat',
-    'lstat'     : 'interp_posix.lstat',
-    'dup'       : 'interp_posix.dup',
-    'dup2'      : 'interp_posix.dup2',
-    'system'    : 'interp_posix.system',
-    'unlink'    : 'interp_posix.unlink',
-    'remove'    : 'interp_posix.remove',
-    'getcwd'    : 'interp_posix.getcwd',
-    'getcwdu'    : 'interp_posix.getcwdu',
-    'chdir'     : 'interp_posix.chdir',
-    'mkdir'     : 'interp_posix.mkdir',
-    'rmdir'     : 'interp_posix.rmdir',
-    'environ'   : 'interp_posix.get(space).w_environ',
-    'listdir'   : 'interp_posix.listdir',
-    'strerror'  : 'interp_posix.strerror',
-    'pipe'      : 'interp_posix.pipe',
-    'chmod'     : 'interp_posix.chmod',
-    'rename'    : 'interp_posix.rename',
-    '_exit'     : 'interp_posix._exit',
-    'abort'     : 'interp_posix.abort',
-    'access'    : 'interp_posix.access',
-    'major'     : 'interp_posix.major',
-    'minor'     : 'interp_posix.minor',
+        'environ': 'interp_posix.get(space).w_environ'
     }
     
     for func_name in ['ftruncate', 'putenv', 'unsetenv', 'getpid', 'link',
         'symlink', 'readlink', 'fork', 'waitpid', 'chown', 'chroot',
         'confstr', 'ctermid', 'fchdir', 'fpathconf', 'getegid', 'geteuid',
         'getgid', 'getuid', 'getpgid', 'getpid', 'getppid', 'getpgrp',
-        'getsid', 'getlogin', 'getgroups', 'getloadavg', 'lchown', 'pathconf']:
+        'getsid', 'getlogin', 'getgroups', 'getloadavg', 'lchown', 'pathconf',
+        'minor', 'major', 'access', 'abort', '_exit', 'rename', 'chmod',
+        'pipe', 'strerror', 'listdir', 'rmdir', 'mkdir', 'chdir', 'getcwdu',
+        'getcwd', 'remove', 'unlink', 'system', 'dup2', 'dup', 'lstat',
+        'stat', 'fstat', 'close', 'read', 'write', 'isatty', 'lseek', 'open']:
         if hasattr(os, func_name):
             interpleveldefs[func_name] = 'interp_posix.%s' % func_name
     



More information about the Pypy-commit mailing list