[IronPython] import issue

David DiCato ddicato at microsoft.com
Fri Jan 30 02:34:56 CET 2009


IronPython.dll represents IronPython's core functionality, including the compiler and runtime elements such as builtin types and exceptions. IronPython.Modules.dll can be thought of as a portion of the standard lib; it contains most of the builtin modules such as re that would be imported from IronPython. HTH

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Janofsky, Steven
Sent: Thursday, January 29, 2009 2:37 PM
To: Discussion of IronPython
Subject: Re: [IronPython] import issue

After adding a reference to IronPython.Modules.dll assembly, it seemed to work.

This is the structure of my app:

Service.exe
            Which contains a reference to
            Assembly1
                        Which contains a reference to
                                    Assembly2
                                                Which contains a reference to
                                                            Assembly3 that has a reference to IronPython.dll and IronPython.Modules.dll

For some reason, I had to add IronPython.dll and IronPython.Modules.dll assemblies to Service.exe.

Any ideas why?

________________________________
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curt Hagenlocher
Sent: Tuesday, January 27, 2009 2:17 PM
To: Discussion of IronPython
Subject: Re: [IronPython] import issue

The most likely explanation is that you're missing a reference to IronPython.Modules.dll.
On Tue, Jan 27, 2009 at 11:14 AM, Janofsky, Steven <Steven.Janofsky at webloyalty.com<mailto:Steven.Janofsky at webloyalty.com>> wrote:

Does anyone know why the following gives 'No module named re' error:



ScriptEngine engine = IronPython.Hosting.Python.CreateEngine();

ScriptScope scope = engine.CreateScope();

ScriptSource src = engine.CreateScriptSourceFromString( "import re", Microsoft.Scripting.SourceCodeKind.Statements );

src.Execute( scope );

This transmission may contain information that is privileged, confidential and exempt from disclosure under applicable law.  If you, users at lists.ironpython.com<mailto:users at lists.ironpython.com>, are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED.  If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.  [clavin.webloyalty.com<http://clavin.webloyalty.com>]

_______________________________________________
Users mailing list
Users at lists.ironpython.com<mailto:Users at lists.ironpython.com>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


This transmission may contain information that is privileged, confidential and exempt from disclosure under applicable law.  If you, users at lists.ironpython.com, are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED.  If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.  [clavin.webloyalty.com]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090129/bc622fe7/attachment.html>


More information about the Ironpython-users mailing list