Opening/Running files through python

Tim Golden mail at timgolden.me.uk
Thu Jan 17 06:18:26 EST 2008


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>



More information about the Python-list mailing list