Client/Server socket send user input
jas
codecraig at gmail.com
Tue Oct 25 15:39:06 EDT 2005
I even tried inserting a "\r" or "\r\n" or "\n" to stdout, also tried
the same using msvcrt.putch() ...but no luck. I still have to hit
enter to get the prompt , where I can then type a command and hit
enter.
For example, I get this displayed:
[example]
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>[cursor_is_here]
[/example]
...so I type something like.."ver" but I get
[example]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'ver' is not defined
>>>
[/example]
Now, if I start over and have...
[example]
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>[cursor_is_here]
[/example]
..and I press the Enter key I end up with
[example]
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>
>>>[cursor_is_here]
[/example]
So, I get the prompt, I hit enter, which then displays the ">>>" ..and
if I type "ver" there, I get back what I expect.
I just wish I didn't have to hit enter before being able to type a
command.
More information about the Python-list
mailing list