Пример #1
0
def command2():
    n = random.choice(range(5))
    text = random.choice(["hola", "hi", "bonjour"])
    
    args = (n, text)
    print "Calling command 2. Arguments: %s, %s" % args
    res = pydim.dic_cmnd_service("example-command-2", args, "I:1;C")
Пример #2
0
def command2():
    n = random.choice(range(5))
    text = random.choice(["hola", "hi", "bonjour"])

    args = (n, text)
    print "Calling command 2. Arguments: %s, %s" % args
    res = pydim.dic_cmnd_service("example-command-2", args, "I:1;C")
Пример #3
0
def command1():
    
    f = random.choice([math.pi, math.e, 42])
    
    #The argument must be a tuple
    args = (f,)
    print "Calling command 1. Arguments: %s" % args
    res = pydim.dic_cmnd_service("example-command-1", args, "F")
Пример #4
0
def command1():

    f = random.choice([math.pi, math.e, 42])

    # The argument must be a tuple
    args = (f, )
    print "Calling command 1. Arguments: %s" % args
    res = pydim.dic_cmnd_service("example-command-1", args, "F")