Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-07-17 Thread Michael Foord
need to be made to work in SL, but if this doesn't work in SL it would seem to be a bug in IronPython. ~js -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Friday, July 17, 2009 5:34 AM To: Discussion

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-07-17 Thread Jimmy Schementi
n...@lists.ironpython.com] On Behalf Of Michael Foord > Sent: Friday, July 17, 2009 5:34 AM > To: Discussion of IronPython > Subject: Re: [IronPython] Access to current Python engine in C# (Silverlight) > > I never got a reply to this. The C# code below throws an import error and

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-07-17 Thread Michael Foord
I never got a reply to this. The C# code below throws an import error and I want to know if this is my fault or a problem with the IronPython / Silverlight integration. Michael Michael Foord wrote: Ha - dammit, no. With Silverlight this still throws an ImportError when embedded Python code

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-06-04 Thread Michael Foord
on.CreateSnippet(code, SourceCodeKind.Statements); script.Execute(module); return module; } } } Michael Foord ~Jimmy -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Sunda

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-06-04 Thread Jimmy Schementi
nal Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Sunday, May 17, 2009 8:27 AM To: Discussion of IronPython Subject: Re: [IronPython] Access to current Python engine in C# (Silverlight) Jimmy - did you get a chance

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-28 Thread Michael Foord
Ping? Jimmy - had a chance to look at this yet? I'd really like to know if it is a bug or just something I'm doing wrong / not doing. Thanks Michael Michael Foord wrote: Ha - dammit, no. With Silverlight this still throws an ImportError when embedded Python code executed from C# like this

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-18 Thread Michael Foord
imported the module. Michael -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, May 18, 2009 9:27 AM To: Discussion of IronPython Subject: Re: [IronPython] Access to current Python engine in C

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-18 Thread Dino Viehland
Subject: Re: [IronPython] Access to current Python engine in C# (Silverlight) Ha - dammit, no. With Silverlight this still throws an ImportError when embedded Python code executed from C# like this tries to import from the xap file. :-( Michael Michael Foord wrote: > Thanks to some help from Will

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-18 Thread Michael Foord
Ha - dammit, no. With Silverlight this still throws an ImportError when embedded Python code executed from C# like this tries to import from the xap file. :-( Michael Michael Foord wrote: Thanks to some help from William Reade, this code *seems* to work fine. I need to try it from Silverligh

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-18 Thread Michael Foord
Thanks to some help from William Reade, this code *seems* to work fine. I need to try it from Silverlight and check the Python code it contains is able to import: using System; using System.Collections.Generic; using System.Text; using IronPython.Hosting; using IronPython.Runtime; using IronP

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-17 Thread Michael Foord
Jimmy - did you get a chance to look at this? If the code shown below *genuinely* gets a reference to the current engine then shouldn't the search path be setup already? Can you see what is wrong with the code below? Thanks Michael Michael Foord wrote: Hello guys, I have a second use case

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-09 Thread Michael Foord
William Reade wrote: I had a similar problem in Ironclad -- needing to get the engine which called a C# method. Try adding a CodeContext parameter to GetModule (which gets automagically inserted; no need to change the call from Python), and then using PythonContext.GetContext to get a PythonCo

Re: [IronPython] Access to current Python engine in C# (Silverlight)

2009-05-09 Thread William Reade
I had a similar problem in Ironclad -- needing to get the engine which called a C# method. Try adding a CodeContext parameter to GetModule (which gets automagically inserted; no need to change the call from Python), and then using PythonContext.GetContext to get a PythonContext from the CodeCon

[IronPython] Access to current Python engine in C# (Silverlight)

2009-05-09 Thread Michael Foord
Hello guys, I have a second use case for embedding IronPython in Silverlight. This is actually a dynamic application with a C# component that needs to programattically build a Python module. Again I have the same problem - imports in Python code fail. I would have expected that accessing the