Thanks for the suggestion, though that doesn’t work.
I setup a symlink to subl, and then ran:
import subprocess
subprocess.call('subl --project /path/to/file.sublime-project'])
Though I get an error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 470, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I’ve tried changing the path to the file, I put it on my desktop and then used:
subprocess.call('subl --project ~/Desktop/file.sublime-project'])
Though the error is still the same.
I also was hoping for a multi-platform way to do this.
Thanks,
Chris