Re: Client/Server Question

2006-08-10 Thread diffuser78
I apologize. subprocess did work for me like a charm I made a mistake in my code. Appreciate your help. Dennis Benzinger wrote: > os.system() blocks until the called program has finished. Use the > subprocess module : > > > > import subprocess >

Re: Client/Server Question

2006-08-10 Thread diffuser78
> The recv() might return "MaxiSimDriving Sim". It could return > "MaxiS" on one call, and "im" on the next. If the remote side > closes the connection, recv() will keep returning the empty > string, and your program will be stuck in an infinite loop. How to overcome this problem ? > Did you und

Re: Client/Server Question

2006-08-10 Thread diffuser78
The subprocess module didn't work here. I tried using os.popen(), that won't help it either. What I am trying to achieve is that the server daemon is sitting and listening to command from the client. As client send "MaxSim" it launches MaxSim.exe and then again waits for subsequent commands. Supp

Re: Client/Server Question

2006-07-29 Thread bryanjugglercryptographer
[EMAIL PROTECTED] wrote: > My server.py looks like this > > -CODE-- > #!/usr/bin/env python > import socket > import sys > import os > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > host = '' > port = 2000 > > s

Re: Client/Server Question

2006-07-29 Thread Dennis Benzinger
[EMAIL PROTECTED] wrote: > Is os.system() going to be deprecated in future ?.I read somewhere. > [...] Sometime in the future it will. But that won't happen soon. Read the second paragraph of "Backwards Compatibility" in the subprocess PEP . Dennis

RE: Client/Server Question

2006-07-28 Thread bruce
/cmdline so you can actually verify that it's working as it should. once that's working well, then hook in the system/exec/spawn functionality... good luck Sent: Friday, July 28, 2006 3:06 PM To: python-list@python.org Subject: Re: Client/Server Question you might want to look at s

Re: Client/Server Question

2006-07-28 Thread faulkner
you might want to look at sshd. if you're on a windows box, you may need cygwin. if you're on linux, you either already have it, or it's in your package manager. [EMAIL PROTECTED] wrote: > My server.py looks like this > > -CODE---

Re: Client/Server Question

2006-07-28 Thread faulkner
i highly doubt it. http://www.google.com/search?domains=www.python.org&sitesearch=www.python.org&sourceid=google-search&q=os+system+deprecate&submit=search [EMAIL PROTECTED] wrote: > Is os.system() going to be deprecated in future ?.I read somewhere. > > Dennis Benzinger wrote: > > [EMAIL PRO

Re: Client/Server Question

2006-07-28 Thread diffuser78
Is os.system() going to be deprecated in future ?.I read somewhere. Dennis Benzinger wrote: > [EMAIL PROTECTED] wrote: > > My server.py looks like this > > > > -CODE-- > > #!/usr/bin/env python > > import socket > > im

Re: Client/Server Question

2006-07-28 Thread Dennis Benzinger
[EMAIL PROTECTED] wrote: > My server.py looks like this > > -CODE-- > #!/usr/bin/env python > import socket > import sys > import os > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > host = '' > port = 2000 > >

Client/Server Question

2006-07-28 Thread diffuser78
My server.py looks like this -CODE-- #!/usr/bin/env python import socket import sys import os s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '' port = 2000 s.bind((host,port)) s.listen(1) conn, addr = s.acc

Re: client server question

2005-08-15 Thread Irmen de Jong
Robert Wierschke wrote: > John schrieb: > >> I have a simple script that runs a server where one client can connect. >> I would like to make it so that many clients can connect to one server >> on the same port. Where can I find how to do this? >> >> Thanks, >> --j >> > > use sockets. Or, if you

Re: client server question

2005-08-15 Thread Robert Wierschke
John schrieb: > I have a simple script that runs a server where one client can connect. > I would like to make it so that many clients can connect to one server > on the same port. Where can I find how to do this? > > Thanks, > --j > use sockets. the socket accept mehtoh returns a new socket (

Re: client server question

2005-08-14 Thread John
Thanks a lot, I think I could modify this to get my work done. --j Chris Curvey wrote: > import threading > import logging > > ## > class Reader(threading.Thread): > def __init__(self, clientsock): > threading.Thread.__i

Re: client server question

2005-08-11 Thread Chris Curvey
import threading import logging ## class Reader(threading.Thread): def __init__(self, clientsock): threading.Thread.__init__(self) self.logger = logging.getLogger("Reader") #---

Re: client server question

2005-08-11 Thread Peter Hansen
John wrote: > I have a simple script that runs a server where one client can connect. > I would like to make it so that many clients can connect to one server > on the same port. Where can I find how to do this? Start by reading http://www.catb.org/~esr/faqs/smart-questions.html to learn how to a

client server question

2005-08-11 Thread John
I have a simple script that runs a server where one client can connect. I would like to make it so that many clients can connect to one server on the same port. Where can I find how to do this? Thanks, --j -- http://mail.python.org/mailman/listinfo/python-list