|
Last change
on this file since 2858 was 2854, checked in by obi, 16 years ago |
|
add
|
-
Property svn:executable
set to
*
|
|
File size:
370 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/python
|
|---|
| 2 |
|
|---|
| 3 | import sys
|
|---|
| 4 | import py_compile
|
|---|
| 5 |
|
|---|
| 6 | try:
|
|---|
| 7 | if len(sys.argv) < 2:
|
|---|
| 8 | print 'Usage: mkpyc.py filename.py'
|
|---|
| 9 | sys.exit()
|
|---|
| 10 |
|
|---|
| 11 | print "Kompiliere: " + sys.argv[1]
|
|---|
| 12 | ret = py_compile.compile(sys.argv[1],None,None,True) #keine Fehlermeldung, aber except
|
|---|
| 13 | #py_compile.compile(sys.argv[1]) #gibt Fehlermeldung aus, erzeugt aber keinen except
|
|---|
| 14 |
|
|---|
| 15 | except:
|
|---|
| 16 | sys.exit(1)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.