Here&#39;s an updated version:<br><br>&nbsp;&nbsp; - display_hook, stdout, stdin, and stderr<br>&nbsp;&nbsp; - flags and warn_options<br>&nbsp;&nbsp; - settrace, and setprofile<br>&nbsp;&nbsp; - traceback, excepthook<br>&nbsp;&nbsp; - etc...<br>&nbsp;&nbsp; <br><br>2. Data and functions that affect the CPython interpreter.<br>
&nbsp;&nbsp; <br>&nbsp;&nbsp; - get/setrecursionlimit<br>&nbsp;&nbsp; - get/setcheckinterval<br>&nbsp;&nbsp; - _getframe and _current_frame<br>&nbsp;&nbsp; - getrefcount<br>&nbsp;&nbsp; - get/setdlopenflags<br>&nbsp;&nbsp; - settscdumps<br>&nbsp;&nbsp; - api_version<br>&nbsp;&nbsp; - winver<br>&nbsp;&nbsp; - dllhandle<br>
&nbsp;&nbsp; - float_info<br><br>The second collections of items has been steadily increasing over the years<br>causing clutter in sys.&nbsp; Guido has even said he doesn&#39;t recognize some of things<br>in it [#bug-1522]_!<br><br>Other implementations have clearly struggled with what to do about the contents<br>
of sys they can&#39;t implement but must to retain compatibility.&nbsp; For example,<br>Jython&#39;s sys module has dud set/getrecursionlimit functions.&nbsp; Moving these items<br>items off to another module would send a clear message about what functions need<br>
and need not be implemented.<br><br>It has also been proposed that the contents of types module be distributed<br>across the standard library [#types-removal]_; the interpreter module would<br>provide an excellent resting place for internal types like frames and code<br>
objects.<br><br>Specification<br>=============<br><br>A new builtin module named &quot;interpreter&quot; (see `Naming`_) will be added.&nbsp; The<br>functions mentioned in the second list above will be moved to it.<br><br><br>
Transition Plan<br>===============<br><br>Once implemented in 3.x, the interpreter module will be back-ported to 2.6.<br>Py3k warnings will be added the the sys functions it replaces.<br><br><br>Open Issues<br>===========<br>
<br>Naming<br>------<br><br>The author proposes the name &quot;interpreter&quot; for the new module.&nbsp; &quot;pyvm&quot; has also<br>been suggested [#pyvm-name]_.<br><br><br>References<br>==========<br><br>.. [#bug-1522]<br>
<br>&nbsp;&nbsp; <a href="http://bugs.python.org/issue1522">http://bugs.python.org/issue1522</a><br><br>.. [#types-removal]<br><br>&nbsp;&nbsp; <a href="http://mail.python.org/pipermail/stdlib-sig/2008-April/000172.html">http://mail.python.org/pipermail/stdlib-sig/2008-April/000172.html</a><br>
<br>.. [#pyvm-name]<br><br>&nbsp;&nbsp; <a href="http://mail.python.org/pipermail/python-3000/2007-November/011351.html">http://mail.python.org/pipermail/python-3000/2007-November/011351.html</a><br><br>Copyright<br>=========<br><br>
&nbsp;&nbsp;&nbsp; This document has been placed in the public domain.<br><br><br> <br>Local Variables:<br>mode: indented-text<br>indent-tabs-mode: nil<br>sentence-end-double-space: t<br>fill-column: 70<br>coding: utf-8<br>End:<br><br><br>
<div class="gmail_quote">On Sat, Apr 5, 2008 at 9:18 AM, Benjamin Peterson &lt;<a href="mailto:musiccomposition@gmail.com">musiccomposition@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div><div></div><div class="Wj3C7c">On Fri, Apr 4, 2008 at 4:09 PM, Steven Bethard &lt;<a href="mailto:steven.bethard@gmail.com" target="_blank">steven.bethard@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>On Fri, Apr 4, 2008 at 10:51 AM, Benjamin Peterson<br>
&lt;<a href="mailto:musiccomposition@gmail.com" target="_blank">musiccomposition@gmail.com</a>&gt; wrote:<br>
&gt; &nbsp;PEP: XXX<br>
&gt; Title: The interpreter module<br>
&gt; Version: $Revision$<br>
&gt; Last-Modified: $Date$<br>
&gt; Author: Benjamin Peterson<br>
&gt; Status: Draft<br>
&gt; Type: Standards Track<br>
&gt; Content-Type: text/x-rst<br>
&gt; Created: 4-April-2008<br>
&gt; Python-Version: 3.0<br>
&gt;<br>
&gt;<br>
&gt; Abstract<br>
&gt; ========<br>
&gt;<br>
&gt; This PEP proposes a new low-level module for CPython-specific interpreter<br>
&gt; functions in order to clean out the sys module and separate general Python<br>
&gt; functionality from implementation details.<br>
&gt;<br>
&gt;<br>
&gt; Rationale<br>
&gt; =========<br>
&gt;<br>
&gt; The sys module currently contains functions and data that can be put into<br>
&gt; two<br>
&gt; major groups:<br>
&gt;<br>
&gt; 1. Data and functions that are available in all Python implementations and<br>
&gt; deal<br>
&gt; &nbsp; &nbsp; with the general running of a Python VM.<br>
&gt;<br>
&gt; &nbsp; &nbsp;- display_hook, stdout, stdin, and stderr<br>
&gt; &nbsp; &nbsp;- flags and warn_options<br>
&gt; &nbsp; &nbsp;- settrace, and setprofile<br>
&gt; &nbsp; &nbsp;- traceback, excepthook<br>
&gt; &nbsp; &nbsp;- etc...<br>
&gt;<br>
&gt;<br>
&gt; 2. Data and function that affect the CPython interpreter.<br>
&gt;<br>
&gt; &nbsp; &nbsp;- get/setrecursionlimit<br>
&gt; &nbsp; &nbsp;- get/setcheckinterval<br>
&gt; &nbsp; &nbsp;- _getframe and _current_frame<br>
&gt; &nbsp; &nbsp;- getrefcount<br>
&gt; &nbsp; &nbsp;- getdlopenflags<br>
<br>
</div></div>Why getdlopenflags? That seems general to any Python implementation<br>
that opens dlls (though I believe the dl module is going away in<br>
Python 3, so it may not matter).</blockquote></div></div><div>I don&#39;t think any other implementations do open dynamic libs. Those flags don&#39;t affect the dl module; they define how Python opens C shared libs.<br></div>
<div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Also, maybe settscdump should be moved as well? Its description says<br>
to look at &quot;Python/ceval.c&quot;&nbsp;<br></blockquote></div><div>Yes. <br></div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
Otherwise, it looks pretty good to me.<br>
<div><div></div><div><br>
Steve<br>
--<br>
I&#39;m not *in*-sane. Indeed, I am so far *out* of sane that you appear a<br>
tiny blip on the distant coast of sanity.<br>
&nbsp;--- Bucky Katt, Get Fuzzy<br>
</div></div></blockquote></div></div><br><br clear="all"><br>-- <br>Cheers,<br><font color="#888888">Benjamin Peterson
</font></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br>Benjamin Peterson