On Nov 15, 4:09 pm, [EMAIL PROTECTED] wrote:
> Can anyone tell me what I am doing wrong with the following code? When
> python 2.4 is embedded it crashes because of the assignment to stdin.
>
> import sys;
>
> class RedirectB:
>   def readline(self):
>     return "bar";
>
> sys.stdin = RedirectB();

Seems the interpreter didn't like me using one class to redirect
stdout and stderr and another class to redirect stdin. Sigh.

Andy

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to