Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #encoding: utf-8
- import subprocess, os, sys
- #Helper function
- def winepath(path):
- return subprocess.check_output(['winepath', path])
- if len(sys.argv) < 3:
- exit(0)
- #Get project file unix path
- projectFilePath = winepath(sys.argv[2])
- #Get project directory
- projectDir = os.path.dirname(projectFilePath)
- #Get project file name without directory
- projectName = os.path.basename(projectFilePath)
- #Get script file name
- fileName = winepath(sys.argv[3])[len(projectDir) + 1:]
- #Change directory
- os.chdir(projectDir)
- #Open monodevelop in current directory
- subprocess.call(['monodevelop', projectName, fileName])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement