[Tutor] Socket connection refused

Djoumy . deadviannou at caramail.com
Wed Feb 25 06:43:45 EST 2004


sorry i'm not really good in english so maybe what I said wasn't very clear.
So : launching the server and the client in a (separate) command prompt doesn't work I still have a "connection 
refused" error, I suppose you're stumped :)
I'll try to launch it on another computer, but if it works correctly that will mean the problem is coming from my 
computer... I really don't understand why, since I got a Windows XP professional (SP1) without any specific 
running process.

Djoum's

P.S : By the way, each time I answer a mail of Tutor, it creates a new thread. How can I do to avoid this ? (I 
tried "answer" and "answer to all" but doesn't work)


------- Message original ------- 
De: Nick Lunt <nick at javacat.f2s.com> 
Date: Tue, 24 Feb 2004 16:57:41 +0000 
Sujet: Re: [Tutor] Socket connection refused 


I'm not 100% clear mate, have you launched both the server and the
client from different command prompts (forget IDLE and py2exe for now) ?

If you have and your still getting "connection refused" then Im stumped.

Can you try it on another computer somewhere ?

It works on windowsXP and linux here at home both with python2.3 .

I do however get an error when I run the client from within IDLE. IDLE
has problems with the Tkinter module sometimes so that doesn't
surprise me.

Can you clarify that you have run the client and server without using
either py2exe or IDLE for any of them please.

Cheers
Nick.


On Tue, 24 Feb 2004 14:37:27 GMT  "Djoumy . " 
wrote:

>  ok Alan and Nick you got the same idea but I still have my problem :
> 
> 1 - I open client.py (or fclient.py that's the same one) with IDLE,
> launch server.py (or fserver.py) 
> typing "python server.py" in a command prompt. The server is
> well launched, and running the client module 
> under IDLE gives a good result : it sends and receives "Hello world"
> as expected. yeah great :)
> 
> 2 - Now the same thing but launching the client (after the server) in
> another command prompt "python 
> client.py". And there I got the problem : Connection refused...
> 
> Now I'm sure it's not coming from py2exe but I still don't understand
> what's the difference between launching 
> the client under IDLE or in a command prompt....
> 
> Djoum's
> 
> 
> ------- Message original ------- 
> De:  Alan Gauld   
> Date: Mon, 23 Feb 2004 22:18:20 -0000 
> Sujet: Re: [Tutor] Socket connection refused 
> 
> 
> > I have found two ways to test this : I compile the server with
> > py2exe and launch it, then I can run the client
> > either running the module under IDLE or compiling it with py2exe.
> 
> I strongly recommend that you do NOT use py2exe until you get your
> program working. One thing at a time. Its also much faster to develop
> the program if you don;t have to go through the py2exe stage every
> time yopu make a change!
> 
> Just run your client and server from a pair of command prompt windows.
> 
> Use Start-Run and enter "COMMAND" to start a command prompt
> (aka DOS box). Do it twice to get two.
> 
> In one box start your client by typing:
> 
> C:\>python client.py
> 
> And in the other start your server
> 
> C:\>python server.py
> 
> (Actually its usually better to start the server first!)
> 
> Now you should see the prompts and output of each program in its
> own box.
> 
> And having just seen the code I notice its a Tkinter client so
> you only need one DOS box for the server, you can start the client
> just by double clicking in explorer...
> 
> HTH,
> 
> Alan G
> Author of the Learn to Program web tutor
> http://www.freenetpages.co.uk/hp/alan.gauld
> 
> Pour gagner une Playstation 2, envoyez un SMS avec le code PS au 61321
> (0,35 euro hors coût du SMS).
> 
> 

_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor

Pour gagner une Playstation 2, envoyez un SMS avec le code PS au 61321 (0,35 euro hors coût du SMS).



More information about the Tutor mailing list