Ejemplo n.º 1
0
 def do_generate_int_macro(self, line):
     if line == '':
         raise PappyException('Macro name is required')
     args = shlex.split(line)
     name = args[0]
     script_str = gen_imacro()
     fname = 'int_%s.py' % name
     with open(fname, 'wc') as f:
         f.write(script_str)
     print 'Wrote script to %s' % fname
Ejemplo n.º 2
0
 def do_generate_int_macro(self, line):
     if line == '':
         raise PappyException('Macro name is required')
     args = shlex.split(line)
     name = args[0]
     script_str = gen_imacro()
     fname = 'int_%s.py' % name
     with open(fname, 'wc') as f:
         f.write(script_str)
     print 'Wrote script to %s' % fname
Ejemplo n.º 3
0
def generate_int_macro(line):
    """
    Generate an intercepting macro script
    Usage: generate_int_macro <name>
    """
    if line == '':
        raise PappyException('Macro name is required')
    args = shlex.split(line)
    name = args[0]
    script_str = gen_imacro()
    fname = 'int_%s.py' % name
    with open(fname, 'wc') as f:
        f.write(script_str)
    print 'Wrote script to %s' % fname
Ejemplo n.º 4
0
def generate_int_macro(line):
    """
    Generate an intercepting macro script
    Usage: generate_int_macro <name>
    """
    if line == "":
        raise PappyException("Macro name is required")
    args = shlex.split(line)
    name = args[0]
    script_str = gen_imacro()
    fname = "int_%s.py" % name
    with open(fname, "wc") as f:
        f.write(script_str)
    print "Wrote script to %s" % fname