Re: [Python.NET] import changes for 2.x

2006-04-06 Thread Guy Robinson
Perfect! Guy Brian Lloyd wrote: > Hi all - > > One of the things I'd like the 2.x-compatible version of PythonNet to do > is be code-compatible as much as possible with IronPython. > > A part of that is reconciling import syntax. Currently, you have to use > the ' CLR.xxx' form to import modu

[Python.NET] importing System.Data

2006-03-22 Thread Guy Robinson
Using Michaels binaries for NET2.0 I've tried everyway I know of to import System.Data and it just won't work? Can anyone confirm this... Guy _ Python.NET mailing list - [email protected] http://mail.python.org/mailman/listinfo/pythondotnet

[Python.NET] form designer

2006-03-14 Thread Guy Robinson
Might be a tip for some. I've been using SharpDevelop for the visual layout of forms. Just create a boo form, go to the form code and copy paste the code into your python.net script. Works a treat. Guy _ Python.NET mailing list - PythonDotNet@pyth

[Python.NET] .NET2.0 and loading assemblies

2006-03-03 Thread Guy Robinson
Hello, I've been forced (due to the host application) to move my code to NET2.0. I also need to use the host python installation like Tom. And like Tom I'm not a professional programmer but I'm wondering if we should standardise on the Ironpython syntax for loading assemblies. That is: import clr

Re: [Python.NET] winForms, threading and dragdrop ?

2005-09-12 Thread Guy Robinson
ve happened (and > Python for .NET is all interop...). > > What you probably need to do is set the attribute in > the C# 'embedding' application before initializing the > python engine (or making any other interp calls). > > On Mon, 12 Sep 2005 15:38:55 +1200 >

[Python.NET] winForms, threading and dragdrop ?

2005-09-11 Thread Guy Robinson
From the attached code.With AllowDrop = True I get a .NET error as follows: System.InvalidOperationException: DragDrop registration failed. ---> System.Threading.ThreadStateException: The current thread must set to Single Thread Apartment (STA) mode before OLE calls can be made. Ensure that yo

[Python.NET] binding python objects to treenodes

2005-09-11 Thread Guy Robinson
Hello, Is there a way to bind a python object to a treeView node? I have the following treenode based class: class dataNode(WinForms.TreeNode): def __init__(self,name,total): self.Text = name self.Total = total And I add the node as such: self.treeView1.Nodes.Add(dataNo

[Python.NET] sys.stderr and embedded python

2005-07-28 Thread Guy Robinson
Hi, I have python for .NET embedded in my application and I'm trying to catch any sys.stderr output. If I run the script with the sys.stderr handler from the python commandline it works. If I run the script from the parent application it doesn't run my stderr handler. It seems to bypass it. Bot

[Python.NET] 2 ? about embedding python

2005-07-15 Thread Guy Robinson
Hello, Both questions relate to python embedded in a C# application. 1.. If my python script returns a False/True then to pass the bool to the c# script then this: bool result = (bool)runFrm.AsManagedObject(typeof(Boolean)); should work shouldn't it? 2.. If the python script needed to retu

Re: [Python.NET] ListView bug?

2005-06-01 Thread Guy Robinson
data[index][0] temp.SubItems.Add(data[index][1]) self.listView.Items.Add(temp) Guy Guy Robinson wrote: > Find attached script for a windows.Form. Is this a bug? When loading the > data into the listview from a list of tuples: > > data = [("one",&quo

[Python.NET] ListView bug?

2005-06-01 Thread Guy Robinson
Find attached script for a windows.Form. Is this a bug? When loading the data into the listview from a list of tuples: data = [("one","test one"),("two","test two"), ("three","test three")] for item in data: temp = WF.ListViewItem(item[0]) temp.SubItems.Add(item[1]) self.listView.Ite

[Python.NET] running .net with standard 2.4.1 installation

2005-05-29 Thread Guy Robinson
Hello, I've put the CLR and runtime dll's in my standard windows 2.4.1 installation and I'm getting the following(see below) crash and error information. It appears the runtime dll isn't being found. Yet they're both in the python/dll directory. I did have the binary pythonDotNet installed. B

[Python.NET] embedding python3net

2005-05-05 Thread Guy Robinson
Hello, Can anyone point me to an example of how to embed python4net in an application. Ideally using CS. Regards, Guy _ Python.NET mailing list - [email protected] http://mail.python.org/mailman/listinfo/pythondotnet

[Python.NET] how to implement Implements in py4.net

2005-04-08 Thread Guy Robinson
Hello, I have an example VB.NET script (see below) that I'm trying to recreate using python for .NET. How do I implement the Implements function? Any help appreciated. Regards, Guy """ Public Class Command Implements company.program.IExternalComm Public Function Execute(ByVal application As