Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New comment] Scope is not remembered after an import

----------------------------------------------

ISSUES

1. [New comment] Scope is not remembered after an import
http://ironpython.codeplex.com/workitem/30955
User MarkusSchaber has commented on the issue:

"We had the same problem when embedding IronPython into CoDeSys. But this is 
how python works, so it cannot be changed by IronPython without breaking 
compatibility to 95% of all Python code around.

Our Solution was to use Python.CreateModule(engine, "scriptengine") to create a 
module. We then injected our C# objects into that module, and emulated an "from 
... import *" by copying all scope members to the script scope on script 
startup. This allows imported modules to simply do "import scriptengine" and 
then access our injected C# objectes, without destroying the scope rules for 
ordinary python code."
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on 
CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue 
Tracker. You can unsubscribe or change your issue notification settings on 
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to