From michpole at comcast.net Wed Aug 2 15:07:48 2006 From: michpole at comcast.net (michpole at comcast.net) Date: Wed, 02 Aug 2006 13:07:48 +0000 Subject: [Python.NET] no module name _sre Message-ID: <080220061307.10270.44D0A3A4000E96660000281E22070209530A04019F080C0703@comcast.net> I have been using PythonWin2.4.1 (#65, Jun 20 2005, 17:01:55) [MSC v.1310 32 bit (Intel)] on win32 for nearly one year. Yesterday I added Python for .Net (Python 2.3.4 #53 May 25 2004). Now some of my old code (originally written some years ago on a Unix platform and which worked unmodified with PythonWin) does not work. Here are two illustrations: 1. No module named _sre 2. from os.path import (curdir, ^ SyntaxError: invalid syntax Please advise. From shivanan at statictype.org Wed Aug 16 13:52:22 2006 From: shivanan at statictype.org (Haran Shivanan) Date: Wed, 16 Aug 2006 17:22:22 +0530 Subject: [Python.NET] Locking Issues Message-ID: <44E306F6.9080307@statictype.org> 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 app. But if I try to run the code from an ASP.NET web application or a web service, sometimes, the call to AcquireLock waits indefinitiely. Stepping through a debugger shows that first time I call it, it works, and then ReleaseLock() also works. But then a second call to AcquireLock hangs. This problem is only there if I execute the code from a web application. Is this a known issue? Is there any work-around for it? If its a bug in the Python.NET code, then maybe I can look at possibly fixing it. Or could it be a fundamental problem with the Python interpreter itself? Thanks, Haran From progdew34 at yahoo.com Sat Aug 19 20:44:51 2006 From: progdew34 at yahoo.com (Steve Dewey) Date: Sun, 20 Aug 2006 02:44:51 +0800 (CST) Subject: [Python.NET] Installation on existing Python2.4 Message-ID: <20060819184451.54503.qmail@web35405.mail.mud.yahoo.com> I want to run Python.Net from within my existing Python 2.4 environment. I installed with pythonnet-1.0-rc2-py2.3-clr1.1.exe I chose to add .NET awareness to my existing Python environment at installation. (Not quite certain what that really means.) I was already running Python 2.4.3 (#69, March 29 2006, ... I had previously installed the following .NET packages from Microsoft: Microsoft .NET Framework 1.0 Hotfix (KB887998) Microsoft .NET Framework 1.1 Microsoft .NET Framework 1.1 Hotfix (KB886903) Microsoft .NET Framework 3.0 Microsoft .NET Framework 2.0 Security Update for Microsoft .NET Framework 2.0 (KB917283) Microsoft .NET Framework 2.0 SDK - ENU Python 2.4 is installed at c:\python24 Python.Net is installed at c:\Program Files\PythonNet I can run the "Python for .NET" console I can execute the demo programs using the Python 2.3.4 that the Python.Net installer provided. I copied CLR.dll and Python.Runtime.dll to c:\python24, but >>> import CLR results in An unhandled exception of type 'System.DllNotFoundException' occurred in Python.Runtime.dll Additional information: Unable to load DLL 'python23': The specified module could not be found. (Exception from HRESULT: 0x8007007E) as reported by the Microsoft CLR debugger. In Python 2.4 my path is: C:\WINDOWS\system32\python24.zip C:\Python24 C:\Python24\DLLs C:\Python24\lib C:\Python24\lib\plat-win C:\Python24\lib\lib-tk C:\Python24\lib\site-packages C:\Python24\lib\site-packages\win32 C:\Python24\lib\site-packages\win32\lib C:\Python24\lib\site-packages\Pythonwin I copied CLR.dll and Python.Runtime.dll to c:\python24\DLLs and renamed CLR.dll to clr.dll. I then get the following: >>> import clr Traceback (most recent call last): File "", line 1, in ? ImportError: dynamic module does not define init function (initclr) >>> Can anyone tell me what I should try next? From roman.yakovenko at gmail.com Sat Aug 19 21:00:02 2006 From: roman.yakovenko at gmail.com (Roman Yakovenko) Date: Sat, 19 Aug 2006 22:00:02 +0300 Subject: [Python.NET] Installation on existing Python2.4 In-Reply-To: <20060819184451.54503.qmail@web35405.mail.mud.yahoo.com> References: <20060819184451.54503.qmail@web35405.mail.mud.yahoo.com> Message-ID: <7465b6170608191200x1c31387n53a3b5d74c756c6@mail.gmail.com> On 8/19/06, Steve Dewey wrote: > I want to run Python.Net from within my existing Python 2.4 environment. > I installed with pythonnet-1.0-rc2-py2.3-clr1.1.exe ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Before you continue, consider to install version built for Python 2.4 -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ From progdew34 at yahoo.com Sat Aug 19 21:24:08 2006 From: progdew34 at yahoo.com (Steve Dewey) Date: Sat, 19 Aug 2006 12:24:08 -0700 (PDT) Subject: [Python.NET] Installation on existing Python2.4 Message-ID: <20060819192408.30634.qmail@web35415.mail.mud.yahoo.com> That worked. Thanks. I hadn't seen the 2.4 version when I downloaded via SourceForge. There the "Latest File Releases" section is showing the 2.3 release. When I clicked the "Download" button in that section I was only presented with download options for the 2.3 release. The 2.4 release is further down on the first page, but it was off my screen and I did not scroll down far enough, not knowing it was down there. Thanks again. ----- Original Message ---- From: Roman Yakovenko To: Steve Dewey Cc: pythondotnet at python.org Sent: Saturday, August 19, 2006 2:00:02 PM Subject: Re: [Python.NET] Installation on existing Python2.4 On 8/19/06, Steve Dewey wrote: > I want to run Python.Net from within my existing Python 2.4 environment. > I installed with pythonnet-1.0-rc2-py2.3-clr1.1.exe ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Before you continue, consider to install version built for Python 2.4 -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ From mkozyarchuk at funddevelopmentservices.com Wed Aug 30 15:06:52 2006 From: mkozyarchuk at funddevelopmentservices.com (Maksim Kozyarchuk) Date: Wed, 30 Aug 2006 09:06:52 -0400 Subject: [Python.NET] PythonNet and .NET 2.0 Question Message-ID: <8674D71026D5C848831DB7CA34B1C75803CFE9@fds1wmail01.funddevelopmentservices.com> Hello, new to this mailing list & PythonNet, so forgive me for asking questions others may have already asked. I am using 1.0-rc2 downloaded from sourceforge, which as I understand only supports .NET 1.1, however having built a simple assembly in .NET 2.0, I didn't have may issues using it. Is it safe to use this release with .NET 2.0( provided I don't need access to features introduced in 2.0 ) Maksim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060830/05bff8c9/attachment.html From brian.lloyd at revolution.com Wed Aug 30 16:09:21 2006 From: brian.lloyd at revolution.com (Brian Lloyd) Date: Wed, 30 Aug 2006 10:09:21 -0400 Subject: [Python.NET] PythonNet and .NET 2.0 Question In-Reply-To: <8674D71026D5C848831DB7CA34B1C75803CFE9@fds1wmail01.funddevelopmentservices.com> Message-ID: Hi Maksim ? it is safe to use it, you just won?t have access to 2.0-only features like generics, etc. The latest in svn mostly supports generics and a number of other 2.0-isms, but I haven?t had any time to make a release or do much on it lately. -Brian On 8/30/06 9:06 AM, "Maksim Kozyarchuk" wrote: > Hello, new to this mailing list & PythonNet, so forgive me for asking > questions others may have already asked. > > I am using 1.0-rc2 downloaded from sourceforge, which as I understand only > supports .NET 1.1, however having built a simple assembly in .NET 2.0, I > didn?t have may issues using it. > > Is it safe to use this release with .NET 2.0( provided I don?t need access to > features introduced in 2.0 ) > > > Maksim > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060830/a90b6949/attachment.htm From mkozyarchuk at funddevelopmentservices.com Thu Aug 31 14:44:04 2006 From: mkozyarchuk at funddevelopmentservices.com (Maksim Kozyarchuk) Date: Thu, 31 Aug 2006 08:44:04 -0400 Subject: [Python.NET] PythonNet and .NET 2.0 Question Message-ID: <8674D71026D5C848831DB7CA34B1C75803CFF6@fds1wmail01.funddevelopmentservices.com> Thanks. ________________________________ From: Brian Lloyd [mailto:brian.lloyd at revolution.com] Sent: Wednesday, August 30, 2006 10:09 AM To: Maksim Kozyarchuk; pythondotnet at python.org Subject: Re: [Python.NET] PythonNet and .NET 2.0 Question Hi Maksim - it is safe to use it, you just won't have access to 2.0-only features like generics, etc. The latest in svn mostly supports generics and a number of other 2.0-isms, but I haven't had any time to make a release or do much on it lately. -Brian On 8/30/06 9:06 AM, "Maksim Kozyarchuk" wrote: Hello, new to this mailing list & PythonNet, so forgive me for asking questions others may have already asked. I am using 1.0-rc2 downloaded from sourceforge, which as I understand only supports .NET 1.1, however having built a simple assembly in .NET 2.0, I didn't have may issues using it. Is it safe to use this release with .NET 2.0( provided I don't need access to features introduced in 2.0 ) Maksim ________________________________ _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060831/a9bab851/attachment.htm From mkozyarchuk at funddevelopmentservices.com Thu Aug 31 14:51:13 2006 From: mkozyarchuk at funddevelopmentservices.com (Maksim Kozyarchuk) Date: Thu, 31 Aug 2006 08:51:13 -0400 Subject: [Python.NET] Loading "System.Data" assembley Message-ID: <8674D71026D5C848831DB7CA34B1C75803CFF7@fds1wmail01.funddevelopmentservices.com> Calling Assembly.LoadWithPartialName( 'System.Data' ) seem to be silently failing and not making System.Data namespace available. However, loading another assembly which in turns loads system.data seems to work. Has anyone seen this before? Also tried loading with full name. See Example Below: Fails #Assembly.LoadWithPartialName( 'DevExpress.Utils.v6.2' ) Assembly.LoadWithPartialName( 'System.Data' ) from CLR.System.Data import DataSet Works Assembly.LoadWithPartialName( 'DevExpress.Utils.v6.2' ) #Assembly.LoadWithPartialName( 'System.Data' ) from CLR.System.Data import DataSet Maksim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060831/7c1f971f/attachment.html From dawginlife at yahoo.com Thu Aug 31 18:03:21 2006 From: dawginlife at yahoo.com (chanh hua) Date: Thu, 31 Aug 2006 09:03:21 -0700 (PDT) Subject: [Python.NET] CrlModule could not be found error? Message-ID: <20060831160321.96419.qmail@web84102.mail.mud.yahoo.com> while trying to build the subversion trunk for python.net using the makefile from cygwin, i get the error message below. I'm not having much luck finding this ClrModule. What am i doing wrong? thanks csc.exe /nologo /unsafe /target:library /out:../../Python.Runtime.dll \ /recurse:*.cs importhook.cs(25,9): error CS0246: The type or namespace name 'ClrModule' could not be found (are you missing a using directive or an assembly reference?) make: *** [Python.Runtime.dll] Error 1 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060831/111d7a24/attachment.htm From caolan at ldmf.net Thu Aug 31 19:40:00 2006 From: caolan at ldmf.net (Caolan) Date: Thu, 31 Aug 2006 10:40:00 -0700 Subject: [Python.NET] Newbie question: Howto include .NET DLL in Pythin code. Message-ID: Hello, I am in need of including in some Python code the namespace and classes in a .NET C# DLL. Can anyone please give me a quick snippet that will demonstrate how to do this? Thanks! -Caolan O'Domhnaill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060831/5669ed8a/attachment.htm