From WWatts at vtrIT.com Mon Mar 12 23:34:16 2012 From: WWatts at vtrIT.com (Watts, Wendy) Date: Mon, 12 Mar 2012 15:34:16 -0700 Subject: [Python.NET] Job opening- Python Engineer Message-ID: <0E23478CC3BCA649B6E08B0A78691B9C5CC14B@CA100EX5.west.vis.com> Hello, my name is Wendy; I am a IT recruiter for vtrIT which is a division of Volt Workforce Technical Solutions located in San Francisco. I have an urgent Senior and Junior Python Engineer positions open for a client located in CA. I am reaching out to you in finding out your status of new opportunity, and if we can speak verbal? We will pay travel expenses. Please job description for your review? Specific's of the positions are as follows: * Job Title - one Sr. Python Engineer and 2 (mid-level) Python Engineers * Location: It must be 100% onsite at client location in Mountain View, California. * Duration: six-month contract If interested please forward me your resume a word attachment and I will call you ASAP. Email: wwatts at vtrit.com Wendy Watts IT Recruiter VTRIT 100 First Street, Suite 200 I San Francisco, CA 55120 t: 415.536.5844 I f: 415.536.2845 wwatts at vtrit .com | vtrit.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Liam.Corrigan at allenvanguard.com Thu Mar 22 21:27:56 2012 From: Liam.Corrigan at allenvanguard.com (Liam Corrigan) Date: Thu, 22 Mar 2012 16:27:56 -0400 Subject: [Python.NET] import clr_2, import clr_4 vs import clr Message-ID: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> Hi guys, I've been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I'd like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll's with new names and matching .NET version support? Liam Corrigan This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad at fie.us Thu Mar 22 22:00:09 2012 From: brad at fie.us (Brad Friedman) Date: Thu, 22 Mar 2012 17:00:09 -0400 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> Message-ID: Silly question: isn't a .net 2.0 assembly backwards compatible with a .net 4.0 runtime? Why do you actually need to run a physically separate runtime? What is breaking? On Mar 22, 2012, at 4:27 PM, "Liam Corrigan" wrote: > Hi guys, > I?ve been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. > Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. > I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I?d like to have things such that I can operate in a python script something like this: > > import clr_2 > import clr_4 > > clr_2.AddReference("MyDOTNET_2.0_BasedLib") > clr_4.AddReference("MyDOTNET_4.0_BasedLib") > > > Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll?s with new names and matching .NET version support? > > > Liam Corrigan > > > IMPORTANT LEGAL NOTICE > This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From Liam.Corrigan at allenvanguard.com Thu Mar 22 22:02:42 2012 From: Liam.Corrigan at allenvanguard.com (Liam Corrigan) Date: Thu, 22 Mar 2012 17:02:42 -0400 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> Message-ID: <73FD8AF2EBB1814B838F85F75558AACD074BFA0A@exchange.allenvanguard.local> The one lib that has issues, includes some cpp runtime stuff that needs to be changed. I?ve done it in the past, but it was a pain and is not our production code ? which I need to test. All the other .NET libs that I use targeted against 2.0, worked in the 4.0 .NET python. From: Brad Friedman [mailto:brad at fie.us] Sent: March-22-12 5:00 PM To: Liam Corrigan Cc: Subject: Re: [Python.NET] import clr_2, import clr_4 vs import clr Silly question: isn't a .net 2.0 assembly backwards compatible with a .net 4.0 runtime? Why do you actually need to run a physically separate runtime? What is breaking? On Mar 22, 2012, at 4:27 PM, "Liam Corrigan" wrote: Hi guys, I?ve been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I?d like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll?s with new names and matching .NET version support? Liam Corrigan IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet = This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Liam.Corrigan at allenvanguard.com Thu Mar 22 22:09:20 2012 From: Liam.Corrigan at allenvanguard.com (Liam Corrigan) Date: Thu, 22 Mar 2012 17:09:20 -0400 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> Message-ID: <73FD8AF2EBB1814B838F85F75558AACD074BFA12@exchange.allenvanguard.local> I make a reference to System, I need to do it through from clr. >>> import System Traceback (most recent call last): File "", line 1, in ImportError: No module named System >>> import clr >>> clr.AddReference("System") >>> So I figured if I had a 'import clr_2', Then the call to 'clr_2.AddReference("System") would call the 2.0 version of System. From: Tribble, Brett [mailto:btribble at ea.com] Sent: March-22-12 4:59 PM To: Liam Corrigan; pythondotnet at python.org Subject: RE: import clr_2, import clr_4 vs import clr I would say you could just dupe the projects under the solution and change the target info, but how are you going to control which one handles imports IE "import System"? From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Liam Corrigan Sent: Thursday, March 22, 2012 1:28 PM To: pythondotnet at python.org Subject: [Python.NET] import clr_2, import clr_4 vs import clr Hi guys, I've been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I'd like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll's with new names and matching .NET version support? Liam Corrigan IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Thu Mar 22 22:19:32 2012 From: btribble at ea.com (Tribble, Brett) Date: Thu, 22 Mar 2012 14:19:32 -0700 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: <73FD8AF2EBB1814B838F85F75558AACD074BFA0A@exchange.allenvanguard.local> References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> <73FD8AF2EBB1814B838F85F75558AACD074BFA0A@exchange.allenvanguard.local> Message-ID: might any of this help? http://stackoverflow.com/questions/2455654/what-additional-configuration-is-necessary-to-reference-a-net-2-0-mixed-mode http://stackoverflow.com/questions/3267491/when-linking-a-net-2-0-managed-assembly-from-a-net-4-0-application-which-fram see the answer by ?htw? http://blogs.msdn.com/b/dotnet/archive/2009/06/03/in-process-side-by-side-part1.aspx From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Liam Corrigan Sent: Thursday, March 22, 2012 2:03 PM To: Brad Friedman; pythondotnet at python.org Subject: Re: [Python.NET] import clr_2, import clr_4 vs import clr The one lib that has issues, includes some cpp runtime stuff that needs to be changed. I?ve done it in the past, but it was a pain and is not our production code ? which I need to test. All the other .NET libs that I use targeted against 2.0, worked in the 4.0 .NET python. From: Brad Friedman [mailto:brad at fie.us] Sent: March-22-12 5:00 PM To: Liam Corrigan Cc: Subject: Re: [Python.NET] import clr_2, import clr_4 vs import clr Silly question: isn't a .net 2.0 assembly backwards compatible with a .net 4.0 runtime? Why do you actually need to run a physically separate runtime? What is breaking? On Mar 22, 2012, at 4:27 PM, "Liam Corrigan" > wrote: Hi guys, I?ve been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I?d like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll?s with new names and matching .NET version support? Liam Corrigan IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet = IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Thu Mar 22 21:59:10 2012 From: btribble at ea.com (Tribble, Brett) Date: Thu, 22 Mar 2012 13:59:10 -0700 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> Message-ID: I would say you could just dupe the projects under the solution and change the target info, but how are you going to control which one handles imports IE "import System"? From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Liam Corrigan Sent: Thursday, March 22, 2012 1:28 PM To: pythondotnet at python.org Subject: [Python.NET] import clr_2, import clr_4 vs import clr Hi guys, I've been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I'd like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll's with new names and matching .NET version support? Liam Corrigan IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brad at fie.us Thu Mar 22 23:23:06 2012 From: brad at fie.us (Bradley Friedman) Date: Thu, 22 Mar 2012 18:23:06 -0400 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> Message-ID: <3ED1208E-A275-44ED-BF3E-285D4E4B9DE0@fie.us> If things get really bad, you could execute two separate python interpreters and communicate via an RMI solution, such as say, PYRO. It's a hack. But it might work for the time being? On Mar 22, 2012, at 4:59 PM, Tribble, Brett wrote: > I would say you could just dupe the projects under the solution and change the target info, but how are you going to control which one handles imports IE ?import System?? > > From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Liam Corrigan > Sent: Thursday, March 22, 2012 1:28 PM > To: pythondotnet at python.org > Subject: [Python.NET] import clr_2, import clr_4 vs import clr > > Hi guys, > I?ve been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. > Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. > I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I?d like to have things such that I can operate in a python script something like this: > > import clr_2 > import clr_4 > > clr_2.AddReference("MyDOTNET_2.0_BasedLib") > clr_4.AddReference("MyDOTNET_4.0_BasedLib") > > > Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll?s with new names and matching .NET version support? > > > Liam Corrigan > > > IMPORTANT LEGAL NOTICE > This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet Bradley Friedman VFX and Animation Consulting and Technology http://www.fie.us/ brad at fie.us -------------- next part -------------- An HTML attachment was scrubbed... URL: From Liam.Corrigan at allenvanguard.com Fri Mar 23 18:17:40 2012 From: Liam.Corrigan at allenvanguard.com (Liam Corrigan) Date: Fri, 23 Mar 2012 13:17:40 -0400 Subject: [Python.NET] import clr_2, import clr_4 vs import clr References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> Message-ID: <73FD8AF2EBB1814B838F85F75558AACD074BFC49@exchange.allenvanguard.local> Opening up our existing products native lib output to mixed mode proved to be a real pain, so I took your first suggestion Brett. After changing the project to .NET 4.0, changing the target info to 'clr4.pyd' and changing all clr related strings in all the files to clr4, I have it working. In my implementation, all my custom rack code and .NET support are called in from testlib >>> import testlib >>> twoDotOAssemblies = testlib.clr.ListAssemblies(True) >>> twoDotOAssemblies[0] u'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >>> fourDotOAssemblies = testlib.clr4.ListAssemblies(True) >>> fourDotOAssemblies[0] u'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' I agree, it is fuzzy to me as to what is happening behind the scenes when I do: testlib.clr.AddReference("System") >>> testlib.clr4.AddReference("System") ...but for my purposes, it doesn't matter. I don't do any dot net calls other than my custom packaged C# library functions in .NET. When I do want to play in that realm, I use IronPython but I generally just write what I need in C# and then call it in pythonnet Thanks for the help! From: Liam Corrigan Sent: March-22-12 5:09 PM To: pythondotnet at python.org Subject: RE: import clr_2, import clr_4 vs import clr I make a reference to System, I need to do it through from clr. >>> import System Traceback (most recent call last): File "", line 1, in ImportError: No module named System >>> import clr >>> clr.AddReference("System") >>> So I figured if I had a 'import clr_2', Then the call to 'clr_2.AddReference("System") would call the 2.0 version of System. From: Tribble, Brett [mailto:btribble at ea.com] Sent: March-22-12 4:59 PM To: Liam Corrigan; pythondotnet at python.org Subject: RE: import clr_2, import clr_4 vs import clr I would say you could just dupe the projects under the solution and change the target info, but how are you going to control which one handles imports IE "import System"? From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Liam Corrigan Sent: Thursday, March 22, 2012 1:28 PM To: pythondotnet at python.org Subject: [Python.NET] import clr_2, import clr_4 vs import clr Hi guys, I've been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I'd like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll's with new names and matching .NET version support? Liam Corrigan IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Fri Mar 23 19:28:10 2012 From: btribble at ea.com (Tribble, Brett) Date: Fri, 23 Mar 2012 11:28:10 -0700 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: <73FD8AF2EBB1814B838F85F75558AACD074BFC49@exchange.allenvanguard.local> References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> <73FD8AF2EBB1814B838F85F75558AACD074BFC49@exchange.allenvanguard.local> Message-ID: Scary voodoo. (not significantly scarier voodoo than what python.net itself does though) Glad to hear you were able to make it work. I'll file this away under "things I hope to never have to duplicate". From: Liam Corrigan [mailto:Liam.Corrigan at allenvanguard.com] Sent: Friday, March 23, 2012 10:18 AM To: pythondotnet at python.org Cc: Tribble, Brett Subject: RE: import clr_2, import clr_4 vs import clr Opening up our existing products native lib output to mixed mode proved to be a real pain, so I took your first suggestion Brett. After changing the project to .NET 4.0, changing the target info to 'clr4.pyd' and changing all clr related strings in all the files to clr4, I have it working. In my implementation, all my custom rack code and .NET support are called in from testlib >>> import testlib >>> twoDotOAssemblies = testlib.clr.ListAssemblies(True) >>> twoDotOAssemblies[0] u'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >>> fourDotOAssemblies = testlib.clr4.ListAssemblies(True) >>> fourDotOAssemblies[0] u'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' I agree, it is fuzzy to me as to what is happening behind the scenes when I do: testlib.clr.AddReference("System") >>> testlib.clr4.AddReference("System") ...but for my purposes, it doesn't matter. I don't do any dot net calls other than my custom packaged C# library functions in .NET. When I do want to play in that realm, I use IronPython but I generally just write what I need in C# and then call it in pythonnet Thanks for the help! From: Liam Corrigan Sent: March-22-12 5:09 PM To: pythondotnet at python.org Subject: RE: import clr_2, import clr_4 vs import clr I make a reference to System, I need to do it through from clr. >>> import System Traceback (most recent call last): File "", line 1, in ImportError: No module named System >>> import clr >>> clr.AddReference("System") >>> So I figured if I had a 'import clr_2', Then the call to 'clr_2.AddReference("System") would call the 2.0 version of System. From: Tribble, Brett [mailto:btribble at ea.com] Sent: March-22-12 4:59 PM To: Liam Corrigan; pythondotnet at python.org Subject: RE: import clr_2, import clr_4 vs import clr I would say you could just dupe the projects under the solution and change the target info, but how are you going to control which one handles imports IE "import System"? From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Liam Corrigan Sent: Thursday, March 22, 2012 1:28 PM To: pythondotnet at python.org Subject: [Python.NET] import clr_2, import clr_4 vs import clr Hi guys, I've been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I'd like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll's with new names and matching .NET version support? Liam Corrigan IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From WWatts at vtrIT.com Fri Mar 23 19:41:55 2012 From: WWatts at vtrIT.com (Watts, Wendy) Date: Fri, 23 Mar 2012 11:41:55 -0700 Subject: [Python.NET] import clr_2, import clr_4 vs import clr In-Reply-To: <73FD8AF2EBB1814B838F85F75558AACD074BFC49@exchange.allenvanguard.local> References: <73FD8AF2EBB1814B838F85F75558AACD074BF9F4@exchange.allenvanguard.local> <73FD8AF2EBB1814B838F85F75558AACD074BFC49@exchange.allenvanguard.local> Message-ID: <0E23478CC3BCA649B6E08B0A78691B9C7566F0@CA100EX5.west.vis.com> Please remove me from your mailing list. Thank you. Wendy Watts IT Recruiter VTRIT 100 First Street, Suite 200 I San Francisco, CA 55120 t: 415.536.0871 I f: 415.536.1419 wwatts at vtrit .com | vtrit.com From: pythondotnet-bounces+wwatts=vtrit.com at python.org [mailto:pythondotnet-bounces+wwatts=vtrit.com at python.org] On Behalf Of Liam Corrigan Sent: Friday, March 23, 2012 10:18 AM To: pythondotnet at python.org Subject: Re: [Python.NET] import clr_2, import clr_4 vs import clr Opening up our existing products native lib output to mixed mode proved to be a real pain, so I took your first suggestion Brett. After changing the project to .NET 4.0, changing the target info to 'clr4.pyd' and changing all clr related strings in all the files to clr4, I have it working. In my implementation, all my custom rack code and .NET support are called in from testlib >>> import testlib >>> twoDotOAssemblies = testlib.clr.ListAssemblies(True) >>> twoDotOAssemblies[0] u'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' >>> fourDotOAssemblies = testlib.clr4.ListAssemblies(True) >>> fourDotOAssemblies[0] u'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' I agree, it is fuzzy to me as to what is happening behind the scenes when I do: testlib.clr.AddReference("System") >>> testlib.clr4.AddReference("System") ...but for my purposes, it doesn't matter. I don't do any dot net calls other than my custom packaged C# library functions in .NET. When I do want to play in that realm, I use IronPython but I generally just write what I need in C# and then call it in pythonnet Thanks for the help! From: Liam Corrigan Sent: March-22-12 5:09 PM To: pythondotnet at python.org Subject: RE: import clr_2, import clr_4 vs import clr I make a reference to System, I need to do it through from clr. >>> import System Traceback (most recent call last): File "", line 1, in ImportError: No module named System >>> import clr >>> clr.AddReference("System") >>> So I figured if I had a 'import clr_2', Then the call to 'clr_2.AddReference("System") would call the 2.0 version of System. From: Tribble, Brett [mailto:btribble at ea.com] Sent: March-22-12 4:59 PM To: Liam Corrigan; pythondotnet at python.org Subject: RE: import clr_2, import clr_4 vs import clr I would say you could just dupe the projects under the solution and change the target info, but how are you going to control which one handles imports IE "import System"? From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Liam Corrigan Sent: Thursday, March 22, 2012 1:28 PM To: pythondotnet at python.org Subject: [Python.NET] import clr_2, import clr_4 vs import clr Hi guys, I've been using python .NET 2.0 in python 2.7.2 successfully for some time now and have also used the .NET 4.0 version, but of course I need to replace the clr.pyd and Python.Runtime.dll with the .NET 4.0 versions. Although most of my 2.0 libs work over the 4.0 version, there is one in house library targeted against .NET 2.0 that will not, without some awkward hacks. I need to be able to call into libraries written against both .NET 2.0 and 4.0, as separated calls - ideally, I'd like to have things such that I can operate in a python script something like this: import clr_2 import clr_4 clr_2.AddReference("MyDOTNET_2.0_BasedLib") clr_4.AddReference("MyDOTNET_4.0_BasedLib") Are there any settings in the source build that I can do, to kick out two separate clr.pyd and Python.Runtime.dll's with new names and matching .NET version support? Liam Corrigan IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. IMPORTANT LEGAL NOTICE This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmbeldalois at gmail.com Tue Mar 27 17:52:19 2012 From: jmbeldalois at gmail.com (Juanma Belda) Date: Tue, 27 Mar 2012 17:52:19 +0200 Subject: [Python.NET] Struggling with a library Message-ID: Dear all, I'm a newbie in pythonnet and I have the following problem. I am trying to load an assembly from a .dll file. Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2 On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet. I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others? Kind regards, -- Juanma -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Tue Mar 27 19:53:46 2012 From: btribble at ea.com (Tribble, Brett) Date: Tue, 27 Mar 2012 10:53:46 -0700 Subject: [Python.NET] Struggling with a library In-Reply-To: References: Message-ID: Do you have the same versions of .NET installed on both machines? From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Juanma Belda Sent: Tuesday, March 27, 2012 8:52 AM To: pythondotnet at python.org Subject: [Python.NET] Struggling with a library Dear all, I'm a newbie in pythonnet and I have the following problem. I am trying to load an assembly from a .dll file. Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2 On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet. I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others? Kind regards, -- Juanma -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmbeldalois at gmail.com Thu Mar 29 10:31:14 2012 From: jmbeldalois at gmail.com (Juanma Belda) Date: Thu, 29 Mar 2012 10:31:14 +0200 Subject: [Python.NET] Struggling with a library In-Reply-To: References: Message-ID: Checked. I have Microsfot .NET framework 2.0 Service Pack 2 and Microsoft .NET framewor 3.0 Service Pack 2 on both computers. Kind regards 2012/3/27 Tribble, Brett > Go to Windows Update and make sure that all versions of .NET are installed. > **** > > ** ** > > *From:* Juanma Belda [mailto:jmbeldalois at gmail.com] > *Sent:* Tuesday, March 27, 2012 12:50 PM > *To:* Tribble, Brett > *Subject:* Re: [Python.NET] Struggling with a library**** > > ** ** > > Sorry for my ignorance. If I type:**** > > ** ** > > print System.Version()**** > > ** ** > > I get: 0.0**** > > ** ** > > This in the machine where everything rules (I don't have access to the > others from home)**** > > ** ** > > ** ** > > 2012/3/27 Tribble, Brett **** > > Do you have the same versions of .NET installed on both machines?**** > > **** > > *From:* pythondotnet-bounces+btribble=ea.com at python.org [mailto: > pythondotnet-bounces+btribble=ea.com at python.org] *On Behalf Of *Juanma > Belda > *Sent:* Tuesday, March 27, 2012 8:52 AM > *To:* pythondotnet at python.org > *Subject:* [Python.NET] Struggling with a library**** > > **** > > Dear all, > > I'm a newbie in pythonnet and I have the following problem. > I am trying to load an assembly from a .dll file. > Currently I am running the trials over Windows XP and python 2.6.5 and > pythonnet version 2.0 alpha 2 > > On my computer there is no problem on loading the library. However in > another computer (notebook) with the same installation (the library in the > path etc) the system fails to do the AddReference. However if I ask for > findAssemblies the system is able to find it. I can add the Reference to > the test dll that come with the pythonnet. > > I was assuming a mismatch on the .net versions, but then: why can l loaded > from some computers and not from some others? > > Kind regards, > > -- > Juanma**** > > ** ** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Thu Mar 29 18:40:56 2012 From: btribble at ea.com (Tribble, Brett) Date: Thu, 29 Mar 2012 09:40:56 -0700 Subject: [Python.NET] Struggling with a library In-Reply-To: References: Message-ID: Hmmm, here are a couple more ideas: Are both machines 32 or 64 bit? Are both copies of Python also 32 or 64 bit? You could be attempting to load a 32 bit dll on a 64 bit machine, or visa versa. In theory, if the assembly is C#, or VB.NET, you can compile the assembly for "Any CPU", and it should work on both. Alternatively, you could use 32bit Python on both machines, and explicitly compile the assembly for x86 (32bit). I have also found that loading assemblies is also much more reliable if the internal namespace of the assembly matches the name of the resulting .dll. From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Juanma Belda Sent: Thursday, March 29, 2012 1:31 AM To: pythondotnet at python.org Subject: Re: [Python.NET] Struggling with a library Checked. I have Microsfot .NET framework 2.0 Service Pack 2 and Microsoft .NET framewor 3.0 Service Pack 2 on both computers. Kind regards 2012/3/27 Tribble, Brett > Go to Windows Update and make sure that all versions of .NET are installed. From: Juanma Belda [mailto:jmbeldalois at gmail.com] Sent: Tuesday, March 27, 2012 12:50 PM To: Tribble, Brett Subject: Re: [Python.NET] Struggling with a library Sorry for my ignorance. If I type: print System.Version() I get: 0.0 This in the machine where everything rules (I don't have access to the others from home) 2012/3/27 Tribble, Brett > Do you have the same versions of .NET installed on both machines? From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Juanma Belda Sent: Tuesday, March 27, 2012 8:52 AM To: pythondotnet at python.org Subject: [Python.NET] Struggling with a library Dear all, I'm a newbie in pythonnet and I have the following problem. I am trying to load an assembly from a .dll file. Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2 On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet. I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others? Kind regards, -- Juanma -------------- next part -------------- An HTML attachment was scrubbed... URL: