Code run from IDLE but not via double-clicking on its *.py

Richie Hindle richie at entrian.com
Thu Sep 1 06:33:14 EDT 2005


[n00m]
> D:\>python23\python d:\python23\socket6.py [Enter]
> 
> It's OK so far. Python code is launched and starts listening
> to port 1434 (see the code below; it's the same code as in my
> neibouring topic).
> Now I launch a vbs script (which will connect to port 1434).
> I.e. I just double-click "my.vbs" file.
> And... voila! In a moment & silently console window closes
> without any error messages (or I just don't see them).
> But VBS reports a network error. Tested on win2k and win98.

That sounds impossible, so I must be misunderstanding something.  What
happens when you do this (forgive me if this seems patronising, but I'm
missing something about the way you're working)

1. Start a new Command Prompt via Start / Programs / Accessories / Command
Prompt (or the equivalent on your machine)

2. Type the following: d:\python23\python d:\python23\socket6.py [Enter]

3. Double-click your .vbs file in Windows Explorer.

Now what does the python Command Prompt say?  By your description above,
it sounds like it disappears, but that ought to be impossible.

-- 
Richie Hindle
richie at entrian.com>



More information about the Python-list mailing list