Changeset 762
- Timestamp:
- 07/22/07 01:34:17 (1 year ago)
- Files:
-
- pyrun/trunk/pyrun.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
pyrun/trunk/pyrun.py
r761 r762 417 417 # All pyrun options are short options. 418 418 nextopt = argv[ia][1:] 419 if nextopt in default_opts: 419 if nextopt in default_opts and ( 420 getattr(opts, nextopt) == default_opts[nextopt]): 420 421 421 422 # It's possibly a pyrun option. … … 483 484 import code 484 485 code.interact(banner=banner, local=locals()) 486 487 # If we were not in interactive mode and the print path options 488 # is set, print it. 485 489 if pthextend and opts.p and not opts.i: 486 490 for p in pthextend: 487 491 print p 492 493 # If we were not in interactive mode and the print PYTHONPATH 494 # option is set, print it 488 495 if pthextend and opts.P and not opts.i: 489 496 print os.pathsep.join(pthextend) 490 497 491 if not (opts.n or opts.d or opts.i) and opts.m: 492 return run_module() 498 if not (opts.n or opts.d or opts.i) and modname: 499 exitval = run_module() 500 if not isinstance(exitval, int): 501 return 0 502 return exitval 493 503 return 0 494 504