Help, *.CHM, etc
Mike at DeleteThis.Geary.com
Wed Jan 21 05:10:20 CET 2004
Josiah Carlson wrote:
> > Personally, I would suggest:
> > os.startfile("c:\\path\\help.chm")
> > It is documented to do exactly what you want it to do,
> > open up the help file with the microsoft help file viewer.
> That is, if .chm files are associated with the microsoft
> help file viewer.
> Technically os.system("c:\\path\\help.chm") and
> os.system("start c:\\path\\help.chm") also work, though
> are less intuitive.
No, os.system is the wrong way to do it. That function launches a new
command shell, which in turn runs the program you want. Because of that, if
you're not already running in a console window, it will open a new console
You had it right with os.startfile. That calls the ShellExecute function in
Windows, which is the way you would do it in a native Windows application
written in C.
More information about the Python-list