I appreciate your quoting GvR and continue to note that the source might already be yummy byte code in whatever target VM language, be that Java&#39;s or Mono&#39;s or some VM not yet written.<div><br></div><div>&quot;Source code is one step away from runtime digestible, in still needing to be parsed, and as such need not be distributed with compiled Python modules&quot; would seem to be a true statement.</div>
<div><br></div><div>One might imagine a &quot;Python chat window&quot; showing up as a chat service (shell) and behaving much as an ordinary Python interpreter in REPL mode (great for learning, we all agree).</div><div><br>
</div><div>But behind the scenes, there&#39;s a lot of cloudy stuff, with some algorithms implemented in what looks to be LISP or Scheme.  Obviously the CLR byte codes are runnable, but the source is mostly not even Python.</div>
<div><br></div><div>So you go</div><div><br></div><div>&gt;&gt;&gt; import math</div><div><br></div><div>but behind the scenes it&#39;s like J or something, with some bytecodes to a local engine via JSON perhaps, for AJAXy fun.</div>
<div><br></div><div>Kirby</div><div><br><br><div class="gmail_quote">On Tue, May 3, 2011 at 10:14 AM, Vernon Cole <span dir="ltr">&lt;<a href="mailto:vernondcole@gmail.com">vernondcole@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="gmail_quote">On Tue, May 3, 2011 at 4:00 AM,  <span dir="ltr">&lt;<a href="mailto:edu-sig-request@python.org" target="_blank">edu-sig-request@python.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


 [Edu-sig] What is a Python module?</blockquote></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">


<span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">I posed this question before.  The usual answer is:  a file containing<br>Python source code.<br></span></blockquote>

<div><br></div>Kirby:<div>  The &quot;usual&quot; answer is almost the correct answer.</div><div>I quote from <a href="http://docs.python.org/py3k/tutorial/modules.html" target="_blank">http://docs.python.org/py3k/tutorial/modules.html</a> which was written by GvR himself.  A higher authority than BDFL cannot exist.</div>


<div><span style="font-family:sans-serif;font-size:16px;line-height:20px">&quot;<span style="background-color:rgb(255, 255, 153)">A module is a file containing Python definitions and statements.</span></span> &quot;<div>


I note that GvR does not mention that it must be in source form, only that it contain definitions and statements.  The tutorial continues to give much more information about what modules are and how they work.</div><div>

<br>
</div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">In fact, one could argue a Python module is precisely *not* the<br>readable source code .py file, as that *must* be compiled to byte<br>


codes first, and saved in the .pyc.</span></blockquote><div><br></div><div>One could make such an argument, but one would be incorrect.  IronPython, for example,  _never_ compiles to .pyc byte code, but the modules I write using it are still Python modules, and still do what modules are supposed to do.</div>


<div>--</div><div>Vernon Cole</div><div><br></div></div></div>
<br>_______________________________________________<br>
Edu-sig mailing list<br>
<a href="mailto:Edu-sig@python.org">Edu-sig@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/edu-sig" target="_blank">http://mail.python.org/mailman/listinfo/edu-sig</a><br>
<br></blockquote></div><br></div>