Hey Dude :)
Dude, WHOA! wrote:
> kinda thing. The problem is that the client I wrote doesn't receive
> data and display it, and it also only executes single word commands.
> Server side:
> #!/usr/bin/env python
> try:
> echo = Popen(command, stdout=PIPE).stdout.read()
On a
"Dude, WHOA!" <[EMAIL PROTECTED]> wrote
> kinda thing. The problem is that the client I wrote doesn't receive
> data and display it, and it also only executes single word commands.
> Server side:
> #!/usr/bin/env python
> import socket
> from subprocess import *
> IP = 'localhost'
> sock = socke
I thought I'd try my hand at sockets, and tried to make a telnet-ish,
kinda thing. The problem is that the client I wrote doesn't receive
data and display it, and it also only executes single word commands.
Thanks in advance.
Server side:
#!/usr/bin/env python
import socket
from subprocess import
> When I receive a 4-bytes integer using socket.recv, it is stored in
> a
> string. How to convert this string to a integer?
Look at the struct module.
Its unpack method takes a format string which defines how the data
should be interpreted.
Have a look at the section at the end of my file han
ray wrote:
> When I receive a 4-bytes integer using socket.recv, it is stored in a
> string. How to convert this string to a integer?
Take a look at unpack() in module struct.
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
When I receive a 4-bytes integer using socket.recv, it is stored in a
string. How to convert this string to a integer?
Thanks in advance.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor