Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-18 Thread Dino Viehland
-Original Message- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of jhow...@drawloop.com > Sent: Tuesday, November 17, 2009 2:31 PM > To: users@lists.ironpython.com > Subject: Re: [IronPython] Embedded IronPython 2.6 Module

Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-17 Thread jhow...@drawloop.com
> > the Scope. > > > I agree this has gotten worse in 2.6 - I opened a bug a while ago to make > > working with > > modules easier > > -http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25190. > > > > -----Original Message- > > > From: users-bou

Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-17 Thread jhow...@drawloop.com
.codeplex.com/WorkItem/View.aspx?WorkItemId=25190. > > > > > -Original Message- > > From: users-boun...@lists.ironpython.com [mailto:users- > > boun...@lists.ironpython.com] On Behalf Of jhow...@drawloop.com > > Sent: Tuesday, November 17, 2009 2:02 PM >

Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-17 Thread Dino Viehland
users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf Of jhow...@drawloop.com > Sent: Tuesday, November 17, 2009 2:02 PM > To: users@lists.ironpython.com > Subject: Re: [IronPython] Embedded IronPython 2.6 Module Name > > I realize I'm

Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-17 Thread jhow...@drawloop.com
I realize I'm replying rather late, but I just got to trying this again. This is something that really should be simple. Anytime a module is run from the ScriptEngine directly, I would expect the behavior to be running as "__main__" just as if I was running it from the command line using "ipy" or

Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-05 Thread Jonathan Howard
Thanks for the help, Curt. Perhaps it's a problem with the latest, RC? There is no "CreateModule" function on the PythonContext object. ~Jonathan ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpytho

Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-05 Thread Curt Hagenlocher
I'm not sure if there's a simpler way -- here's what I did a few months back when I needed to publish something via __main__: pythonContext = HostingHelpers.GetLanguageContext(self._engine) module = pythonContext.CreateModule() pythonContext.PublishModule('__main__', module) scope = HostingHelpers

Re: [IronPython] Embedded IronPython 2.6 Module Name

2009-11-05 Thread Jonathan Howard
Looking further into this, it appears that __name__ is always set to . This is the behavior while trying to just use: Dictionary options = new Dictionary(); ScriptEngine se = Python.CreateEngine(); Console.WriteLine(se.Execute("__name__")); ~Jonathan __