229k views
0 votes
Python 3.6.5 opening applications through Python

I have everything correct besides the file location for the game 'Factorio'
which I am trying to open.

On the picture I have the properties of the game open at the bottom next to the physical location of the game.

At the top I have the code I am using as well as the current file location I am trying

Python 3.6.5 opening applications through Python I have everything correct besides-example-1
User Tris Timb
by
5.2k points

1 Answer

4 votes
I would try to double up the slashes. Having reproduced the error on my computer, I was able to correct it by doubling them up. The \ character is a special character in Python and sometimes needs to be escaped for them to work properly.
Something like this:
"C:\\Program Files (x86)\\Steam\\steamapps\\common\\"


User Vynce
by
5.0k points