Re: [IronPython] .exe is not pre-compiled

2009-05-04 Thread William Reade
Generally, CPython modules have the .pyd extension -- and, in fact, Ironclad will only detect and handle attempts to import .pyd files. So, sadly, it won't help you here. It wouldn't be hard to make Ironclad handle .exe files, but the likelihood of it doing anything useful with them is

[IronPython] Getting type error when calling a .NET DLL interface.

2009-05-04 Thread Max Barry
Hi all, I am trying to call an interface from DLL created in .Net to work with a IronPython script and am getting the following error when I run the code: TypeError: Cannot create instances of IDSSCatalog The trace is below: Traceback (most recent call last): File

Re: [IronPython] How to get access to enum?

2009-05-04 Thread Lepisto, Stephen P
I believe you just need to import the enumeration: from module import Visibility where module is the module containing the definition of the enumeration. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Kristian Jaksch

Re: [IronPython] How to get access to enum?

2009-05-04 Thread Kristian Jaksch
Yes, I found it just before you replied. Thanks anyway! 2009/5/4 Lepisto, Stephen P stephen.p.lepi...@intel.com: I believe you just need to import the enumeration: from module import Visibility where module is the module containing the definition of the enumeration. -Original

Re: [IronPython] Assertion failure in IPy 2.6 while running Django

2009-05-04 Thread Jeff Hardy
On Sun, May 3, 2009 at 3:59 PM, Dino Viehland di...@microsoft.com wrote: Do you happen to know what baseName is when the assertion is hit? Default19, IIRC. - Jeff -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of

[IronPython] How to get access to enum?

2009-05-04 Thread Kristian Jaksch
How can I get access to enums in IronPython? For example, when running IronPython + Silverlight I need access to the Visibility enum: btnMaxPlot.Visibility = Visibility.Collapsed This results in an error: NameError: name 'Visibility' is not defined Thanks for help! /Kristian

Re: [IronPython] Getting type error when calling a .NET DLL interface.

2009-05-04 Thread Dave Fugate
At first glance, I'd say there's no need for the dssCatalog = IDSSCatalog(db) line which doesn't work because you're attempting to instantiate an interface. That is, if DSSDatabase truly implements IDSSCatalog; just call db.MakeNewCatalog(''). Dave From: users-boun...@lists.ironpython.com

[IronPython] IronPython on Win7 Build7100

2009-05-04 Thread Tim Roberts
On Sat, 2 May 2009 06:47:00 +0100, Davy Mitchell daftspan...@gmail.com wrote: Just upgraded from the Beta to RC for Win7. The OS is snappier than ever. Good stuff. It's a bit off-topic for this list, but I'd like to second this. I primarily write Windows drivers, and I really hated Vista.

Re: [IronPython] Mercurial Status

2009-05-04 Thread Dino Viehland
You mention bug #22258 - is Mercurial using byte array notation wherever they intend to have a non-Unicode string? I'm just curious because there may be a lot of other subtle Unicode issues. For example: foo = open('foo', 'w+b') b = buffer(u'hello world', 6) foo.write(b) foo.close() in CPython

[IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Schmottlach, Glenn
Although I'm very comfortable with CPython, I'm new to IronPython and the .NET framework. What I am looking for is sample code that shows how to issue an asynchronous call from IronPython using the BeginInvoke/EndInvoke mechanism of .NET. Currently, I'm playing around with GTK# and a D-Bus

[IronPython] [OT] RE: IronPython on Win7 Build7100

2009-05-04 Thread Keith J. Farmer
Might I suggest: the fact that it doesn't have Vista on the label? Don't get me wrong, Win7 is a great advance over Vista -- I'm using it exclusively at home and have been since the beta, but the only differences from Vista (whch I use on my work laptop until tomorrow) that I encounter

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Michael Foord
Schmottlach, Glenn wrote: Although I’m very comfortable with CPython, I’m new to IronPython and the .NET framework. What I am looking for is sample code that shows how to issue an asynchronous call from IronPython using the BeginInvoke/EndInvoke mechanism of .NET. I can't remember the

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Schmottlach, Glenn
I've looked at the C# examples in MSDN but they don't appear to lend themselves (at least with my limited experience in .NET) to an easy implementation in IronPython due to the dynamic nature of the type system in Python. The example I looked at:

Re: [IronPython] Getting type error when calling a .NET DLL interface.

2009-05-04 Thread Max Barry
Thanks Dave that seemed to work. Can you tell me why this is the case? I ran the code in python for .NET and it work correctly. I would expect to have implemented the interface in this way in order to use it. Thanks, Max ___ Users mailing list

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Michael Foord
Schmottlach, Glenn wrote: I've looked at the C# examples in MSDN but they don't appear to lend themselves (at least with my limited experience in .NET) to an easy implementation in IronPython due to the dynamic nature of the type system in Python. The example I looked at:

Re: [IronPython] Getting type error when calling a .NET DLL interface.

2009-05-04 Thread Curt Hagenlocher
In a statically-typed language like C#, if you have a reference to an object, you need to tell the compiler that this object is really a Foo in order to use any of Foo's methods with the object. The compiler generates whatever code is necessary to cast the variable to a Foo and will then allow you

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Schmottlach, Glenn
Okay, call me clueless . . . This is what I have so far as an example: import clr clr.AddReference('IronPython') from System import * from System.Threading import Thread from IronPython.Compiler import CallTarget0 class Foo: def start(self): print 'Started.'

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Dino Viehland
This is actually a CLR bug. A simple repro of the issue is below if anyone is curious. The CLR team has resolved this bug as Won't Fix and says a workaround is available. The only workaround I can think of is explicitly queueing the work item to the thread pool and provide an object for you

Re: [IronPython] Making asynchronous calls in IronPython

2009-05-04 Thread Dino Viehland
Oh, one possible work around is to write a C# stub that will do the begin invoke for you. That'll be annoying if you have lots of delegate types that you need to begin invoke on though. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-

Re: [IronPython] [OT] IronPython on Win7 Build7100

2009-05-04 Thread Tim Roberts
On Mon, 4 May 2009 13:17:24 -0700, Keith J. Farmer kfar...@thuban.org wrote: Might I suggest: the fact that it doesn't have Vista on the label? Don't get me wrong, Win7 is a great advance over Vista -- I'm using it exclusively at home and have been since the beta, but the only differences