annotate python/asm.py @ 368:d2ddfe134c48
Remove yield from for python < 3.3
author |
Windel Bouwman |
date |
Fri, 21 Mar 2014 11:21:50 +0100 |
parents |
6f4753202b9a |
children |
6df89163e114 |
rev |
line source |
303
|
1 #!/usr/bin/env python3
|
|
2
|
318
|
3 import argparse
|
334
|
4 from ppci.assembler import Assembler
|
196
|
5
|
|
6 if __name__ == '__main__':
|
|
7 # When run as main file, try to grab command line arguments:
|
|
8 parser = argparse.ArgumentParser(description="Assembler")
|
318
|
9 parser.add_argument('sourcefile', type=argparse.FileType('r'),
|
|
10 help='the source file to assemble')
|
196
|
11 args = parser.parse_args()
|
|
12 a = Assembler()
|
|
13 obj = a.assemble(args.sourcefile.read())
|