[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Opening/Running files through python

Ionis

1/17/2008 11:14:00 AM

Hey guys, hope you can help me here.

I am running in windows and I am trying to open a file via python. I
want the file (a text file) to open up in the users default text
editor. I'm not wanting to read a file, I just want to open it. Is
there a way?

Thanks in advance.
1 Answer

Tim Golden

1/17/2008 11:18:00 AM

0

Ionis wrote:
> Hey guys, hope you can help me here.
>
> I am running in windows and I am trying to open a file via python. I
> want the file (a text file) to open up in the users default text
> editor. I'm not wanting to read a file, I just want to open it. Is
> there a way?

<code>
import os
os.startfile ("blah.txt")
</code>