[IronPython] Weird Anomoly with SetStandardOutput

Nathan Ernst ernsnat at iit.edu
Tue Apr 3 00:11:08 CEST 2007


It looks to me that the problem is that abstract members defined on Stream are not implemented in Diverter.  It would make sense to me that as they're added dynamically, it begins to work.  What happens if all abstract members are defined initially in the derived class instead of added later?

----- Original Message ----- 
From: Michael Foord <fuzzyman at voidspace.org.uk> 
Date: Monday, April 2, 2007 4:59 pm 
Subject: Re: [IronPython] Weird Anomoly with SetStandardOutput 
To: Discussion of IronPython <users at lists.ironpython.com> 

> 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 ? 
> 
> Michael 
> 
> _______________________________________________ 
> users mailing list 
> users at lists.ironpython.com 
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20070402/957d4201/attachment.html>


More information about the Ironpython-users mailing list