[stdlib-sig] Proposal: new "interpreter" module
brett at python.org
Sun Apr 6 17:56:43 CEST 2008
On Sun, Apr 6, 2008 at 2:45 PM, Benjamin Peterson
<musiccomposition at gmail.com> wrote:
> 1. Data and functions that are available in all Python implementations and
> with the general running of a Python VM.
> - argv
> - byteorder
> - builtin_module_names, path, and modules
I still think builtin_module_names should be moved. There is no
guarantee other VMs have a concept of a built-in module.
> - copyright, hexversion, version, and version_info
> - displayhook, __displayhook__
> - excepthook, __excepthook__, exc_info, and exc_clear
> - exec_prefix and prefix
> - executable
> - exit
> - flags, py3kwarning, dont_write_bytecode, and warn_options
> - getfilesystemencoding
> - get/setprofile
> - get/settrace
> - getwindowsversion
It seems silly to have Windows-specific stuff like this in the sys
module, but I don't know where else they should go.
> - maxint and maxunicode
> - platform
> - ps1 and ps2
> - stdin, stderr, stdout, __stdin__, __stderr__, __stdout__
> - tracebacklimit
> 2. Data and functions that affect the CPython interpreter.
> - get/setrecursionlimit
> - get/setcheckinterval
> - _getframe and _current_frame
> - getrefcount
> - get/setdlopenflags
> - settscdumps
> - api_version
> - winver
> - dllhandle
> - float_info
> - _compact_freelists
> - _clear_type_cache
> - subversion
There is some stuff missing from these lists, e.g., meta_path,
path_importer_cache, path_hooks, call_tracing, etc. You should do a
dir() in sys and fill in the missing attributes into the list.
It's looking good, though!
More information about the stdlib-sig