[IronPython] Weird Anomoly with SetStandardOutput
Michael Foord
fuzzyman at voidspace.org.uk
Mon Apr 2 15:08:56 PDT 2007
Michael Foord wrote:
> Michael Foord wrote:
>
>> Hello all,
>>
>> If I create a subclass of 'Stream' from IronPython - and set it onto a
>> PythonEngine using 'SetStandardOutput', then it fails with the following
>> message:
>>
>> Traceback (most recent call last):
>> File C:\Python Projects\modules in
>> progress\ironpython\embeddingDivert.py, lin
>> e 32, in Initialize
>> File , line 0, in SetStandardOutput##94
>> TypeError: issubclass: arg 1 must be a class
>>
>> If I define an empty class, and set this then I get the expected error
>> 'AttributeError: 'Diverter' object has no attribute 'get_CanSeek'.
>>
>> [snip...]
>>
>> Unfortunately this problem is going to block us very rapidly at
>> resolver. We can probably get round it by creating the stream subclass
>> in C# - but what is the problem with doing it from IronPython ?
>>
>>
>>
>
> Except that I realise that you may not have anticipated your users
> passing .NET subclasses from one IronPython engine to another...
>
> Can this be fixed ?
>
Oh, and :
http://www.voidspace.org.uk/ironpython/ip_in_ip.shtml
Embedding IronPython in IronPython.
Michael Foord
> Michael
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
More information about the users
mailing list