Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from subprocess import Popen
- def enclose(string):
- return '"' + string + '"'
- def open_sticker_template():
- program = r'C:\Program Files\Microsoft Office\Office12\EXCEL.EXE'
- folder = r'C:\Documents and Settings\GARY\My Documents\work\templates\labels'
- file = r'drawing labels - normal 7x2.xls'
- command = enclose(program) + ' ' + enclose(os.path.join(folder, file))
- Popen(command)
- if __name__ == '__main__':
- open_sticker_template()
Add Comment
Please, Sign In to add comment