Need help with TCP/IP client access from Windows
Gordon McMillan
gmcm at hypernet.com
Fri Jul 30 09:25:58 EDT 1999
Eric S. Raymond writes:
> Gordon McMillan <gmcm at hypernet.com>:
> > Probably better just to have a default file, and let the user
> > override that if need be. Which may well never happen.
>
> OK, but where to put it? I don't know what the conventions are.
Probably the same directory where you put your script. (The Win31
convention of putting all ini files in the Windows directory under
<appname>.ini is now, thank goodness, passe).
> > > (3) Is there a reliable way for Python programs under Windows to
> > > point a local
> > > browser at a specified URL?
> >
> > The best way is to use WinExec from Mark's win32 extensions. You just
> > give it the URL and it loads the user's default browser. Using
> > os.system is harder, because most of the time a browser is not on the
> > user's path.
>
> Are these in the stock 1.5.2 Windows distribution?
No, They're in Mark Hammond's extensions (link from python.org). The
"start" trick (which I just tried) is probably the best way in stock
Python (though it raises a bogus console window for a few seconds
before the browser starts).
- Gordon
More information about the Python-list
mailing list