[Bf-python] Building python with builtin modules
Willian Padovani Germano
wgermano at ig.com.br
Fri Sep 3 06:42:58 CEST 2004
Hi,
Chris Want wrote:
> Would you happen to know which modules the Windows version
> has builtin?
Python 2.3.3, Windows ME (should be the same for other win versions):
('__builtin__', '__main__', '_codecs', '_hotshot', '_locale', '_random',
'_weakref', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO',
'cmath', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools',
'marshal', 'math', 'md5', 'msvcrt', 'nt', 'operator', 'pcre', 'regex',
'rgbimg', 'rotor', 'sha', 'signal', 'strop', 'struct', 'sys', 'thread',
'time', 'xreadlines', 'xxsubtype', 'zipimport')
Got it using this:
import sys
prints sys.builtin_module_names
The Python modules Python23.zip (and the zlib.pyd dll) included with
Blender 2.34 for windows are also "basic" modules that should be
available, they are under cvs now. Some are specific to the platform,
like nt and msvcrt, just forget them. The official documentation tells
which are platform-specific or not when you're in doubt. If you try the
above commands on another platform you'll see that Python for win comes
with many additional modules that are built shared elsewhere, where
Python is more common.
BTW, might be useful info: at least on linux a new Python installation
goes to /usr/local and lives nicely with the already installed one, you
just need to tell Blender where the Python you want is, by setting a
system var, like PYTHON="/usr/local/bin/python2.3". This works to
compile Blender and should also work for running pre-compiled versions,
tested with 2.32.
--
Willian
More information about the Bf-python
mailing list