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
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
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,
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
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
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
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
>>> _
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
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
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
10 matches
Mail list logo