From Ashcroft at Physics.LeidenUniv.nl Mon Jun 8 20:00:47 2009 From: Ashcroft at Physics.LeidenUniv.nl (Ashcroft, B.A.) Date: Mon, 8 Jun 2009 20:00:47 +0200 Subject: [Python.NET] Array problem Message-ID: <0F1F138134B565488F9F8C37E8EE0716025028D0@mail1.Physics.LeidenUniv.nl> Hello, I have a microscopy program that produces images at a fast rate, I would like to be able to process these images as they are produced with scipy. I tried pythonnet, but the arrays do not seem to work or are so slow that they would be useless. Here is my code. def ImageProcess(self, cImage): a = cImage.GetArrayDouble() Y = zeros( (cImage.Width,cImage.Height) ) #Python does not like .net arrays. You must change it over to python array to use it #This code is so slow that it is impossible to use. for i in range(0,cImage.Width): for j in range(0,cImage.Height): Y[i,j]=a[i,j] #Whatever is placed in the array is not a type that agrees with scipy as this function fails as well F =fft(Y) #I am not sure what kind of array to accept on the c# side as I am not sure what the return value is test = CoreImage.CreateImageFromArray(F) return cImage Thanks for your help From Prajakta.Chaudhari at mastek.com Mon Jun 8 11:46:26 2009 From: Prajakta.Chaudhari at mastek.com (Prajakta Vasant Chaudhari) Date: Mon, 8 Jun 2009 15:16:26 +0530 Subject: [Python.NET] Invoking script python from C# Message-ID: <697B15BDCE7BED458A324B1B4D09463D4CD9EDEFE4@IND-MHP1MCL001.mastek.com> Any answer for this? MASTEK LTD. Making a valuable difference Mastek in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.mcmahon at autodesk.com Wed Jun 10 04:00:37 2009 From: mark.mcmahon at autodesk.com (Mark McMahon) Date: Tue, 9 Jun 2009 19:00:37 -0700 Subject: [Python.NET] Invoking script python from C# In-Reply-To: <697B15BDCE7BED458A324B1B4D09463D4CD9EDEFE4@IND-MHP1MCL001.mastek.com> References: <697B15BDCE7BED458A324B1B4D09463D4CD9EDEFE4@IND-MHP1MCL001.mastek.com> Message-ID: <36FA17CA56D6A84D9E422A359CB4F0475D86B7ABEC@ADSK-NAMSG-02.MGDADSK.autodesk.com> Yes: http://catb.org/esr/faqs/smart-questions.html From: pythondotnet-bounces+mark.mcmahon=autodesk.com at python.org [mailto:pythondotnet-bounces+mark.mcmahon=autodesk.com at python.org] On Behalf Of Prajakta Vasant Chaudhari Sent: Monday, June 08, 2009 5:46 PM To: pythondotnet at python.org Subject: [Python.NET] Invoking script python from C# Any answer for this? MASTEK LTD. Making a valuable difference Mastek in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From MHarelick at ise.com Wed Jun 10 15:15:02 2009 From: MHarelick at ise.com (Harelick, Matthew) Date: Wed, 10 Jun 2009 09:15:02 -0400 Subject: [Python.NET] Reasons to use ironpython Message-ID: <2311471F8507984BBFCCB85ABD03B06823D575149A@OFFC-MAIL01.office.iseoptions.com> Hi: My background is primarily UNIX. I have been programming in C, TCL, Perl, and Python in UNIX and Linux for a long time. I recently started working in Visual Studio and C#. Visual Studio and C# make everything very easy. Python was nice when you didn't have the convenience of Visual Studio and intellisense with a nice debugger. In the windows world I see no major reason not to use C#. Why would I want to use IronPython? Thanks Matthew Harelick -------------- next part -------------- An HTML attachment was scrubbed... URL: From honey33145 at gmail.com Thu Jun 11 13:44:23 2009 From: honey33145 at gmail.com (navneet khanna) Date: Thu, 11 Jun 2009 17:14:23 +0530 Subject: [Python.NET] PythonDotNet Digest, Vol 67, Issue 3 In-Reply-To: References: Message-ID: Iron Python is used to use the dll created in .net. Dlls created in .net are of different format as that of c, c++ dll. Regards On Thu, Jun 11, 2009 at 3:30 PM, wrote: > Send PythonDotNet mailing list submissions to > pythondotnet at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/pythondotnet > or, via email, send a message with subject or body 'help' to > pythondotnet-request at python.org > > You can reach the person managing the list at > pythondotnet-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of PythonDotNet digest..." > > > Today's Topics: > > 1. Reasons to use ironpython (Harelick, Matthew) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 10 Jun 2009 09:15:02 -0400 > From: "Harelick, Matthew" > To: "'pythondotnet at python.org'" > Subject: [Python.NET] Reasons to use ironpython > Message-ID: > < > 2311471F8507984BBFCCB85ABD03B06823D575149A at OFFC-MAIL01.office.iseoptions.com > > > > Content-Type: text/plain; charset="us-ascii" > > Hi: > > > My background is primarily UNIX. I have been programming in C, TCL, Perl, > and Python in UNIX and Linux for a long time. > > I recently started working in Visual Studio and C#. > > Visual Studio and C# make everything very easy. Python was nice when you > didn't have the convenience of Visual Studio and intellisense with a nice > debugger. > > In the windows world I see no major reason not to use C#. > > Why would I want to use IronPython? > > Thanks > > Matthew Harelick > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/pythondotnet/attachments/20090610/f528777f/attachment-0001.htm > > > > ------------------------------ > > _______________________________________________ > PythonDotNet mailing list > PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet > > > End of PythonDotNet Digest, Vol 67, Issue 3 > ******************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Thu Jun 11 15:42:22 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Thu, 11 Jun 2009 14:42:22 +0100 Subject: [Python.NET] Reasons to use ironpython In-Reply-To: <2311471F8507984BBFCCB85ABD03B06823D575149A@OFFC-MAIL01.office.iseoptions.com> References: <2311471F8507984BBFCCB85ABD03B06823D575149A@OFFC-MAIL01.office.iseoptions.com> Message-ID: <4A3109BE.3000200@voidspace.org.uk> Hello Matthew, Why send an email about IronPython to the Python.NET mailing list? (Sorry for multiple replies by the way - my client went bat-crazy on me.) Both Python and C# are 'general purpose' programming langugages suited to a wide range of problem domains. Choice of programming language is therefore *usually* a matter of aesthetics, what you are used to, personal workflow, issues within a team and so on rather than a matter of which is more appropriate to the job. Obviously there are exceptions where one language is obviously more appropriate or obviously inappropriate but these are the exception rather than the rule. Place where you should *obviously* use IronPython: * For embedding as a user scripting language / plugin mechanism or are doing runtime code generation Place where you should obviously use C#: * You have already implemented in a dynamic language, profiled and optimised, and *need* faster performance than the dynamic language is capable of Other than that the choice is yours! Reasons why I / some people prefer IronPython: * The interactive environment is an invaluable tool for exploration * No need to create a whole 'object-oriented-application' for simple tasks where it is not needed * Without a compile phase and with duck typing / dynamic typing IronPython makes it *dramatically* easier to do test driven development or even normal unit testing * Python has many language capabilities missing from C# which make it a flexible and concise language. These include: - Duck typing (no need for interfaces) - Heterogeneous containers (no need for generics) - Pain free introspection (no need for the complexity inherent in System.Reflection) - Metaprogramming including good old eval, type creation at runtime, decorators and descriptors - Late binding and runtime type dispatch - 'Little features' like tuple unpacking, returning multiple values, everything is an object (including primitives, functions, classes and modules) There are things that C# has that Python doesn't (compile time checking, method overloading, access to .NET attributes), but choose whichever you prefer. :-) Michael Harelick, Matthew wrote: > > Hi: > > My background is primarily UNIX. I have been programming in C, TCL, > Perl, and Python in UNIX and Linux for a long time. > > I recently started working in Visual Studio and C#. > > Visual Studio and C# make everything very easy. Python was nice when > you didn?t have the convenience of Visual Studio and intellisense with > a nice debugger. > > In the windows world I see no major reason not to use C#. > > Why would I want to use IronPython? > > Thanks > > Matthew Harelick > > ------------------------------------------------------------------------ > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -- http://www.ironpythoninaction.com/ From calmasy at gmail.com Sat Jun 20 23:26:53 2009 From: calmasy at gmail.com (=?ISO-8859-1?Q?Count_L=E1szl=F3_de_Alm=E1sy?=) Date: Sat, 20 Jun 2009 15:26:53 -0600 Subject: [Python.NET] System.InvalidProgramException: Invalid IL code Message-ID: -- Cheers, L?szl? -------------- next part -------------- Greetings, I'm attempting to use Python.NET on my Linux/Mono 2.4 system as a replacement for IronPython, which is not an easy system to use under Linux. e.g, the interactive interpreter doesn't understand Ctrl^D or Ctrl^C and has no command-line history, and I lose many of the standard Python modules I'm used to working with. Problem is, some code that works fine under IronPython is blowing up under Python.NET and I'm not able to figure out why. I'm hoping someone here could offer some insight into the following System.InvalidProgramException. ================================================== Traceback (most recent call last): File "./invite", line 24, in groupmgr.Invite(GroupKey, roles, target) System.InvalidProgramException: Invalid IL code in (wrapper runtime-invoke) OpenMetaverse.GroupManager:runtime_invoke_void__this___UUID_List`1_UUID (object,intptr,intptr,intptr): IL_0031: call 0x00000006 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] =================================================== My Python code that produces this, looks like the following: from OpenMetaverse import * from System import * from System.Collections.Generic import * GroupKey = UUID("44652c3f-2b9b-b926-308e-387639434ab4") target = UUID("ba36e228-1de0-460a-9219-c34c592e0ee1") everyone = UUID("00000000-0000-0000-0000-000000000000") roles = List[UUID]() roles.Add(everyone) groupmgr = GroupManager(client) groupmgr.Invite(GroupKey, roles, target) =================================================== seems to be the "groupmgr.Invite(GroupKey, roles, target)" line that is causing the System.InvalidProgramException. Any thoughts? From calmasy at gmail.com Sat Jun 20 23:28:38 2009 From: calmasy at gmail.com (=?ISO-8859-1?Q?Count_L=E1szl=F3_de_Alm=E1sy?=) Date: Sat, 20 Jun 2009 15:28:38 -0600 Subject: [Python.NET] System.InvalidProgramException: Invalid IL code In-Reply-To: References: Message-ID: Forgot to say, I included the body of my last message as a text attachment, so that gmail wouldn't destroy the formatting of the code and tracebacks... Thanks. -- Cheers, L?szl? From meetrohitpatil at gmail.com Wed Jun 24 13:47:42 2009 From: meetrohitpatil at gmail.com (Rohit Patil) Date: Wed, 24 Jun 2009 17:17:42 +0530 Subject: [Python.NET] PythonDotNet - more information required Message-ID: <7e3d37480906240447u6f192b20le4ed4f3e4153fe97@mail.gmail.com> Hi, I have downloaded the source code for Python for DotNet. I am going through the code. Is there any detailed document which describes how exactly it works internally, Architecture details etc. What exactly clr.pyd file does? Could you send me the source code for this? The current version is only supported on the clr 2.0, do you have any plans to release new version which uses .Net 3.5 framework? Your reply would be very much helpful for me. Thanks & Regards, Rohit -------------- next part -------------- An HTML attachment was scrubbed... URL: