mirror of
https://github.com/mnaberez/py65.git
synced 2025-03-06 17:29:43 +00:00
Put usage message in __doc__
This commit is contained in:
parent
ffb0a19391
commit
f2d7ae4f2f
@ -1,5 +1,17 @@
|
|||||||
#!/usr/bin/env python -u
|
#!/usr/bin/env python -u
|
||||||
|
|
||||||
|
"""py65mon -- interact with a simulated 6502-based system
|
||||||
|
|
||||||
|
Usage: %s [options]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-h, --help : Show this message
|
||||||
|
-m, --mpu <device> : Choose which MPU device (default is 6502)
|
||||||
|
-l, --load <file> : Load a file at address 0
|
||||||
|
-r, --rom <file> : Load a rom at the top of address space and reset into it
|
||||||
|
-g, --goto <address> : Perform a goto command after loading any files
|
||||||
|
"""
|
||||||
|
|
||||||
import cmd
|
import cmd
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -63,15 +75,8 @@ class Monitor(cmd.Cmd):
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
def usage(self):
|
def usage(self):
|
||||||
print """\
|
usage = __doc__ % sys.argv[0]
|
||||||
\rUsage: monitor.py [options]
|
self._output(usage)
|
||||||
\rOptions:
|
|
||||||
-h, --help : Show this message
|
|
||||||
-m, --mpu <device> : Choose which MPU to emulate (default is 6502)
|
|
||||||
-l, --load <file> : Load a file at address 0
|
|
||||||
-r, --rom <file> : Load a rom at the top of address space and reset into it
|
|
||||||
-g, --goto <address> : Perform a goto command after loading any files
|
|
||||||
"""
|
|
||||||
|
|
||||||
def onecmd(self, line):
|
def onecmd(self, line):
|
||||||
line = self._preprocess_line(line)
|
line = self._preprocess_line(line)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user