[IronPython] sys.builtin_module_names and embedding

Dino Viehland dinov at microsoft.com
Wed Jul 15 18:09:26 CEST 2009


IronPython.Modules.dll is probably not being copied for your host application.  It should be next to IronPython.dll.  If it's not available then we'll just continue to run w/o the modules available.

________________________________
From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] on behalf of Mads Weitling [mads.weitling at gmail.com]
Sent: Wednesday, July 15, 2009 9:57 AM
To: users at lists.ironpython.com
Subject: [IronPython] sys.builtin_module_names and embedding


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/4caa1247/attachment.html>


More information about the Ironpython-users mailing list