File tree Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1- Usage: pmt.py [options] models
1+ Usage: pmt [options] models
22
33models is a list of one or more module names (with no .py suffix).
44Each module named in models must contain a model, that is: a model
Original file line number Diff line number Diff line change 1- Usage: pmv.py [options] models
1+ Usage: pmv [options] models
22
33PyModel Viewer. A single program that invokes pma, pmg, and Graphviz
44dot to to perform analysis, generate dot commands, and generate a file
Original file line number Diff line number Diff line change 44
55from optparse import OptionParser
66
7- usage = """pmt.py [options] models
7+ usage = """pmt [options] models
88
99models is a list of one or more module names (with no .py suffix).
1010Each module named in models must contain a model, that is: a model
Original file line number Diff line number Diff line change 44
55from optparse import OptionParser
66
7- usage = """pmv.py [options] models
7+ usage = """pmv [options] models
88
99PyModel Viewer. A single program that invokes pma, pmg, and Graphviz
1010dot to to perform analysis, generate dot commands, and generate a file
Original file line number Diff line number Diff line change @@ -34,14 +34,18 @@ def command(cmd):
3434
3535def main ():
3636 (options , args ) = ViewerOptions .parse_args ()
37- basename = options .__dict__ ['output' ] if options .__dict__ ['output' ] else '%sFSM' % args [0 ]
38- pma = 'pma ' + make_opts (pma_keys , options ) + ' ' + ' ' .join (args )
39- command (pma )
40- pmg = 'pmg ' + make_opts (pmg_keys , options ) + ' %s' % basename
41- command (pmg )
42- dot = 'dot -T%(type)s -o %(name)s.%(type)s %(name)s.dot' % \
43- {'type' : options .__dict__ ['fileType' ], 'name' : basename }
44- command (dot )
37+ if not args :
38+ ViewerOptions .print_help ()
39+ exit ()
40+ else :
41+ basename = options .__dict__ ['output' ] if options .__dict__ ['output' ] else '%sFSM' % args [0 ]
42+ pma = 'pma ' + make_opts (pma_keys , options ) + ' ' + ' ' .join (args )
43+ command (pma )
44+ pmg = 'pmg ' + make_opts (pmg_keys , options ) + ' %s' % basename
45+ command (pmg )
46+ dot = 'dot -T%(type)s -o %(name)s.%(type)s %(name)s.dot' % \
47+ {'type' : options .__dict__ ['fileType' ], 'name' : basename }
48+ command (dot )
4549
4650if __name__ == ' __main__' :
4751 main ()
You can’t perform that action at this time.
0 commit comments