Hi,
My question is simple but I can't yet answer it myself. I am still at
the point where I use 'Learning Python'.
Ok, so I have a terminal and I want to catch the input, and I am not
talking about raw_input.
I am talking about sys.stdin
It seems one can override sys.stdout and sys.stdin to redefine in the
first case the print method and the second case the read method.
The problem is I don't know how to use them. My goal is to color input
depending on text input, eg: in 'def f(x): return x' I want def and
return to be colored. I know how to color the string, but I don't know
how to make sys.stdin color it! Same thing for sys.stdout where I want
it in some cases to format the stuff in some way!
Any help is appreciated, and please a small example, like
def read():
return whatever
Also, my app is a child process of a zvt (done by fork). Now from
whithin the app I want to call a parent's method (in this case, get
_size or something to get size of terminal) and since people can
resize the terminal I want it to be checked dynamically. How do I do
this? Do I get the pid of parent and call its method like:
getppid().getsize() or something?
Thank you for your time
H. Aurag
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]