Missing CPython Libraries
❘
425
lIBrAry NAmE
PurPoSE
stringprep.py
Provides methods for preparing Unicode strings for Internet use according to the
requirements of RFC 3454 (
http://www.faqs.org/rfcs/rfc3454.html
). You
can find out
more about this module at
http://docs.python.org/library/
stringprep.html
.
subprocess.py
and
subprocess
.pyc
Allows a Python application to spawn subprocesses and then interact with
them through their input, output, and error pipes.
The host application also
receives the subprocess’s return code. This module replaces several older
modules including
os.system
,
os.spawn*
,
os.popen*
,
popen2.*
, and
commands.*
. You can read more about this module at
http://docs.python
.org/library/subprocess.html
.
symtable.py
The
ast
module generates symbol tables right before
Python generates byte
codes. This module provides access to the symbol tables so that you can examine
them in detail. You can read more about this module at
http://docs.python
.org/library/symtable.html
.
tty.py
This module provides terminal mode support.
In order to use this module, the appli-
cation must have access to the
termios
module. This module currently works reli-
ably
only on Linux systems, even if you use a CPython implementation on Windows,
so it isn’t surprising that IronPython doesn’t implement this module yet. You can read
more about this module at
http://docs.python.org/library/tty.html
.
webbrowser
.py and
webbrowser
.pyc
This module provides Web browser controller support for applications. In most
cases, all you need to do is perform a little configuration and then open the file for
viewing. The behavior of this module varies on different
platforms so you need to
exercise some care when using it. This module doesn’t directly support Internet
Explorer, but does support the other major browsers. It does indirectly support
Internet
Explorer through the
WindowsDefault
option. You can read more about
this module at
http://docs.python.org/library/webbrowser.html
.
CPython includes a number of compiled (
.pyc
) modules that don’t appear in IronPython. Even
though these are technically missing modules, the fact that you have a source code original makes
it possible to access the functionality these modules provide. Table A-2 provides a list of the missing
compiled modules.
TABlE A-2:
Missing Compiled Modules
__future__.pyc
_abcoll.pyc
abc.pyc
BaseHTTPServer.pyc
bdb.pyc
bisect.pyc
code.pyc
codecs.pyc
codeop.pyc
collections.pyc
ConfigParser.pyc
copy.pyc
continues
548592bapp01.indd 425
2/24/10 12:49:58 PM
www.finebook.ir