I've completed this request and I got the answer already.
On 8/23/07, Larry Bates <[EMAIL PROTECTED]> wrote: > > Hendrik van Rooyen wrote: > > Lamonte Harris wrote: > > > >> Basically you can open a file by double clicking, and by default it > would open > > w/ what every program you have it set >to. Most text files would open > in > > notepad. How can I make a txt open so that notepad opens w/ the content > in it > > by >using just python. > > > > I asked this question just yesterday - and Tim Golden answered: > > > > os.startfile() > > > > - Hendrik > > > Actually os.startfile('filename.txt') will open the file with whatever > application is associated with .txt files on that machine. That could be > different from notepad if the user has chosen to override the defaults. > > os.system('notepad.exe c:\\junk.txt') > > will force notepad.exe to load and it will load the file specified. > > All depends on what you want to do. > > -Larry > > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list