Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)