<BODY>It looks to me that the problem is that abstract members defined on Stream are not implemented in Diverter.&nbsp; It would make sense to me that as they're added dynamically, it begins to work.&nbsp; What happens if all abstract members are defined initially in the derived class instead of added later?<BR><BR>----- Original Message ----- <BR>From: Michael Foord &lt;fuzzyman@voidspace.org.uk&gt; <BR>Date: Monday, April 2, 2007 4:59 pm <BR>Subject: Re: [IronPython] Weird Anomoly with SetStandardOutput <BR>To: Discussion of IronPython &lt;users@lists.ironpython.com&gt; <BR><BR>&gt; Michael Foord wrote: <BR>&gt; &gt; Hello all, <BR>&gt; &gt; <BR>&gt; &gt; If I create a subclass of 'Stream' from IronPython - and set it <BR>&gt; onto a <BR>&gt; &gt; PythonEngine using 'SetStandardOutput', then it fails with the <BR>&gt; following <BR>&gt; &gt; message: <BR>&gt; &gt; <BR>&gt; &gt; Traceback (most recent call last): <BR>&gt; &gt; File C:\Python Projects\modules in <BR>
&gt; &gt; progress\ironpython\embeddingDivert.py, lin <BR>&gt; &gt; e 32, in Initialize <BR>&gt; &gt; File , line 0, in SetStandardOutput##94 <BR>&gt; &gt; TypeError: issubclass: arg 1 must be a class <BR>&gt; &gt; <BR>&gt; &gt; If I define an empty class, and set this then I get the expected <BR>&gt; error <BR>&gt; &gt; 'AttributeError: 'Diverter' object has no attribute 'get_CanSeek'. <BR>&gt; &gt; <BR>&gt; &gt; [snip...] <BR>&gt; &gt; <BR>&gt; &gt; Unfortunately this problem is going to block us very rapidly at <BR>&gt; &gt; resolver. We can probably get round it by creating the stream <BR>&gt; subclass <BR>&gt; &gt; in C# - but what is the problem with doing it from IronPython ? <BR>&gt; &gt; <BR>&gt; &gt; <BR>&gt; <BR>&gt; Except that I realise that you may not have anticipated your users <BR>&gt; passing .NET subclasses from one IronPython engine to another... <BR>&gt; <BR>&gt; Can this be fixed ? <BR>&gt; <BR>&gt; Michael <BR>&gt; <BR>
&gt; _______________________________________________ <BR>&gt; users mailing list <BR>&gt; users@lists.ironpython.com <BR>&gt; http://lists.ironpython.com/listinfo.cgi/users-ironpython.com <BR>&gt; </BODY>