Hi All, is there a way i can override raw_input or input function.
I tried with below code but getting error import sys class xyz(object): def readline(self): print 'from fn readline',var sys.stdin = xyz >>> raw_input('hi:') hi: Traceback (most recent call last): File "<pyshell#12>", line 1, in <module> raw_input('hi:') TypeError: unbound method readline() must be called with xyz instance as first argument (got nothing instead) overriding sys.stdout is working fine. Nitin K _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers