problems with opening files due to file's path

Gerhard Häring gh at ghaering.de
Tue Jun 10 12:32:44 EDT 2008


Alexnb wrote:
> Okay, so what I want my program to do it open a file, a music file in
> specific, and for this we will say it is an .mp3. Well, I am using the
> system() command from the os class. [...]
> 
> system("\"C:\Documents and Settings\Alex\My Documents\My
> Music\Rhapsody\Bryanbros\Weezer\(2001)\04 - Island In The Sun.wma\"")
> [...]

Try os.startfile() instead. It should work better.

-- Gerhard




More information about the Python-list mailing list