[Edu-sig] What is a Python module?
kirby urner
kirby.urner at gmail.com
Tue May 3 09:39:52 CEST 2011
I posed this question before. The usual answer is: a file containing
Python source code.
But you can import .pyc files even after the .py files are been
removed, likewise .pyd files.
Is a Python module anything that's importable and runnable within
Python, that responds to dir( ) etc.?
True whether or not said module comes with readable source code.
In fact, one could argue a Python module is precisely *not* the
readable source code .py file, as that *must* be compiled to byte
codes first, and saved in the .pyc.
Kirby
Ongoing curriculum writing (a window):
http://mybizmo.blogspot.com/2011/05/lesson-planning.html
More information about the Edu-sig
mailing list