meneldor wrote: > Im not implementing terminal emulator. Just need to parse the prompt when > any command finishes.
To do that you must implement a proper terminal emulator. > The things are getting ugly if i open python script which uses python's > "cmd" lib for custom interactive prompt. So i open that script which > "should" print the prompt "prompt> ". Then i send "use test\n". The prompt > is colored. Here is the result: > > [0;36prompt>[0m u > [0;36prompt>[0m > [0;36prompt>[0m u > [0;36prompt>[0m > [0;36prompt>[0m us > [0;36prompt>[0m > [0;36prompt>[0m us .. > I have no idea why i receive so many prompts :) Because of how the terminal behaves. > i guessed that there is something wrong with the calculations of > the screen/pty size/columns because of the un-printable color codes. No, what is wrong is that you are not correctly implementing a terminal emulator. You must do that. //Peter _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel