From davidgshi at yahoo.co.uk Sat Apr 4 18:48:11 2009 From: davidgshi at yahoo.co.uk (David Shi) Date: Sat, 4 Apr 2009 16:48:11 +0000 (GMT) Subject: [Python.NET] token based security, ssl certificate and https, proxy Message-ID: <892193.76687.qm@web26306.mail.ukl.yahoo.com> I have developed a new web service.?? Now, I need to deal with security issue as we are intending to make it a secure service. ? In order to set up SSL and https, I need to obtain and install an SSL certificate.? Who is the certificate authority? ? Do you know how to go about with this? ? Are there concise articles on this? ? Regards. ? David -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfadnis at gmail.com Mon Apr 13 18:49:29 2009 From: kfadnis at gmail.com (Kapil fadnis) Date: Mon, 13 Apr 2009 12:49:29 -0400 Subject: [Python.NET] ipython Message-ID: <1e00d00b0904130949m3a50f615w665bde08950b6f36@mail.gmail.com> Hi, Is is possible to use ipython shell with python.net ? please let me know how to do so ? Thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fuzzyman at voidspace.org.uk Mon Apr 13 19:00:46 2009 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Mon, 13 Apr 2009 18:00:46 +0100 Subject: [Python.NET] ipython In-Reply-To: <1e00d00b0904130949m3a50f615w665bde08950b6f36@mail.gmail.com> References: <1e00d00b0904130949m3a50f615w665bde08950b6f36@mail.gmail.com> Message-ID: <49E36FBE.70404@voidspace.org.uk> Kapil fadnis wrote: > Hi, > Is is possible to use ipython shell with python.net > ? please let me know how to do so ? > Have you tried it? What happens? Michael > Thanks for your help. > ------------------------------------------------------------------------ > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog From kfadnis at gmail.com Mon Apr 13 19:04:30 2009 From: kfadnis at gmail.com (Kapil fadnis) Date: Mon, 13 Apr 2009 13:04:30 -0400 Subject: [Python.NET] ipython In-Reply-To: <49E36FBE.70404@voidspace.org.uk> References: <1e00d00b0904130949m3a50f615w665bde08950b6f36@mail.gmail.com> <49E36FBE.70404@voidspace.org.uk> Message-ID: <1e00d00b0904131004s5b142932r58964e5f67750319@mail.gmail.com> I dont know how to ? I run the Python.net console from the Python.net directory and it invokes the Python.exe console which calls the regular python mode. Is there a another way to run Python.net? Thanks for the quick response. On Mon, Apr 13, 2009 at 1:00 PM, Michael Foord wrote: > Kapil fadnis wrote: > >> Hi, >> Is is possible to use ipython shell with python.net ? >> please let me know how to do so ? >> >> Have you tried it? What happens? > > Michael > > Thanks for your help. >> ------------------------------------------------------------------------ >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> http://mail.python.org/mailman/listinfo/pythondotnet >> > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfadnis at gmail.com Mon Apr 13 20:16:12 2009 From: kfadnis at gmail.com (kfadnis) Date: Mon, 13 Apr 2009 14:16:12 -0400 Subject: [Python.NET] ipython In-Reply-To: References: <1e00d00b0904130949m3a50f615w665bde08950b6f36@mail.gmail.com> <49E36FBE.70404@voidspace.org.uk> <1e00d00b0904131004s5b142932r58964e5f67750319@mail.gmail.com> Message-ID: <1e00d00b0904131116w532c41eahb73f65426bff0449@mail.gmail.com> Thanks Brett. Yes, it works. The way I did it and Michael Foord pointed me to it, is to start python and then run import IPython IPython.Shell.IPShell().mainloop(sys_exit=1) or create a bat file with this cmd @"YOUR PYTHONNET DIR\python.exe" "C:\Python25\scripts\ipython.py" %* On Mon, Apr 13, 2009 at 1:41 PM, Tribble, Brett wrote: > In theory it should work, but I haven?t tried it myself. It certainly > works from the interactive Python ?shell? in Maya. Copy clr.pyd and > python.runtime.dll into a directory that is part of IPython?s %pythonpath% > and also part of the system path %path%. Load the clr with the ?import clr? > statement, and you should be good to go. I have noticed that when invoked > this way, Maya?s native version of Python ?forgets? how to load subsequent > .pyd modules. It appears that the clr intercepts these import statements and > fails to handle them correctly. I have resolved this by simply loading all > .pyd modules I think I?ll need before loading the clr. > > > > *From:* pythondotnet-bounces+btribble=maxis.com at python.org [mailto: > pythondotnet-bounces+btribble =maxis.com@ > python.org] *On Behalf Of *Kapil fadnis > *Sent:* Monday, April 13, 2009 10:05 AM > *To:* Michael Foord > *Cc:* pythondotnet at python.org > *Subject:* Re: [Python.NET] ipython > > > > I dont know how to ? I run the Python.net console from the Python.net > directory and it invokes the Python.exe console which calls the regular > python mode. Is there a another way to run Python.net? > > Thanks for the quick response. > > On Mon, Apr 13, 2009 at 1:00 PM, Michael Foord > wrote: > > Kapil fadnis wrote: > > Hi, > Is is possible to use ipython shell with python.net ? > please let me know how to do so ? > > Have you tried it? What happens? > > Michael > > Thanks for your help. > ------------------------------------------------------------------------ > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet > > > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Mon Apr 13 19:41:59 2009 From: btribble at ea.com (Tribble, Brett) Date: Mon, 13 Apr 2009 10:41:59 -0700 Subject: [Python.NET] ipython In-Reply-To: <1e00d00b0904131004s5b142932r58964e5f67750319@mail.gmail.com> References: <1e00d00b0904130949m3a50f615w665bde08950b6f36@mail.gmail.com> <49E36FBE.70404@voidspace.org.uk> <1e00d00b0904131004s5b142932r58964e5f67750319@mail.gmail.com> Message-ID: In theory it should work, but I haven't tried it myself. It certainly works from the interactive Python "shell" in Maya. Copy clr.pyd and python.runtime.dll into a directory that is part of IPython's %pythonpath% and also part of the system path %path%. Load the clr with the "import clr" statement, and you should be good to go. I have noticed that when invoked this way, Maya's native version of Python "forgets" how to load subsequent .pyd modules. It appears that the clr intercepts these import statements and fails to handle them correctly. I have resolved this by simply loading all .pyd modules I think I'll need before loading the clr. From: pythondotnet-bounces+btribble=maxis.com at python.org [mailto:pythondotnet-bounces+btribble=maxis.com at python.org] On Behalf Of Kapil fadnis Sent: Monday, April 13, 2009 10:05 AM To: Michael Foord Cc: pythondotnet at python.org Subject: Re: [Python.NET] ipython I dont know how to ? I run the Python.net console from the Python.net directory and it invokes the Python.exe console which calls the regular python mode. Is there a another way to run Python.net? Thanks for the quick response. On Mon, Apr 13, 2009 at 1:00 PM, Michael Foord > wrote: Kapil fadnis wrote: Hi, Is is possible to use ipython shell with python.net > ? please let me know how to do so ? Have you tried it? What happens? Michael Thanks for your help. ------------------------------------------------------------------------ _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfadnis at gmail.com Tue Apr 14 03:09:54 2009 From: kfadnis at gmail.com (kfadnis) Date: Mon, 13 Apr 2009 21:09:54 -0400 Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'. Message-ID: <1e00d00b0904131809u3c4c8cf8ua995ef1ae8844264@mail.gmail.com> Hi All, I know this is a very basic question, but despite all my efforts I haven't been able to load a third-party dll into python. I can find the dll using clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, but it refuses to show up. Is there something obvious I am missing ? Thank you for your time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig_farrow at sil.org Tue Apr 14 08:05:34 2009 From: craig_farrow at sil.org (Craig Farrow) Date: Tue, 14 Apr 2009 14:05:34 +0800 Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'. In-Reply-To: <1e00d00b0904131809u3c4c8cf8ua995ef1ae8844264@mail.gmail.com> References: <1e00d00b0904131809u3c4c8cf8ua995ef1ae8844264@mail.gmail.com> Message-ID: <49E427AE.4020704@sil.org> Try this: import sys sys.path.append("") import clr import System clr.AddReference("MbtCom") Craig. 14/04/2009 9:09 a.m. d?, kfadnis pi?dimi?: > Hi All, > I know this is a very basic question, but despite all my efforts I > haven't been able to load a third-party dll into python. I can find > the dll using clr.FindAssembly("MbtCom"). I also append the required > path to the sys.path, but it refuses to show up. Is there something > obvious I am missing ? > > Thank you for your time. > ------------------------------------------------------------------------ > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet From kfadnis at gmail.com Tue Apr 14 14:59:20 2009 From: kfadnis at gmail.com (kfadnis) Date: Tue, 14 Apr 2009 08:59:20 -0400 Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'. In-Reply-To: References: <1e00d00b0904131809u3c4c8cf8ua995ef1ae8844264@mail.gmail.com> Message-ID: <1e00d00b0904140559x1253cefdmc8a78b89214c5b3@mail.gmail.com> I am not sure if its managed or unmanaged, its a third party dll that came with its software, the interface is COM (ActiveX). I have added and worked with it through C#, I load them using Add Reference in C# .NET and then find them on the COM tab. Also, when added as reference in the .NET environment they load as Interop.MBTCOMLib i.e with a different name and their copy is local and is in the project directory rather than the directory where they are located. I tried the GAC utility and its said Failure adding assembly to cache: The module was expected to contain an assembly manifest. The funny thing is clr.FindAssembly() finds it, but clr.AddReference says unable to find assembly. On Mon, Apr 13, 2009 at 11:20 PM, Tribble, Brett wrote: > 1. Is it a managed assembly or an unmanaged .dll? > > 2. If it is a managed assembly, is it registered in the GAC? > > > > See: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713 > > > > also try: > > > > clr.AddReference('nameOfAssembly'). Note that you do not need to include > ?.dll? This assumes the assembly is in the system path which can be > accomplished using sys.path.insert(0, 'mypath') > > > > > > > > *From:* pythondotnet-bounces+btribble=maxis.com at python.org [mailto: > pythondotnet-bounces+btribble =maxis.com@ > python.org] *On Behalf Of *kfadnis > *Sent:* Monday, April 13, 2009 6:10 PM > *To:* pythondotnet at python.org > *Subject:* [Python.NET] System.IO.FileNotFoundException: Unable to find > assembly 'MbtCom.dll'. > > > > Hi All, > > I know this is a very basic question, but despite all my efforts I haven't > been able to load a third-party dll into python. I can find the dll using > clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, > but it refuses to show up. Is there something obvious I am missing ? > > > > Thank you for your time. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From btribble at ea.com Tue Apr 14 05:20:30 2009 From: btribble at ea.com (Tribble, Brett) Date: Mon, 13 Apr 2009 20:20:30 -0700 Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'. In-Reply-To: <1e00d00b0904131809u3c4c8cf8ua995ef1ae8844264@mail.gmail.com> References: <1e00d00b0904131809u3c4c8cf8ua995ef1ae8844264@mail.gmail.com> Message-ID: 1. Is it a managed assembly or an unmanaged .dll? 2. If it is a managed assembly, is it registered in the GAC? See: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713 also try: clr.AddReference('nameOfAssembly'). Note that you do not need to include '.dll' This assumes the assembly is in the system path which can be accomplished using sys.path.insert(0, 'mypath') From: pythondotnet-bounces+btribble=maxis.com at python.org [mailto:pythondotnet-bounces+btribble=maxis.com at python.org] On Behalf Of kfadnis Sent: Monday, April 13, 2009 6:10 PM To: pythondotnet at python.org Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'. Hi All, I know this is a very basic question, but despite all my efforts I haven't been able to load a third-party dll into python. I can find the dll using clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, but it refuses to show up. Is there something obvious I am missing ? Thank you for your time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfadnis at gmail.com Tue Apr 14 17:01:08 2009 From: kfadnis at gmail.com (kfadnis) Date: Tue, 14 Apr 2009 11:01:08 -0400 Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'. In-Reply-To: <1e00d00b0904140559x1253cefdmc8a78b89214c5b3@mail.gmail.com> References: <1e00d00b0904131809u3c4c8cf8ua995ef1ae8844264@mail.gmail.com> <1e00d00b0904140559x1253cefdmc8a78b89214c5b3@mail.gmail.com> Message-ID: <1e00d00b0904140801j5b43f182p23d24ada371f5abb@mail.gmail.com> I ended up writing a class to source the COM libraries. Let me know if anyone has any other suggestions. Thanks for your time. On Tue, Apr 14, 2009 at 8:59 AM, kfadnis wrote: > I am not sure if its managed or unmanaged, its a third party dll that came > with its software, the interface is COM (ActiveX). I have added and worked > with it through C#, I load them using Add Reference in C# .NET and then find > them on the COM tab. Also, when added as reference in the .NET environment > they load as Interop.MBTCOMLib i.e with a different name and their copy > is local and is in the project directory rather than the directory where > they are located. > > I tried the GAC utility and its said Failure adding assembly to cache: The > module was expected to contain an assembly manifest. The funny thing is > clr.FindAssembly() finds it, but clr.AddReference says unable to find > assembly. > > > > On Mon, Apr 13, 2009 at 11:20 PM, Tribble, Brett wrote: > >> 1. Is it a managed assembly or an unmanaged .dll? >> >> 2. If it is a managed assembly, is it registered in the GAC? >> >> >> >> See: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713 >> >> >> >> also try: >> >> >> >> clr.AddReference('nameOfAssembly'). Note that you do not need to include >> ?.dll? This assumes the assembly is in the system path which can be >> accomplished using sys.path.insert(0, 'mypath') >> >> >> >> >> >> >> >> *From:* pythondotnet-bounces+btribble=maxis.com at python.org [mailto: >> pythondotnet-bounces+btribble =maxis.com >> @python.org] *On Behalf Of *kfadnis >> *Sent:* Monday, April 13, 2009 6:10 PM >> *To:* pythondotnet at python.org >> *Subject:* [Python.NET] System.IO.FileNotFoundException: Unable to find >> assembly 'MbtCom.dll'. >> >> >> >> Hi All, >> >> I know this is a very basic question, but despite all my efforts I haven't >> been able to load a third-party dll into python. I can find the dll using >> clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, >> but it refuses to show up. Is there something obvious I am missing ? >> >> >> >> Thank you for your time. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ewadler at gmail.com Fri Apr 24 20:34:10 2009 From: ewadler at gmail.com (Ethan Adler) Date: Fri, 24 Apr 2009 14:34:10 -0400 Subject: [Python.NET] System.InvalidOperationException: Handle is not initialized Message-ID: Anyone getting the following problem when running the current version of python.net with python2.6? C:\Documents and Settings\ethan>python Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import clr >>> from System import String >>> s = String[str]("a") Unhandled Exception: System.InvalidOperationException: Handle is not initialized . at System.Runtime.InteropServices.GCHandle.FromIntPtr(IntPtr value) at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) at Python.Runtime.ManagedType.GetManagedObject(IntPtr ob) at Python.Runtime.Runtime.PythonArgsToTypeArray(IntPtr arg, Boolean mangleObj ects) at Python.Runtime.ClassObject.type_subscript(IntPtr idx) at Python.Runtime.MetaType.mp_subscript(IntPtr tp, IntPtr idx) If I try s = String("a") without the [str], it doesn't even give an error, it just quits. I spent a few minutes looking through the archives before posting, but I did not search exhaustively, so if this is a redundant post, I apologize. thanks, -Ethan -------------- next part -------------- An HTML attachment was scrubbed... URL: From che.chethan at gmail.com Fri Apr 24 20:37:13 2009 From: che.chethan at gmail.com (chethan che) Date: Sat, 25 Apr 2009 00:07:13 +0530 Subject: [Python.NET] Need help in resolving issues regarding Pythonnet In-Reply-To: <935e49240904240619v2895657am20defc81d9c2cbf9@mail.gmail.com> References: <935e49240904240619v2895657am20defc81d9c2cbf9@mail.gmail.com> Message-ID: <935e49240904241137g13bf27ffl5415badb181873e2@mail.gmail.com> Hi All, I want to use the existing code base in dot net dll and hence want to know how to call dot net from python. I found this pythonnet very interesting. I am currently facing the following issues: 1. I was not bale to find the pythonnet exe for windows python25. So downloaded the latest source code from http://sourceforge.net/project/showfiles.php?group_id=162464. and built the soultion as explained at http://feihonghsu.blogspot.com/2008/02/installing-pythonnet-20-alpha-2-on.html If you have a suitable installer then please send me the link of the same. 2. I have built the solution and used the clr.pyd and python.runtime.dll in my custom python library where my first line is import clr. ( import clr works fine in python shell.) But when i import my custom library ( which inturn imports clr) throws below mentioned error: SystemError: dynamic module not initialized properly File "c:\python25\lib\site-packages\csp\__init__.py", line 1, in import clr Can you let me know whyi am facing this issue and can you give me the fix at the earliest. Thanks in Advance, Regards, .cSp -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkozyarchuk at hedgeserv.com Fri Apr 24 20:33:57 2009 From: mkozyarchuk at hedgeserv.com (Maksim Kozyarchuk) Date: Fri, 24 Apr 2009 14:33:57 -0400 Subject: [Python.NET] System.InvalidOperationException: Handle is notinitialized In-Reply-To: Message-ID: Ethan, I believe [] syntax is meant for generics. To create string s = System.String(?some string?) should work. Maksim On 4/24/09 2:34 PM, "Ethan Adler" wrote: > Anyone getting the following problem when running?the current version > of?python.net ?with python2.6? > > C:\Documents and Settings\ethan>python > Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] > on > win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> >>> import clr >>>> >>> from System import String >>>> >>> s = String[str]("a") > > Unhandled Exception: System.InvalidOperationException: Handle is not > initialized > . > ? at System.Runtime.InteropServices.GCHandle.FromIntPtr(IntPtr value) > ? at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) > ? at Python.Runtime.ManagedType.GetManagedObject(IntPtr ob) > ? at Python.Runtime.Runtime.PythonArgsToTypeArray(IntPtr arg, Boolean > mangleObj > ects) > ? at Python.Runtime.ClassObject.type_subscript(IntPtr idx) > ? at Python.Runtime.MetaType.mp_subscript(IntPtr tp, IntPtr idx) > > If I try s = String("a") without the [str], it doesn't even give an error, it > just quits. > > I spent a few minutes looking through the archives before posting, but I did > not search exhaustively, so if this is a redundant post, I apologize. > > thanks, > -Ethan > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From ewadler at gmail.com Fri Apr 24 20:56:24 2009 From: ewadler at gmail.com (Ethan Adler) Date: Fri, 24 Apr 2009 14:56:24 -0400 Subject: [Python.NET] System.InvalidOperationException: Handle is notinitialized In-Reply-To: References: Message-ID: Maksim, Thanks for you reply. Yes, I have tried that and it also crashes (without spitting out any errors) when I do that as well. output: -------------Start copy from console-------------- >>> import clr >>> s = System.String("some string") H:\> -------------End copy from console-------------- I think the problem has to do with the fact that python.net is optimized for python2.5, but I am trying to use it with 2.6. Is anyone using python.netwith Python 2.6. If so, can you email me any changes you made to the python.net code before compiling, and a precompiled dll to check against? thanks, -Ethan On Fri, Apr 24, 2009 at 2:33 PM, Maksim Kozyarchuk < mkozyarchuk at hedgeserv.com> wrote: > Ethan, > I believe [] syntax is meant for generics. To create string s = > System.String(?some string?) should work. > > Maksim > > > On 4/24/09 2:34 PM, "Ethan Adler" wrote: > > Anyone getting the following problem when running the current version of > python.net with python2.6? > > > C:\Documents and Settings\ethan>python > Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit > (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import clr > >>> from System import String > >>> s = String[str]("a") > > Unhandled Exception: System.InvalidOperationException: Handle is not > initialized > . > at System.Runtime.InteropServices.GCHandle.FromIntPtr(IntPtr value) > at System.Runtime.InteropServices.GCHandle.op_Explicit(IntPtr value) > at Python.Runtime.ManagedType.GetManagedObject(IntPtr ob) > at Python.Runtime.Runtime.PythonArgsToTypeArray(IntPtr arg, Boolean > mangleObj > ects) > at Python.Runtime.ClassObject.type_subscript(IntPtr idx) > at Python.Runtime.MetaType.mp_subscript(IntPtr tp, IntPtr idx) > > If I try s = String("a") without the [str], it doesn't even give an error, > it just quits. > > I spent a few minutes looking through the archives before posting, but I > did not search exhaustively, so if this is a redundant post, I apologize. > > thanks, > -Ethan > > ------------------------------ > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwanga at gmail.com Sat Apr 25 04:07:06 2009 From: lwanga at gmail.com (Larry Wang) Date: Fri, 24 Apr 2009 19:07:06 -0700 Subject: [Python.NET] How to reference web services? Message-ID: <3c3621430904241907u28bcb921x931ac803c2f5592b@mail.gmail.com> Hi everyone: I need to reference a web service in python.net. Can this be done? Thanks, Larry -------------- next part -------------- An HTML attachment was scrubbed... URL: From che.chethan at gmail.com Sat Apr 25 05:18:15 2009 From: che.chethan at gmail.com (chethan che) Date: Sat, 25 Apr 2009 08:48:15 +0530 Subject: [Python.NET] Fwd: Need help in resolving issues regarding Pythonnet In-Reply-To: <935e49240904240619v2895657am20defc81d9c2cbf9@mail.gmail.com> References: <935e49240904240619v2895657am20defc81d9c2cbf9@mail.gmail.com> Message-ID: <935e49240904242018l41638ddfw30e90106e25786ff@mail.gmail.com> Hi Brian, I want to use the existing code base in dot net dll and hence want to know how to call dot net from python. I found this pythonnet very interesting. I am currently facing the following issues: 1. I was not bale to find the pythonnet exe for windows python25. So downloaded the latest source code from http://sourceforge.net/project/showfiles.php?group_id=162464. and built the soultion as explained at http://feihonghsu.blogspot.com/2008/02/installing-pythonnet-20-alpha-2-on.html If you have a suitable installer then please send me the link of the same. 2. I have built the solution and used the clr.pyd and python.runtime.dll in my custom python library where my first line is import clr. ( import clr works fine in python shell.) But when i import my custom library ( which inturn imports clr) throws below mentioned error: SystemError: dynamic module not initialized properly File "c:\python25\lib\site-packages\csp\__init__.py", line 1, in import clr Can you let me know whyi am facing this issue and can you give me the fix at the earliest. Thanks in Advance, Regards, .cSp -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.mcmahon at autodesk.com Sat Apr 25 16:13:26 2009 From: mark.mcmahon at autodesk.com (Mark McMahon) Date: Sat, 25 Apr 2009 07:13:26 -0700 Subject: [Python.NET] How to reference web services? In-Reply-To: <3c3621430904241907u28bcb921x931ac803c2f5592b@mail.gmail.com> References: <3c3621430904241907u28bcb921x931ac803c2f5592b@mail.gmail.com> Message-ID: <36FA17CA56D6A84D9E422A359CB4F0475D8196D94E@ADSK-NAMSG-02.MGDADSK.autodesk.com> It depends. http://www.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 Larry Wang Sent: Saturday, April 25, 2009 11:07 AM To: pythondotnet at python.org Subject: [Python.NET] How to reference web services? Hi everyone: I need to reference a web service in python.net. Can this be done? Thanks, Larry From lwanga at gmail.com Tue Apr 28 02:56:56 2009 From: lwanga at gmail.com (Larry Wang) Date: Mon, 27 Apr 2009 17:56:56 -0700 Subject: [Python.NET] How to reference web services? In-Reply-To: <36FA17CA56D6A84D9E422A359CB4F0475D8196D995@ADSK-NAMSG-02.MGDADSK.autodesk.com> References: <3c3621430904241907u28bcb921x931ac803c2f5592b@mail.gmail.com> <36FA17CA56D6A84D9E422A359CB4F0475D8196D94E@ADSK-NAMSG-02.MGDADSK.autodesk.com> <3c3621430904250931h2ce3c80ej5b6fefd7aaafc210@mail.gmail.com> <36FA17CA56D6A84D9E422A359CB4F0475D8196D995@ADSK-NAMSG-02.MGDADSK.autodesk.com> Message-ID: <3c3621430904271756o76aa5312k6c800de46dfcfda1@mail.gmail.com> Well, thank you Mark anyways. I did more googling, and it did get me what I wanted this time. The trick is WSDL which ships with your Visual Studio. wsdl http://yourhost/mywebservice.asmx csc /t:library mywebservice.cs I hope this can help people with similar needs. Larry On Sat, Apr 25, 2009 at 5:10 PM, Mark McMahon wrote: > Hi Larry, > > > > I don?t think you would have gotten much of an answer with your first > question. > > > > When you say a web service ? is it written in Soap/XML-RPC or something > else? You mention SOAP below so that is what I expect you are interested in? > Why isn?t it the ?preferred? method? > > > > If you are interested in using .NET in Python ? then your first step should > be to see how it is done in C#, VB.NET or some other language and then > translate that into Python (if you want to use Python). > > > > The following in your mail below is confusing? ?All I know is I compiled a > the latest version from its web about 2 month ago?. Did you mean > downloaded from the web and compiled? > > > > Finally ? I don?t know much about web services and am currently researching > it myself (SOAP in Python ? not planning on using .NET at this point) ? so > your reply to me below would probably have been better going to the mail > list if you want to get an answer from them. > > > > Thanks > > Mark > > > > > > *From:* Larry Wang [mailto:lwanga at gmail.com] > *Sent:* Sunday, April 26, 2009 1:31 AM > *To:* Mark McMahon > *Subject:* Re: [Python.NET] How to reference web services? > > > > ?? I am sorry. How do you want me ask my question differently? > I dont know too much about python.net, so normally if i want to referenece > a .net lib: > import clr > clr.AddReference('.netLib') > > This doesnt work if I just pass in a web service link to it. So if this can > be done, how to do I properly reference it? > Google only resulted using SOAP related methods, which regular Python can > do as well, and it's not my preferred way. > > As for the Python.net version, honestly I can't tell. All I know is I > compiled a the latest version from its web about 2 month ago, and > overwritten it with my python 2.5 install. I dont know if this all makes any > sense... > > Larry > > On Sat, Apr 25, 2009 at 7:13 AM, Mark McMahon > wrote: > > It depends. http://www.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 Larry Wang > Sent: Saturday, April 25, 2009 11:07 AM > To: pythondotnet at python.org > Subject: [Python.NET] How to reference web services? > > > Hi everyone: > > I need to reference a web service in python.net. Can this be done? > > Thanks, > Larry > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: