Re: [IronPython] Dirstributing scripts as Exe

2010-04-30 Thread David DiCato
These assemblies should automatically be loaded by the CLR before the IronPython engine is ever started. If you're able to execute import clr, then they have already been loaded successfully. The purpose of clr.AddReference is to make assemblies available from Python, so it is only necessary

[IronPython] Dealing with exceptions in an extension module

2010-04-30 Thread Jeff Hardy
I'm trying to fix up the exceptions for the _sqlite3 module I'm implementing. The dbapi spec (PEP 249) requires a very specific exception hierarchy, including exceptions derived from StandardError. My initial version just used C# Exception classes, but StandardError is not a normal class, so that

Re: [IronPython] Dealing with exceptions in an extension module

2010-04-30 Thread Dino Viehland
Jeff wrote: I'm trying to fix up the exceptions for the _sqlite3 module I'm implementing. The dbapi spec (PEP 249) requires a very specific exception hierarchy, including exceptions derived from StandardError. My initial version just used C# Exception classes, but StandardError is not a

Re: [IronPython] Writing a Python iterator in C#?

2010-04-30 Thread Dino Viehland
Jeff wrote: I'm trying to implement a Python iterator in C# without also implementing IEnumerator/IEnumerable (I'm also assuming it's even possible, of course). When trying to use the class in a for loop (`cu` is a Cursor instance): for row in cu: print cu TypeError: Unable

[IronPython] Calling explicitly-implemented interface methods

2010-04-30 Thread Michael Foord
Hey all, I'm porting the dotnet-integration document that comes with IronPython to Try Python. The following example doesn't work, because RegistryKey isn't available on Silverlight. Can anyone suggest a good alternative of an explicitly implemented interface method on a class in Silverlight?

Re: [IronPython] Calling explicitly-implemented interface methods

2010-04-30 Thread Michael Foord
On 30/04/2010 23:58, Dino Viehland wrote: Michael wrote: On 30/04/2010 23:32, Dino Viehland wrote: Michael wrote: Hey all, I'm porting the dotnet-integration document that comes with IronPython to Try Python. The following example doesn't work, because RegistryKey isn't

Re: [IronPython] Calling explicitly-implemented interface methods

2010-04-30 Thread Michael Foord
On 30/04/2010 23:58, Dino Viehland wrote: Michael wrote: On 30/04/2010 23:32, Dino Viehland wrote: Michael wrote: Hey all, I'm porting the dotnet-integration document that comes with IronPython to Try Python. The following example doesn't work, because RegistryKey isn't

Re: [IronPython] Dealing with exceptions in an extension module

2010-04-30 Thread Jeff Hardy
On Fri, Apr 30, 2010 at 4:10 PM, Dino Viehland di...@microsoft.com wrote: There's a public PythonOps.CreateThrowable.  It just forwards the call to the internal PythonExceptions.CreateThrowable. Ah, thank you. Yeah, maybe we should remove the internals visible to and make everything it

Re: [IronPython] Dealing with custom sequence/mapping types from C#

2010-04-30 Thread Dino Viehland
Jeff wrote: Given the following types (from sqlite3's tests): class L(object): def __len__(self): return 1 def __getitem__(self, x): assert x == 0 return foo class D(dict): def __missing__(self, key):

Re: [IronPython] Calling explicitly-implemented interface methods

2010-04-30 Thread Dino Viehland
Michael wrote: On 30/04/2010 23:58, Dino Viehland wrote: Michael wrote: On 30/04/2010 23:32, Dino Viehland wrote: Michael wrote: Hey all, I'm porting the dotnet-integration document that comes with IronPython to Try Python. The following example doesn't work, because

[IronPython] Announcing IronPython Tools for Visual Studio

2010-04-30 Thread Dino Viehland
Hello Python Community, We are happy to announce the first broadly available release of IronPython Tools for Visual Studiohttp://www.ironpython.net/tools/. IronPython Tools for Visual Studio (IPyTools) is a set of extensions available for Visual Studio 2010 which supports development of

Re: [IronPython] Dealing with custom sequence/mapping types from C#

2010-04-30 Thread Jeff Hardy
For the list case, I need the count - it would be nice to get it fast :) but I can work without it. For the dict case, will that handle __missing__? I thought I tried it and it didn't work, but I could have missed something. - Jeff Sent from my Windows® phone. -Original Message- From:

Re: [IronPython] IronPython Tools for Visual Studio

2010-04-30 Thread Jimmy Schementi
So can we close the connect bug now? :-P ~Jimmy On Apr 27, 2010, at 8:34 PM, Hank Fay h...@prosysplus.commailto:h...@prosysplus.com wrote: I've been getting everyone (relatives including kids, anyone, programming experience not necessary s) I can cajole into going to MS Connect to vote up

Re: [IronPython] Dealing with exceptions in an extension module

2010-04-30 Thread Lukas Cenovsky
Dino Viehland wrote: Jeff wrote: I'm trying to fix up the exceptions for the _sqlite3 module I'm implementing. The dbapi spec (PEP 249) requires a very specific exception hierarchy, including exceptions derived from StandardError. My initial version just used C# Exception classes, but