[Python.NET] exposing modules

2006-06-08 Thread Haran Shivanan
Hi, I'm trying to embed the python interpreter in my .NET-based program. The basic stuff is working fine. But now, I want to expose some of my program's internal data to the scripts. (ie, not just functions that live in an assembly, but access to my live program's state) For example, if I have a

Re: [Python.NET] exposing modules

2006-06-09 Thread Haran Shivanan
Brian Lloyd wrote: >Haran - you can't expose a 'module' (in the Python sense), but >you can easily do what you trying to do. > > Awesome. That worked. Didn't think it would be that easy! Thanks a lot. Haran _ Python.NET mailing list - PythonDotN

Re: [Python.NET] exposing modules

2006-06-15 Thread Haran Shivanan
; >Kind regards >Matthew > >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Srivatsa, Radhika >Sent: 13 June 2006 21:48 >To: Haran Shivanan; pythondotnet@python.org >Subject: Re: [Python.NET] exposing modules > >Hi, > >

Re: [Python.NET] exposing modules

2006-06-15 Thread Haran Shivanan
Haran Shivanan wrote: >Hi , All > >(Minor point, but I'm not the author of that mail. I think Srivatsa >asked the question) >Anyway, I think you need to add a "using Python.Runtime" clause to the >top of the file before this will work. > > Nevermind. T

[Python.NET] Locking Issues

2006-08-16 Thread Haran Shivanan
Hi, I've got some code in C# that embeds python as an interpreter using Python.NET. This code executes various python scripts to calculate values and returns. I'm calling AcquireLock() and ReleaseLock() before and after each use of the PythonEngine. The code works flawlessly in a WinForms test