Re: [IronPython] OsCon?

2006-07-14 Thread Keith J. Farmer
Gee.. they don’t send us VCS devs to conventions (well, not all of us)   I expect a box of loot in front of my office. ;)   - Keith J. Farmer [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dino Viehland

Re: [IronPython] pickling exceptions and differences between IronPythonand cpython

2006-07-14 Thread Bruce Christensen
Also, as a workaround, you can add a simple __getstate__ method to the Exception class that ignores clsException if it's present: C:\Ip\IronPython>ipy IronPython 1.0.2386 (Beta) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> import sys; sys.path.append(r'c:\Pyth

Re: [IronPython] Regression with Beta9?

2006-07-14 Thread Bruce Christensen
The CLR names are still available on __builtins__ (but strangely not on __builtin__ when it is imported). As a somewhat ugly workaround, you can copy the names from __builtins__ into your local namespace:   >>> import clr >>> HasAttr Traceback (most recent call last):   File , line 0,

Re: [IronPython] Regression with Beta9?

2006-07-14 Thread Lee Culver
Ah ok…   I was more wondering if it’s a supported construct or not (and if it is, why is it missing?).  I would like to use these IronPython specific names since it makes the code uniform in terms of function capitalization (and this code could never run in CPython anyway since it makes h

Re: [IronPython] Regression with Beta9?

2006-07-14 Thread Martin Maly
HasAttr is not an IronPython specific construct, just an IronPython specific name. It is, however, strange, that we don’t find it after you import clr. We’ll look into that problem.   In the meantime, you can use the name of the true Python built-in “hasattr”. It will execute the very sam

Re: [IronPython] pickling exceptions and differences between IronPythonand cpython

2006-07-14 Thread Bruce Christensen
Thanks for the feedback! We should definitely support pickling exceptions that originated as CLR exceptions. I've opened http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkIt emId=945 to track it. --Bruce -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECT

Re: [IronPython] Regression with Beta9?

2006-07-14 Thread Lee Culver
What about the previous email?  I currently cannot access any IronPython specific constructs which are in the __builtins__ module, or any other module:   >>> import clr >>> HasAttr Traceback (most recent call last):   File , line 0, in ##16 NameError: name 'HasAttr' not defined >>> _

[IronPython] pickling exceptions and differences between IronPython and cpython

2006-07-14 Thread Jason Ferrara
Using the pickle modules from cpython to pickle built in exceptions fails under IronPython because IronPython adds a clsException attribute which pickle can't handle. And example is below. Should this be considered a bug? IronPython 1.0.60712 (Beta) on .NET 2.0.50727.42 Copyright (c) Microso

Re: [IronPython] Unable to cast object of type 'IronPython.Runtime.Types.OldClass' to type 'IronPython.Runtime.Types.DynamicType'

2006-07-14 Thread Martin Maly
Thank you very much, great repro, which points to an IronPython bug which I opened on CodePlex (bug 940)   http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=940   in fact, the actual repro is even simpler, no need to declare the TestClass either, simply import

Re: [IronPython] Unable to cast object of type 'IronPython.Runtime.Types.OldClass' to type 'IronPython.Runtime.Types.DynamicType'

2006-07-14 Thread Mike Raath
OK - I've broken it down to its simplest form. It looks like there's a problem importing the minidom class.If you create a module TestModule.py containing the following code:Python Code==import xml.dom.minidomclass TestClass:    passand then try to import this class you will see this error