Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pyw_compile.py (no console)
- import py_compile
- import tkFileDialog
- oFiletype =("python files","*.py"),("jpg files","*.jpg")
- def openfile():
- """Convert a file (specified by a path) into a data URI."""
- return tkFileDialog.askopenfilename(title = "Select file",filetypes=oFiletype)
- infilename = openfile()
- outfilename = 'pyw_'+infilename+'w'
- py_compile.compile(infilename,cfile = outfilename)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement