From munawwarah05 at gmail.com Thu Feb 18 10:34:11 2010 From: munawwarah05 at gmail.com (munawwarah Chamroo) Date: Thu, 18 Feb 2010 13:34:11 +0400 Subject: [Python.NET] using c# method from python Message-ID: <50d53d491002180134s6b9baffepa3f97b7ce3af89d4@mail.gmail.com> Hi, I am currently developing an application where i need to call some c# methods from my python code. I want to know if this is possible to do using pythonnet and how to do it. for example i have a c# class foo and in foo i have a method bar() Now i need to call method bar() in my python code. How should i do this. Please help -------------- next part -------------- An HTML attachment was scrubbed... URL: From chintan.bhatt at etatvasoft.com Thu Feb 18 12:04:21 2010 From: chintan.bhatt at etatvasoft.com (chintan.bhatt at etatvasoft.com) Date: Thu, 18 Feb 2010 16:34:21 +0530 Subject: [Python.NET] use Python script into C#.net Message-ID: <000001cab08a$2633e0f0$729ba2d0$@bhatt@etatvasoft.com> Hi, We are currently developing an application where we need to call python script from c#.net code. We are using VS 2008 .Is it possible, if yes then how we can achieve that , we do not know anything about Python !!!! Best Regards, ---------------------------------------------------------------------------- ---------------------------------------------------- CHINTAN BHATT | PROJECT LEADER TatvaSoft CMMI Maturity level 3 Email Id: chintan.bhatt at etatvasoft.com Skype Id: tatva85 Website: http://www.tatvasoft.com ---------------------------------------------------------------------------- ---------------------------------------------------- This email is for the named person's use only and is confidential. No confidentiality or privilege is waived or lost by any mistransmission or miss delivery. If you receive this email in error, you must not use or disclose it or its contents or rely on it. If you are the intended recipient you must not copy, disclose or distribute this email without the prior consent of Tatvasoft. We exclude all liability for viruses or similar agents and for the personal views of our employees as expressed in any email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex at moreati.org.uk Thu Feb 18 15:02:58 2010 From: alex at moreati.org.uk (Alex Willmer) Date: Thu, 18 Feb 2010 14:02:58 +0000 Subject: [Python.NET] use Python script into C#.net In-Reply-To: <2111149059443679923@unknownmsgid> References: <2111149059443679923@unknownmsgid> Message-ID: <425e93af1002180602s172fc23fo32f0390f7286118a@mail.gmail.com> On 18 February 2010 11:04, wrote: > We are currently developing an application where we need to call python > script from c#.net code. In this direction (calling Python from C#) IronPython will serve you better, it is Python implemented on the .NET CLR. Python.NET has a different goal, calling .NET from CPython. > We are using VS 2008 ?Is it possible, if yes then how we can achieve that , > we do not know anything about Python !!!! It is possible, you should look at the IronPython project http://ironpython.net/ and some of their documentation http://ironpython.net/documentation/dotnet/dotnet.html#accessing-python-code-from-other-net-code Regards, Alex -- Alex Willmer http://moreati.org.uk/blog From btribble at ea.com Thu Feb 18 20:22:27 2010 From: btribble at ea.com (Tribble, Brett) Date: Thu, 18 Feb 2010 11:22:27 -0800 Subject: [Python.NET] using c# method from python In-Reply-To: <50d53d491002180134s6b9baffepa3f97b7ce3af89d4@mail.gmail.com> References: <50d53d491002180134s6b9baffepa3f97b7ce3af89d4@mail.gmail.com> Message-ID: Depending on how you're code works in C#, the way you access it from Python may vary, but the basic approach is: Compile your code as a .dll assembly, then from Python do: import clr # Imports the pythonnet clr stuff clr.AddReference("myAssembly.dll") myObjectHandle = myAssembly.myClass() myObjectHandle.bar() From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of munawwarah Chamroo Sent: Thursday, February 18, 2010 1:34 AM To: pythondotnet at python.org Subject: [Python.NET] using c# method from python Hi, I am currently developing an application where i need to call some c# methods from my python code. I want to know if this is possible to do using pythonnet and how to do it. for example i have a c# class foo and in foo i have a method bar() Now i need to call method bar() in my python code. How should i do this. Please help -------------- next part -------------- An HTML attachment was scrubbed... URL: From Vishal.Parikh at sungard.com Thu Feb 18 20:55:55 2010 From: Vishal.Parikh at sungard.com (Vishal.Parikh at sungard.com) Date: Thu, 18 Feb 2010 14:55:55 -0500 Subject: [Python.NET] Problem debugging to python.runtime.dll Message-ID: <97A3669B3D112840BA0C98A5EFEEC1D401347F0A@VOO-EXCHANGE07.internal.sungard.corp> Hi, We are actually using Python.Net with python 2.5 and I wanted to learn the internal architecture of the Python.Runtime.Dll. I have tried debugging the dll by attaching the process to python.exe but doesn't hit any break point. I don't know much about the compiler design and how it works internal but all I want is I should be able to debug how my C# instruction is getting executed using python.runtime.dll It would be really helpful if I get steps to debug it or get some sort of direction or architecture design diagram. Thanks and Regards, Vishal -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.hirschfeld at gazprom-mt.com Thu Feb 18 21:40:56 2010 From: david.hirschfeld at gazprom-mt.com (Dave Hirschfeld) Date: Thu, 18 Feb 2010 12:40:56 -0800 (PST) Subject: [Python.NET] Problem debugging to python.runtime.dll In-Reply-To: <97A3669B3D112840BA0C98A5EFEEC1D401347F0A@VOO-EXCHANGE07.internal.sungard.corp> References: <97A3669B3D112840BA0C98A5EFEEC1D401347F0A@VOO-EXCHANGE07.internal.sungard.corp> Message-ID: <27645311.post@talk.nabble.com> Vishal.Parikh wrote: > > We are actually using Python.Net with python 2.5 and I wanted to learn > the internal architecture of the Python.Runtime.Dll. I have tried > debugging the dll by attaching the process to python.exe but doesn't hit > any break point. I don't know much about the compiler design and how it > works internal but all I want is I should be able to debug how my C# > instruction is getting executed using python.runtime.dll > In the Debug Tab of the Properties dialog for your C# project choose "Start external program" for the Start Action and select the normal CPython executable - python.exe. In the "Command line arguments" put the full path of the python script which calls the C# function you want to debug. If you debug the project now it should run the python script and you should drop in to the c# debugger at the breakpoint you set in the function called by the Python script. HTH, Dave -- View this message in context: http://old.nabble.com/Problem-debugging-to-python.runtime.dll-tp27644956p27645311.html Sent from the Python - pythondotnet mailing list archive at Nabble.com. From chintan.bhatt at etatvasoft.com Mon Feb 22 08:07:06 2010 From: chintan.bhatt at etatvasoft.com (chintan.bhatt at etatvasoft.com) Date: Mon, 22 Feb 2010 12:37:06 +0530 Subject: [Python.NET] Hi .....Python.net sample demos Message-ID: <000b01cab38d$ae542070$0afc6150$@bhatt@etatvasoft.com> Hi, I want to run Pythinon.net Demo samples (C:\Program Files\PythonNet\demo) in c# , but do not know how to run it. Please help if anyone has already done it. Best Regards, ---------------------------------------------------------------------------- ---------------------------------------------------- CHINTAN BHATT | PROJECT LEADER TatvaSoft CMMI Maturity level 3 Email Id: chintan.bhatt at etatvasoft.com Skype Id: tatva85 Website: http://www.tatvasoft.com ---------------------------------------------------------------------------- ---------------------------------------------------- This email is for the named person's use only and is confidential. No confidentiality or privilege is waived or lost by any mistransmission or miss delivery. If you receive this email in error, you must not use or disclose it or its contents or rely on it. If you are the intended recipient you must not copy, disclose or distribute this email without the prior consent of Tatvasoft. We exclude all liability for viruses or similar agents and for the personal views of our employees as expressed in any email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From glancky at gmail.com Sat Feb 20 17:44:39 2010 From: glancky at gmail.com (=?GB2312?B?zfXz772j?=) Date: Sat, 20 Feb 2010 16:44:39 -0000 Subject: [Python.NET] Single file executable created by py2exe won't work Message-ID: <448c9f301002200844w13ec3fd6m1f9b979f5df3133@mail.gmail.com> Hi, I tryed to creat a single executable with py2exe. Its just a simple winform script. It wont work and gives a err log saying "MemoryLoadLibrary failed loading clr.pyd". If its not bundled everything works fine. Is there any work around? Many thanks for this wonderful project. -------------- next part -------------- An HTML attachment was scrubbed... URL: