From mjoubert at rim.com Fri Sep 10 12:03:42 2010 From: mjoubert at rim.com (Morne Joubert) Date: Fri, 10 Sep 2010 11:03:42 +0100 Subject: [Python.NET] New: Python 2.5 support Message-ID: Hi, I am totally new with Python and need some pointers on how to get Python 2.5 to call a .NET 2.0 assembly. I have been using the normal python distribution c:\python25 (using pyDev and Eclipse) I installed python .NET at C:\Program Files\PythonNet and then pointed pyDev at this folder but then it complained about language errors. I assume this is due to the differences between Python 2.3 and 2.5 So my question in a nutshell is.... What do I need to do to get Python 2.5 to call a .NET 2.0 assemble ? Do I need to somehow rebuild Python.NET ? Best regards, Morn? Joubert --------------------------------------------------------------------- This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From barton at BCDesignsWell.com Sat Sep 11 08:06:34 2010 From: barton at BCDesignsWell.com (Barton) Date: Fri, 10 Sep 2010 23:06:34 -0700 Subject: [Python.NET] New: Python 2.5 support In-Reply-To: References: Message-ID: <4C8B1C6A.20806@BCDesignsWell.com> To date, for .NET 2 and beyond, folks have been building the pythonnet-2.0-alpha2-clr2.0 from the source files. Now that I have access to the SourceForge project, it seems like it's time for me to build a binary release. I should be able to find the time this weekend to do the build and get them uploaded. I will not be building an installer, however. Once you have gotten the Python 2.5 .NET 2.0 binaries, it is likely that your pydev thing may work (I won't touch anything written in Java, myself). Here are some tips in case that doesn't work: The clr.pyd module and Python.Runtime.dll must be in a place where the python interpreter can find them. A handy test would be to put them both in the same directory as the currently executing script (the one with import clr ) is located. Python will also look in several other places (besides the current working directory) such as C:\Python25\DLLs and C:\Python25\Lib\site-packages Both are acceptable places, but site-packages is the preferred way of extending python. Give me a day or so to get the build uploaded and let us know how things are working out. -Barton On 9/10/2010 3:03 AM, Morne Joubert wrote: > > Hi, > > I am totally new with Python and need some pointers on how to get > Python 2.5 to call a .NET 2.0 assembly. > > I have been using the normal python distribution c:\python25 (using > pyDev and Eclipse) > > I installed python .NET at C:\Program Files\PythonNet and then pointed > pyDev at this folder but then it complained about language errors. > > I assume this is due to the differences between Python 2.3 and 2.5 > > So my question in a nutshell is.... > > What do I need to do to get Python 2.5 to call a .NET 2.0 assemble ? > > Do I need to somehow rebuild Python.NET ? > > Best regards, > > Morn? Joubert > > --------------------------------------------------------------------- > This transmission (including any attachments) may contain confidential > information, privileged material (including material protected by the > solicitor-client or other applicable privileges), or constitute > non-public information. Any use of this information by anyone other > than the intended recipient is prohibited. If you have received this > transmission in error, please immediately reply to the sender and > delete this information from your system. Use, dissemination, > distribution, or reproduction of this transmission by unintended > recipients is not authorized and may be unlawful. > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjoubert at rim.com Fri Sep 17 15:00:34 2010 From: mjoubert at rim.com (Morne Joubert) Date: Fri, 17 Sep 2010 14:00:34 +0100 Subject: [Python.NET] Support for Python 2.6 & .NET 2.0 Message-ID: The latest 2.5 binaries for .NET 2.0 works very well so my next question is about support for Python 2.6. All I need is the binaries (no installer needed). Can I create the binaries myself for 2.6 by compiling the source or could the 2.6 binaries for .NET 2.0 be added to the download section ? I only need very simple .NET 2.0 functionality. Regards, Morn? Joubert __________________________________________________________________ Tools, Development Systems & Testing Research In Motion UK Limited (Cambridge) Harston Mill, Royston Road, Harston, Cambridgeshire, CB22 7GG. Mobile: +44 (0)7786 510246, switchboard/fax: +44 (0)1223 8751800 --------------------------------------------------------------------- This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. -------------- next part -------------- An HTML attachment was scrubbed... URL: From barton at BCDesignsWell.com Sun Sep 19 09:16:37 2010 From: barton at BCDesignsWell.com (Barton) Date: Sun, 19 Sep 2010 00:16:37 -0700 Subject: [Python.NET] Support for Python 2.6 & .NET 2.0 In-Reply-To: References: Message-ID: <4C95B8D5.3040504@BCDesignsWell.com> Technically, it's probably fair to say that most folks are developing with .net 3.5 (that means Visual Studio 2008 on Windows) which is what's on my machine. I'm tempted to commit my project settings to the SVN, but fear that I may be jumping the gun there. If you are using VS 2005 (but NOT the Express version because it doesn't seem to support projects in sub-directories), then you should be able to compile from the current SVN source directly. Otherwise, there may be some tinkering with VS project settings involved. It's a useful thing to be able to do, but it's also quite easy for me to add the files to the project download area. -barton On 9/17/2010 6:00 AM, Morne Joubert wrote: > > The latest 2.5 binaries for .NET 2.0 works very well so my next > question is about support for Python 2.6. > > All I need is the binaries (no installer needed). > > Can I create the binaries myself for 2.6 by compiling the source or > could the 2.6 binaries for .NET 2.0 be added to the download section ? > > I only need very simple .NET 2.0 functionality. > > Regards, > > Morn? Joubert > > __________________________________________________________________ > > Tools, Development Systems & Testing > > Research In Motion UK Limited (Cambridge) > > Harston Mill, Royston Road, Harston, Cambridgeshire, CB22 7GG. > > Mobile: +44 (0)7786 510246, switchboard/fax: +44 (0)1223 8751800 > > --------------------------------------------------------------------- > This transmission (including any attachments) may contain confidential > information, privileged material (including material protected by the > solicitor-client or other applicable privileges), or constitute > non-public information. Any use of this information by anyone other > than the intended recipient is prohibited. If you have received this > transmission in error, please immediately reply to the sender and > delete this information from your system. Use, dissemination, > distribution, or reproduction of this transmission by unintended > recipients is not authorized and may be unlawful. > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From barton at BCDesignsWell.com Sun Sep 19 17:59:32 2010 From: barton at BCDesignsWell.com (Barton) Date: Sun, 19 Sep 2010 08:59:32 -0700 Subject: [Python.NET] This assembly is built by a runtime newer than t he currently loaded runtime In-Reply-To: References: Message-ID: <4C963364.4050205@BCDesignsWell.com> Has anyone noticed that buildclrmodule.bat seems to have two copies of the exact same set of commands??? On 8/17/2010 1:11 AM, Dave wrote: > I needed to access .NET dlls compiled for .NET4 and ran into the error: > > System.BadImageFormatException: This assembly is built by a runtime newer than t > he currently loaded runtime and cannot be loaded. (Exception from HRESULT: 0x801 > 3101B) > > So I attempted to recompile PythonDotNET for .NET4. In VS2010 I changed all the > project targets to be .NET4 and it compiled fine with only a couple of errors > about System.Security.Permissions.SecurityAction.RequestMinimum being obsolete. > Unfortunately when I tried to import clr I got the following error: > > SystemError: dynamic module not initialized properly > > Looking further into it I found that in buildclrmodule.bat lines 33& 66 > referenced the .NET2 idalsm.exe: > > %windir%\Microsoft.NET\Framework\v2.0.50727\ilasm /nologo /quiet /dll > %ILASM_EXTRA_ARGS% /include=%INCLUDE_PATH% /output=%OUTPUT_PATH% %INPUT_PATH% > > I changed this to reference the .NET4 version: > > %windir%\Microsoft.NET\Framework\v4.0.30319\ilasm /nologo /quiet /dll > %ILASM_EXTRA_ARGS% /include=%INCLUDE_PATH% /output=%OUTPUT_PATH% %INPUT_PATH% > > ...and everything works perfectly! > > HTH, > Dave > > NB: Apologies if this appears twice - I sent it from a different account > previously and don't think it made it through. > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet >