Re: socket problem and html problem

2010-10-14 Thread Stefan Behnel
bussiere bussiere, 11.10.2010 08:30: here is my code and two questions : why it says to me that i can't bind the socket ? normally it had closed it and kill it :/ and why it returns me plain text and not html ? I think the reason why no-one answered yet is that it's not immediately clear what

socket problem and html problem

2010-10-10 Thread bussiere bussiere
here is my code and two questions : why it says to me that i can't bind the socket ? normally it had closed it and kill it :/ and why it returns me plain text and not html ? Regards and a pack of m&m's to the one who will help me on this two questions. import socket import sys # Create a TCP/IP

Re: socket problem

2009-03-02 Thread Jean-Paul Calderone
On Mon, 2 Mar 2009 06:40:57 -0800 (PST), step wrote: my server program is writed with c in windows using mingw,using "select" model client is writed with python the problem is , when the client connect the server, the function FD_ISSET(cilentfd,&set) always true, but it hvae read no data, i a

socket problem

2009-03-02 Thread step
my server program is writed with c in windows using mingw,using "select" model client is writed with python the problem is , when the client connect the server, the function FD_ISSET(cilentfd,&set) always true, but it hvae read no data, i also no send data to server. why? i use telnet progr

Re: Small socket problem

2009-02-09 Thread John O'Hagan
On Mon, 9 Feb 2009, Gabriel Genellina wrote: > En Mon, 09 Feb 2009 07:43:36 -0200, John O'Hagan > > escribió: > > I'm using the socket module (python 2.5) like this (where 'options' > > refers to > > an optparse object) to connect to the Fluidsynth program: > > > > host = "localhost" >

Re: Small socket problem

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 09:43:36 +, John O'Hagan wrote: Hi, I'm using the socket module (python 2.5) like this (where 'options' refers to an optparse object) to connect to the Fluidsynth program: host = "localhost" port = 9800 fluid = socket(AF_INET, SOCK_STREAM

Re: Small socket problem

2009-02-09 Thread Gabriel Genellina
En Mon, 09 Feb 2009 07:43:36 -0200, John O'Hagan escribió: I'm using the socket module (python 2.5) like this (where 'options' refers to an optparse object) to connect to the Fluidsynth program: host = "localhost" port = 9800 fluid = socket(AF_INET, SOCK

Small socket problem

2009-02-09 Thread John O'Hagan
Hi, I'm using the socket module (python 2.5) like this (where 'options' refers to an optparse object) to connect to the Fluidsynth program: host = "localhost" port = 9800 fluid = socket(AF_INET, SOCK_STREAM) try: fluid.connect((hos

Re: tcp socket problem

2008-07-26 Thread Dan Stromberg
On Fri, 25 Jul 2008 16:09:13 -0700, jm.carp wrote: > I'm writing a tcp client that grabs data from a server at 32hz. But the > connection drops exactly one minute after it's opened. I can get data > from the server fine for the first 60s, and then the connection goes > dead. What's going on? What

tcp socket problem

2008-07-25 Thread jm . carp
I'm writing a tcp client that grabs data from a server at 32hz. But the connection drops exactly one minute after it's opened. I can get data from the server fine for the first 60s, and then the connection goes dead. What's going on? -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange socket problem

2005-06-15 Thread huy
Hi Jeff, Thanks for your help. Although I haven't confirmed this, I think you just hit my nail on the head. I thought os.system was like a totally separate process though, i.e nothing is shared. not the usual fork() call within the program. Regards, Huy Jeff Epler wrote: > When using os.syst

Re: Strange socket problem

2005-06-15 Thread nm674674
Gurus, I am still doing my baby steps in the wonderful world of python (so far, so good). However, I am quite familiar with sockets. There is a socket option called SO_REUSEADDR that your server should call to fix this problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange socket problem

2005-06-15 Thread Magnus Lycka
huy wrote: > Hi, > > I'm using cherrypy to provide a user interface for users to start a > linux server program eg. os.system("nohup myserver.py &"). The problem > is that if I stop cherrypy server and restart, I get the "Address > Already In Use" problem until I stop myserver.py. Can someone s

Re: Strange socket problem

2005-06-15 Thread Jeff Epler
When using os.system(), files that are open in the parent are available in the child, as you can see here in Linux' listing of the files open by the child program: [EMAIL PROTECTED] jepler]$ python -c 'f = open("/tmp/test", "w"); print f.fileno(); import os; os.system("ls -l /proc/self/fd")' 3 to

Strange socket problem

2005-06-15 Thread huy
Hi, I'm using cherrypy to provide a user interface for users to start a linux server program eg. os.system("nohup myserver.py &"). The problem is that if I stop cherrypy server and restart, I get the "Address Already In Use" problem until I stop myserver.py. Can someone shed some light on why

Re: Annoying Socket Problem

2005-02-19 Thread John Abel
Never mind, sorted now. On 18 Feb 2005, at 15:10, John Abel wrote: Read/tried that before posting. Even with a flush, everything hangs until I kill the client. Irmen de Jong wrote: John Abel wrote: I'm hoping this is something simple, and someone can point me in the right direction here. I h

Re: Annoying Socket Problem

2005-02-18 Thread John Abel
Read/tried that before posting. Even with a flush, everything hangs until I kill the client. Irmen de Jong wrote: John Abel wrote: I'm hoping this is something simple, and someone can point me in the right direction here. I have a class based on SocketServer (ThreadingTCPServer), and I've use

Re: Annoying Socket Problem

2005-02-18 Thread Irmen de Jong
John Abel wrote: I'm hoping this is something simple, and someone can point me in the right direction here. I have a class based on SocketServer (ThreadingTCPServer), and I've used makefile on the socket so I use the "for in " routine. My client sends it a small amount of data. However, both

Annoying Socket Problem

2005-02-18 Thread John Abel
I'm hoping this is something simple, and someone can point me in the right direction here. I have a class based on SocketServer (ThreadingTCPServer), and I've used makefile on the socket so I use the "for in " routine. My client sends it a small amount of data. However, both programs appear