Code:
#81ack Interface (C) Under the LGPL license v3 <http://www.gnu.org/licenses/lgpl.txt>
import sys
try:
import py_compile
except ImportError:
print 'ERROR: py_compile module not found...'
sys.exit(0)
else:
print 'Imported module py_compile...'
try:
import compileall
except ImportError:
print 'ERROR: comileall module not found...'
sys.exit(0)
else:
print 'Imported module compileall...'
ifd = raw_input('Compile all?{y|n}[n]')
if ifd == 'y' or ifd == 'Y':
p = raw_input('Directory: ')
if p != '':
compileall.compile_dir(p)
sys.exit(0)
else:
print 'ERROR: please specify a directory...'
sys.exit(0)
p = raw_input('File: ')
try:
py_compile.compile(p)
except IOError:
print 'ERROR: file not specified or directory does not exist'
sys.exit(0)
else:
print p+' compiled...'
Do what thou wilt shall be the whole of the Law. Love is the law, love under will.
.::The Rights of Man::.
.::The Rights of Man::.