Re: [Tutor] Socket question.

2007-05-16 Thread Martin Walsh
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

Re: [Tutor] Socket question.

2007-05-16 Thread Alan Gauld
"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

[Tutor] Socket question.

2007-05-16 Thread Dude, WHOA!
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

Re: [Tutor] socket question

2005-09-13 Thread Alan G
> 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

Re: [Tutor] socket question

2005-09-13 Thread Kent Johnson
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

[Tutor] socket question

2005-09-13 Thread ray
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