Beispiel #1
0
def cmdline (argv=None):
    if argv is None:
        argv = sys.argv
        cli.unicode_stdio ()

    cli.check_usage (__doc__, argv, usageifnoargs='long')
    doit (Config ().parse (argv[1:]))
Beispiel #2
0
def cmdline(argv=None):
    if argv is None:
        argv = sys.argv
        cli.unicode_stdio()

    cli.check_usage(__doc__, argv, usageifnoargs='long')
    doit(argv[1], argv[2:])
Beispiel #3
0
def main():
    import sys
    from pwkit import cli

    cli.unicode_stdio()
    cli.propagate_sigint()
    cli.backtrace_on_usr1()
    entrypoint(sys.argv)
Beispiel #4
0
def set_cal_ms_name(calpath, vispath):
    """Work around the(ill-conceived) restriction that cal tables should only
    be applied to MSes with the same name as they came from."""

    tb = util.tools.table()
    tb.open(calpath, nomodify=False)
    tb.putkeyword('MSName', vispath)
    tb.close()


if __name__ == '__main__':
    import sys, time
    from pwkit import cli

    cli.propagate_sigint()
    cli.unicode_stdio()

    if len(sys.argv) == 1:
        print(blocks_doc)
        sys.exit(0)

    g = globals()

    for name in sys.argv[1:]:
        name = name.split(':', 1)[0]
        if name not in g:
            print('error: no step "%s"' % name, file=sys.stderr)
            sys.exit(1)

    for name in sys.argv[1:]:
        pieces = name.split(':', 1)