From met at uberstats.com Sat May 15 15:20:25 2004
From: met at uberstats.com (Met)
Date: Sat May 15 15:20:41 2004
Subject: [Python.NET] Mono Support
Message-ID: <1084648824.4813.0.camel@rasmus>
Could anyone give some pointers on getting Python.NET running on Mono
(Linux)? Any help would be appreciated.
~ Matthew
From laur at gd.ro Mon May 17 07:47:48 2004
From: laur at gd.ro (Laurian Gridinoc)
Date: Mon May 17 07:48:10 2004
Subject: [Python.NET] embedding in aspx problem
Message-ID: <1084794468.29403.10.camel@smith.grapefruit.ro>
Hello,
I'm trying to figure out how can I use Python.NET, and I'm having weird
problems:
This run ok:
It outputs:
['D:\\testsite\\bin\\python23.zip', '.\\DLLs', '.\\lib',
'.\\lib\\plat-win', '.\\lib\\lib-tk',
'\\\\?\\C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322']
But when I'm trying to run the script foo.py which is located under the
above '\lib' I'm getting "Exception of type
Python.Runtime.PythonException was thrown." at the line:
PyObject p = PythonEngine.ImportModule("foo");
How can I learn more about the exception cause?
Thank you,
--
Laurian Gridinoc
Chief Developer
GRAPEFRUIT DESIGN
www.grapefruitdesign.com
From brian at zope.com Mon May 17 10:17:30 2004
From: brian at zope.com (Brian Lloyd)
Date: Mon May 17 10:17:37 2004
Subject: [Python.NET] embedding in aspx problem
In-Reply-To: <1084794468.29403.10.camel@smith.grapefruit.ro>
Message-ID:
Hi Laurian,
Try removing the call to PythonEngine.Finalize(). That should
_only_ be called when you are truly finished with the Python
interpreter (to clean up and free resources, etc.) That method
tears down the Python runtime environment and after it is called
you can't use Python anymore from any thread in the process.
- Brian
> I'm trying to figure out how can I use Python.NET, and I'm having weird
> problems:
>
> This run ok:
>
>
>
> It outputs:
> ['D:\\testsite\\bin\\python23.zip', '.\\DLLs', '.\\lib',
> '.\\lib\\plat-win', '.\\lib\\lib-tk',
> '\\\\?\\C:\\WINDOWS\\Microsoft.NET\\Framework\\v1.1.4322']
>
> But when I'm trying to run the script foo.py which is located under the
> above '\lib' I'm getting "Exception of type
> Python.Runtime.PythonException was thrown." at the line:
>
> PyObject p = PythonEngine.ImportModule("foo");
>
> How can I learn more about the exception cause?
>
> Thank you,
> --
> Laurian Gridinoc
> Chief Developer
> GRAPEFRUIT DESIGN
> www.grapefruitdesign.com
>
>
> _________________________________________________
> Python.NET mailing list - PythonDotNet@python.org
> http://mail.python.org/mailman/listinfo/pythondotnet
>
Brian Lloyd brian@zope.com
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
From brian at zope.com Mon May 17 10:36:23 2004
From: brian at zope.com (Brian Lloyd)
Date: Mon May 17 10:36:50 2004
Subject: [Python.NET] Mono Support
In-Reply-To: <1084648824.4813.0.camel@rasmus>
Message-ID:
> Could anyone give some pointers on getting Python.NET running on Mono
> (Linux)? Any help would be appreciated.
>
> ~ Matthew
Hi Matthew -
Last time I tried, I couldn't get it working on mono due to some
missing bits in the mono reflection and interop layers (both of
which Python.NET exercises pretty extensively).
That was probably 6 months ago though, so hopefully the situation
is better now. I'd be interested to hear if anyone on the list
has tried running under mono recently, and what the results were...
Brian Lloyd brian@zope.com
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
From met at uberstats.com Mon May 17 10:46:56 2004
From: met at uberstats.com (MET)
Date: Mon May 17 10:47:00 2004
Subject: [Python.NET] Mono Support
In-Reply-To:
References:
Message-ID: <1084805216.3850.2.camel@syru102-207.syr.edu>
Hello,
On Mon, 2004-05-17 at 10:36, Brian Lloyd wrote:
> > Could anyone give some pointers on getting Python.NET running on Mono
> > (Linux)? Any help would be appreciated.
> >
> > ~ Matthew
>
> Hi Matthew -
>
> Last time I tried, I couldn't get it working on mono due to some
> missing bits in the mono reflection and interop layers (both of
> which Python.NET exercises pretty extensively).
>
> That was probably 6 months ago though, so hopefully the situation
> is better now. I'd be interested to hear if anyone on the list
> has tried running under mono recently, and what the results were...
>
>
> Brian Lloyd brian@zope.com
> V.P. Engineering 540.361.1716
> Zope Corporation http://www.zope.com
I'll certainly give it a shot when I get home.
~ Matthew
From laur at gd.ro Mon May 17 15:42:53 2004
From: laur at gd.ro (Laurian Gridinoc)
Date: Tue May 18 10:14:02 2004
Subject: [Python.NET] embedding in aspx problem
In-Reply-To:
References:
Message-ID: <1084822973.9552.13.camel@smith.grapefruit.ro>
On Mon, 2004-05-17 at 14:17, Brian Lloyd wrote:
> Try removing the call to PythonEngine.Finalize(). That should
> _only_ be called when you are truly finished with the Python
> interpreter (to clean up and free resources, etc.) That method
> tears down the Python runtime environment and after it is called
> you can't use Python anymore from any thread in the process.
> - Brian
The issue was with sys.path which when called from aspx, and not from an
exe was relative (.\lib, instead of d:\testsite\bin\lib) so I have to
set it like this before importing my module:
PyObject sys = PythonEngine.ImportModule("sys");
PyObject path = sys.GetAttr("path");
PyObject append = path.GetAttr("append");
PyObject[] a = new PyObject[1];
a[0] = new PyString("d:\\testsite\\bin\\lib");
append.Invoke(a);
Response.Write(path.ToString());
Another issue, if I tear down the python runtime environment (not by
several finalize(), but by recurrent errors) how can I restore it
without restarting my application (in ASP.NET it seems I have to restart
the WWW Publishing service for this)
Thank you,
--
Laurian Gridinoc
Chief Developer
GRAPEFRUIT DESIGN
www.grapefruitdesign.com
From parente at email.unc.edu Sat May 15 13:39:49 2004
From: parente at email.unc.edu (Peter Parente)
Date: Thu May 20 09:33:40 2004
Subject: [Python.NET] Calling DLL functions?
Message-ID: <40A655E5.1050500@email.unc.edu>
Hi,
Is it possible to call function in DLLs using Python for .NET? The
reason why I ask is that I'm working with Accessibility assembly. This
assembly defines the classes and interfaces for the Microsoft Active
Accessibility library which allows a program to inspect the interface
object model of other programs at runtime. However, the functions for
performing the actual inspection are located in oleacc.dll. These
functions return instances of the objects defined in the assembly.
I'm pretty new to .NET programming so I might not be explaining this
very well. Any help would be greatly appreciated.
Thanks,
Pete
From benji_york at cknainc.com Thu May 20 10:01:31 2004
From: benji_york at cknainc.com (Benji York)
Date: Thu May 20 10:03:03 2004
Subject: [Python.NET] Calling DLL functions?
In-Reply-To: <40A655E5.1050500@email.unc.edu>
References: <40A655E5.1050500@email.unc.edu>
Message-ID: <40ACBA3B.5020707@cknainc.com>
Peter Parente wrote:
> Is it possible to call function in DLLs using Python for .NET?
Knowing what little I know of Python for .NET I would say that you might
want to look into ctypes. I have used it very successfully to do call
arbitrary functions in DLLs. See
http://starship.python.net/crew/theller/ctypes/ for more information.
--
Benji York
From brian at zope.com Thu May 20 11:04:01 2004
From: brian at zope.com (Brian Lloyd)
Date: Thu May 20 11:04:09 2004
Subject: [Python.NET] Calling DLL functions?
In-Reply-To: <40A655E5.1050500@email.unc.edu>
Message-ID:
> Is it possible to call function in DLLs using Python for .NET? The
> reason why I ask is that I'm working with Accessibility assembly. This
> assembly defines the classes and interfaces for the Microsoft Active
> Accessibility library which allows a program to inspect the interface
> object model of other programs at runtime. However, the functions for
> performing the actual inspection are located in oleacc.dll. These
> functions return instances of the objects defined in the assembly.
Just to clarify - is oleacc.dll an unmanaged (native) dll or a
managed (.NET) dll?
Brian Lloyd brian@zope.com
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
From ssk at camsight.com Tue May 25 12:19:00 2004
From: ssk at camsight.com (Sam Sungshik Kong)
Date: Tue May 25 13:21:21 2004
Subject: [Python.NET] Question: How can I import what I created in C#
Message-ID: <001901c44273$fd2502f0$1300a8c0@ssknotebook>
Hello!
PythonDotNet is very imporessive.
I was very excited seeing it working with .Net classes.
My question is that how I can import classes(namespaces) that I made in C#.
In C#, I give a compile option for the dll that I created.
How can I do it with Python?
Thanks.
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20040525/6154616c/attachment.html
From brian at zope.com Tue May 25 14:37:24 2004
From: brian at zope.com (Brian Lloyd)
Date: Tue May 25 14:37:45 2004
Subject: [Python.NET] Question: How can I import what I created in C#
In-Reply-To: <001901c44273$fd2502f0$1300a8c0@ssknotebook>
Message-ID:
Hi Sam - generally, if you have created an assembly named 'A.B.dll', and the
name of the assembly matches the namespaces it contains ('A', 'A.B'), then
you
should just be able to do:
from A.B import SomeClass
...after making sure that A.B.dll is on the python path.
Hope this helps - the readme.txt that comes with Python for .NET goes into a
bit
more detail, if you haven't seen that already.
Brian Lloyd brian@zope.com
V.P. Engineering 540.361.1716
Zope Corporation http://www.zope.com
-----Original Message-----
From: pythondotnet-bounces+brian=zope.com@python.org
[mailto:pythondotnet-bounces+brian=zope.com@python.org]On Behalf Of Sam
Sungshik Kong
Sent: Tuesday, May 25, 2004 11:19 AM
To: pythondotnet@python.org
Subject: [Python.NET] Question: How can I import what I created in C#
Hello!
PythonDotNet is very imporessive.
I was very excited seeing it working with .Net classes.
My question is that how I can import classes(namespaces) that I made in
C#.
In C#, I give a compile option for the dll that I created.
How can I do it with Python?
Thanks.
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20040525/5d3c9bd9/attachment.html
From mlist at asesoft.ro Mon May 31 06:15:52 2004
From: mlist at asesoft.ro (MailingList)
Date: Mon May 31 06:23:38 2004
Subject: [Python.NET] (no subject)
Message-ID: <080001c446f8$40a16810$7560a8c0@asesoft.intl>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20040531/a38aff2c/attachment.html