/usr/lib/python3/dist-packages/pudb/run.py is in python3-pudb 2014.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | def main():
import sys
from optparse import OptionParser
parser = OptionParser(
usage="usage: %prog [options] SCRIPT-TO-RUN [SCRIPT-ARGUMENTS]")
parser.add_option("-s", "--steal-output", action="store_true"),
parser.add_option("--pre-run", metavar="COMMAND",
help="Run command before each program run",
default="")
parser.disable_interspersed_args()
options, args = parser.parse_args()
if len(args) < 1:
parser.print_help()
sys.exit(2)
mainpyfile = args[0]
from os.path import exists
if not exists(mainpyfile):
print('Error: %s does not exist' % mainpyfile)
sys.exit(1)
sys.argv = args
from pudb import runscript
runscript(mainpyfile,
pre_run=options.pre_run,
steal_output=options.steal_output)
if __name__=='__main__':
main()
|