[IronPython] sys.builtin_module_names and embedding

Mads Weitling mads.weitling at gmail.com
Wed Jul 15 16:57:11 CEST 2009


I am trying to run som IronPython code using the 2.6b1 hosting API but
cannot seem to import the basic 'builtins' defined in IronPython.Modules.dll
from my IronPython host.
When using ipy.exe, things work fine:
ipy.exe -v
>>> import sys
>>> sys.builtin_module_names
('clr', 'future_builtins', 'sys', '__builtin__', 'exceptions', '_weakref',
'_struct', '_winreg', '_warnings', '_sre', '_random', '_functools',
'xxsubtype', 'time', 'thread', '_heapq', '_ctypes_test', '_ctypes',
'socket', '_sha512', '_sha256', '_sha', 'select', 're', 'operator', 'nt',
'_md5', 'math', 'marshal', '_locale', 'itertools', 'imp', 'gc', 'errno',
'datetime', 'cStringIO', 'cPickle', 'copy_reg', '_collections', '_codecs',
'cmath', 'binascii', 'array')

Running from an embedded IronPython, I see only a few builtins:

('clr', 'future_builtins', 'sys', '__builtin__', 'exceptions')

How can I make the missing builtins available to my embedded interpreter?

/Mads
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090715/b3153732/attachment.html>


More information about the Ironpython-users mailing list