|
|
|
@ -8,13 +8,13 @@ import blup.output
@@ -8,13 +8,13 @@ import blup.output
|
|
|
|
|
|
|
|
|
|
def printUsage(errMsg=None): |
|
|
|
|
if errMsg is not None: |
|
|
|
|
print 'error: %s\n' % (errMsg) |
|
|
|
|
print 'usage: %s [OPTIONS] FILENAME' % (sys.argv[0]) |
|
|
|
|
print 'supported options:' |
|
|
|
|
print ' -o OUTPUT where to output the frames (default: shell)' |
|
|
|
|
print ' --output OUTPUT\n' |
|
|
|
|
print ' -h print this text' |
|
|
|
|
print ' --help' |
|
|
|
|
print('error: %s\n' % (errMsg)) |
|
|
|
|
print('usage: %s [OPTIONS] FILENAME' % (sys.argv[0])) |
|
|
|
|
print('supported options:') |
|
|
|
|
print(' -o OUTPUT where to output the frames (default: shell)') |
|
|
|
|
print(' --output OUTPUT\n') |
|
|
|
|
print(' -h print this text') |
|
|
|
|
print(' --help') |
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
|
try: |
|
|
|
@ -24,13 +24,13 @@ def main():
@@ -24,13 +24,13 @@ def main():
|
|
|
|
|
printUsage(e.msg) |
|
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
if opts.has_key('--help'): |
|
|
|
|
if '--help' in opts: |
|
|
|
|
printUsage() |
|
|
|
|
sys.exit(0) |
|
|
|
|
|
|
|
|
|
if opts.has_key('-o'): |
|
|
|
|
if '-o' in opts: |
|
|
|
|
output = opts['-o'] |
|
|
|
|
elif opts.has_key('--output'): |
|
|
|
|
elif '--output' in opts: |
|
|
|
|
output = opts['--output'] |
|
|
|
|
else: |
|
|
|
|
output = 'shell' |
|
|
|
@ -38,12 +38,12 @@ def main():
@@ -38,12 +38,12 @@ def main():
|
|
|
|
|
try: |
|
|
|
|
out = blup.output.getOutput(output) |
|
|
|
|
except blup.output.IllegalOutputSpecificationError: |
|
|
|
|
print 'illegal output specification' |
|
|
|
|
print 'available outputs:' |
|
|
|
|
print blup.output.getOutputDescriptions() |
|
|
|
|
print('illegal output specification') |
|
|
|
|
print('available outputs:') |
|
|
|
|
print(blup.output.getOutputDescriptions()) |
|
|
|
|
sys.exit(1) |
|
|
|
|
except Exception as e: |
|
|
|
|
print 'could not initialize output: %s' % (str(e)) |
|
|
|
|
print('could not initialize output: %s' % (str(e))) |
|
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
if len(args) != 2: |
|
|
|
@ -53,7 +53,7 @@ def main():
@@ -53,7 +53,7 @@ def main():
|
|
|
|
|
try: |
|
|
|
|
anim = blup.animation.load(args[1]) |
|
|
|
|
except blup.animation.AnimationFileError: |
|
|
|
|
print 'could not load animation' |
|
|
|
|
print('could not load animation') |
|
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
player = blup.animation.AnimationPlayer() |
|
|
|
|