From alexander2006 at gmail.com Thu Aug 13 15:15:25 2009 From: alexander2006 at gmail.com (Alexander Mail) Date: Thu, 13 Aug 2009 15:15:25 +0200 Subject: [Python.NET] Python.Net and DataRow Message-ID: <6526D267-8F9C-425D-99F0-044F9594DDAA@gmail.com> Hi, I'm new in Python.Net programming. I try to build a simple project that use DataSet/DataTable/DataRow. But when I add a DataRow with this code: mydatar = DataRow() I get this error: no constructor matches given arguments. Any ideas? Thanks Marco From btribble at ea.com Fri Aug 14 04:00:03 2009 From: btribble at ea.com (Tribble, Brett) Date: Thu, 13 Aug 2009 19:00:03 -0700 Subject: [Python.NET] Python.Net and DataRow In-Reply-To: <6526D267-8F9C-425D-99F0-044F9594DDAA@gmail.com> References: <6526D267-8F9C-425D-99F0-044F9594DDAA@gmail.com> Message-ID: Can you use this instead? from System.Data import DataTable, DataRow ttable = DataTable() mydatar = ttable.NewRow() -----Original Message----- From: pythondotnet-bounces+btribble=maxis.com at python.org [mailto:pythondotnet-bounces+btribble=maxis.com at python.org] On Behalf Of Alexander Mail Sent: Thursday, August 13, 2009 6:15 AM To: pythondotnet at python.org Subject: [Python.NET] Python.Net and DataRow Hi, I'm new in Python.Net programming. I try to build a simple project that use DataSet/DataTable/DataRow. But when I add a DataRow with this code: mydatar = DataRow() I get this error: no constructor matches given arguments. Any ideas? Thanks Marco _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet From btribble at ea.com Fri Aug 14 03:47:08 2009 From: btribble at ea.com (Tribble, Brett) Date: Thu, 13 Aug 2009 18:47:08 -0700 Subject: [Python.NET] Problem importing .pyd modules after 'import clr' Message-ID: Just what it says. If I import the clr first, I can't import other pyd files. I assume this is because of the way that pythonnet intercepts the import statement to do it's magic. Now here is where it gets "fun": This problem occurs when running from the version of Python 2.5 that is native to Maya, but does not occur when running from the ActiveState version of 2.5. In other words, the problem is specific to Maya. For instance, if I import the Perforce API module first I get this: >>>import P4API >>>dir(P4API) # Result: ['P4Adapter', 'P4Map', 'P4MergeData', '__doc__', '__file__', '__name__', 'identify'] # However if I do it second to the clr, I get: # Result: ['__doc__', '__file__', '__name__'] # Any ideas? Brett Tribble -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.svetlov at gmail.com Fri Aug 14 16:18:46 2009 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Fri, 14 Aug 2009 10:18:46 -0400 Subject: [Python.NET] PythonDotNet Digest, Vol 69, Issue 1 In-Reply-To: References: Message-ID: <270ea8310908140718g4a424809xd7beb3c80b6e607f@mail.gmail.com> DataRow does not have public constructor without arguments. You should to do something like row = data_table.NewRow() # fill row data_table.Rows.AddRow(row) > Hi, > I'm new in Python.Net programming. I try to build a simple project > that use DataSet/DataTable/DataRow. > But when I add a DataRow with this code: > > mydatar = DataRow() > > I get this error: > > ? ? ? ?no constructor matches given arguments. > > Any ideas? > > Thanks > > Marco > From begin.middle.end at gmail.com Sun Aug 16 06:05:05 2009 From: begin.middle.end at gmail.com (Mahi Haile) Date: Sun, 16 Aug 2009 00:05:05 -0400 Subject: [Python.NET] Issues with running a phyton script from c# Message-ID: <83d424980908152105u57b6b2ddtd3199e054ebd754b@mail.gmail.com> I am able to run a phyton script from C# using a code similar to: p = new Process() p.StartInfo.Filename = path/to/script p.StartInfo.Arguments = string_with_arguments p.StartInfo.CreateNoWindow = true p.Start() I am not interested in the script outcomes since the script just starts a Tk app with its own Gui. The problem/annoyance I am having is when the process starts, it does so with a command window that points to python instalation location (so something like C:\Python25\python.exe) and just hangs there until I quit the Tk gui. Is there a way to get rid of this command window? If I close the command window manually, the Tk app closes as well. Thank you for your help, -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig_farrow at sil.org Mon Aug 17 10:57:15 2009 From: craig_farrow at sil.org (Craig Farrow) Date: Mon, 17 Aug 2009 20:57:15 +1200 Subject: [Python.NET] Issues with running a phyton script from c# In-Reply-To: <83d424980908152105u57b6b2ddtd3199e054ebd754b@mail.gmail.com> References: <83d424980908152105u57b6b2ddtd3199e054ebd754b@mail.gmail.com> Message-ID: <4A891B6B.8090206@sil.org> For running stand-alone python scripts you can rename your .py file to .pyw, which disables the console window when you run it. Does that achieve the same result from your C# code? Craig. 16/08/2009 4:05 p.m. d?, Mahi Haile pi?dimi?: > I am able to run a phyton script from C# using a code similar to: > > p = new Process() > p.StartInfo.Filename = path/to/script > p.StartInfo.Arguments = string_with_arguments > p.StartInfo.CreateNoWindow = true > p.Start() > > > I am not interested in the script outcomes since the script just > starts a Tk app with its own Gui. > > The problem/annoyance I am having is when the process starts, it does > so with a command window that points to python instalation location > (so something like C:\Python25\python.exe) and just hangs there until > I quit the Tk gui. Is there a way to get rid of this command window? > If I close the command window manually, the Tk app closes as well. > > Thank you for your help, > ------------------------------------------------------------------------ > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet From mkozyarchuk at hedgeserv.com Mon Aug 17 13:38:44 2009 From: mkozyarchuk at hedgeserv.com (Maksim Kozyarchuk) Date: Mon, 17 Aug 2009 07:38:44 -0400 Subject: [Python.NET] Issues with running a phyton script from c# Message-ID: <5BA5AF9BD60D4D47958DA903E82D2CC614AF27@HSE-NYC-MAIL-01.funddevelopmentservices.com> Launching the application using pythonw.exe instead of python should resolve this. ________________________________ From: pythondotnet-bounces+mkozyarchuk=funddevelopmentservices.com at python.org To: pythondotnet at python.org Sent: Sun Aug 16 00:05:05 2009 Subject: [Python.NET] Issues with running a phyton script from c# I am able to run a phyton script from C# using a code similar to: p = new Process() p.StartInfo.Filename = path/to/script p.StartInfo.Arguments = string_with_arguments p.StartInfo.CreateNoWindow = true p.Start() I am not interested in the script outcomes since the script just starts a Tk app with its own Gui. The problem/annoyance I am having is when the process starts, it does so with a command window that points to python instalation location (so something like C:\Python25\python.exe) and just hangs there until I quit the Tk gui. Is there a way to get rid of this command window? If I close the command window manually, the Tk app closes as well. Thank you for your help, -------------- next part -------------- An HTML attachment was scrubbed... URL: From begin.middle.end at gmail.com Mon Aug 17 16:20:39 2009 From: begin.middle.end at gmail.com (Mahi Haile) Date: Mon, 17 Aug 2009 10:20:39 -0400 Subject: [Python.NET] Issues with running a phyton script from c# In-Reply-To: <5BA5AF9BD60D4D47958DA903E82D2CC614AF27@HSE-NYC-MAIL-01.funddevelopmentservices.com> References: <5BA5AF9BD60D4D47958DA903E82D2CC614AF27@HSE-NYC-MAIL-01.funddevelopmentservices.com> Message-ID: <83d424980908170720n362904efk6e3eb891c1eace00@mail.gmail.com> Thank you!Either renaming the script to a .pyw or launching the app with pythonw.exe got rid of the problem. So, the block of code exactly the same with a minor change as: [option 1] p = new Process() p.StartInfo.Filename = path/to/script //Here use a .pyw instead of a .py file p.StartInfo.Arguments = string_with_arguments p.StartInfo.CreateNoWindow = true p.Start() [option 2] p = new Process() p.StartInfo.Filename = path/to/pythonw.exe p.StartInfo.Arguments = path/to/script + any_string_args //(delimited by spaces as in the command line) p.StartInfo.CreateNoWindow = true p.Start() Thanks again, On Mon, Aug 17, 2009 at 7:38 AM, Maksim Kozyarchuk < mkozyarchuk at hedgeserv.com> wrote: > Launching the application using pythonw.exe instead of python should > resolve this. > > ------------------------------ > *From*: pythondotnet-bounces+mkozyarchuk=funddevelopmentservices.com@ > python.org python.org> > *To*: pythondotnet at python.org > *Sent*: Sun Aug 16 00:05:05 2009 > *Subject*: [Python.NET] Issues with running a phyton script from c# > > I am able to run a phyton script from C# using a code similar to: > > p = new Process() > p.StartInfo.Filename = path/to/script > p.StartInfo.Arguments = string_with_arguments > p.StartInfo.CreateNoWindow = true > p.Start() > > > I am not interested in the script outcomes since the script just > starts a Tk app with its own Gui. > > The problem/annoyance I am having is when the process starts, it does > so with a command window that points to python instalation location > (so something like C:\Python25\python.exe) and just hangs there until > I quit the Tk gui. Is there a way to get rid of this command window? > If I close the command window manually, the Tk app closes as well. > > Thank you for your help, > -------------- next part -------------- An HTML attachment was scrubbed... URL: From susanta3d at gmail.com Wed Aug 26 18:56:14 2009 From: susanta3d at gmail.com (susanta3d at gmail.com) Date: Wed, 26 Aug 2009 16:56:14 +0000 Subject: [Python.NET] Python.net for Python 3.0 Message-ID: <0016e6d77d1238951f04720e54a8@google.com> Hi, I'm using Python.net with Blender 3d software. But with the new release(2.5) it is now going to use Python 3. I'm wondering is there any way to use Python.net with Python 3.0? It will be really really helpful. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.svetlov at gmail.com Thu Aug 27 16:46:24 2009 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Thu, 27 Aug 2009 10:46:24 -0400 Subject: [Python.NET] PythonDotNet Digest, Vol 69, Issue 6 In-Reply-To: References: Message-ID: <270ea8310908270746w4876f4dchea459ba64f63cbfc@mail.gmail.com> Not yet for now. I tried to port python.net to py3k support but this branch is far from finish and unstable. > Message: 1 > Date: Wed, 26 Aug 2009 16:56:14 +0000 > From: susanta3d at gmail.com > To: pythondotnet at python.org > Subject: [Python.NET] Python.net for Python 3.0 > Message-ID: <0016e6d77d1238951f04720e54a8 at google.com> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"; > ? ? ? ?DelSp="yes" > > Hi, > > I'm using Python.net with Blender 3d software. But with the new > release(2.5) it is now going to use Python 3. I'm wondering is there any > way to use Python.net with Python 3.0? It will be really really helpful. > > Thanks in advance