vapandris
vapandris

Reputation: 29

Mac subprocess run with full path doesn't work

when I run the followin command in terminal it works, and starts application.

/Users/Someone/Documents/SomeApp\ v2.app/Contents/MacOS/SomeApp

But when I do the following in python, then run it:

import subprocess
subprocess.run(['/Users/Someone/Documents/SomeApp\ v2.app/Contents/MacOS/SomeApp'])

I get the following error msg.:

File not found error: [Errno 2] No such file or directory:
'/Users/Someone/Documents/SomeApp\\ v2.app/Contents/MacOS/SomeApp'

Upvotes: 0

Views: 760

Answers (1)

vapandris
vapandris

Reputation: 29

It didn't need the '\' in the string.

Upvotes: 1

Related Questions