def tangle(): if len(sys.argv) == 1: print("This is Ptangle %s, enter Ptangle -h for help" % pweave.__version__) sys.exit() parser = OptionParser(usage="Ptangle sourcefile", version="Pweave " + pweave.__version__) (options, args) = parser.parse_args() try: infile = args[0] except IndexError: infile = "" pweave.tangle(infile)
def tangle(): if len(sys.argv) == 1: print("This is ptangle %s, enter ptangle -h for help" % pweave.__version__) sys.exit() parser = OptionParser(usage="ptangle sourcefile", version="Pweave " + pweave.__version__) parser.add_option("-i", "--input-format", dest="informat", default=None, help="Input format: noweb, markdown, notebook or script") (options, args) = parser.parse_args() try: infile = args[0] except IndexError: infile = "" pweave.tangle(infile, options.informat)