Show
Ignore:
Timestamp:
02/02/06 16:13:01 (18 years ago)
Author:
jerome
Message:

Now the network dialog is binary safe.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/tests/test.py

    r106 r107  
    5050 
    5151    server = xmlrpclib.ServerProxy("http://%s:%s" % (arguments[0], arguments[1])) 
    52     #result = server.showDialog(message, yesno) 
     52    #result = server.showDialog(xmlrpclib.Binary(message), yesno) 
    5353    #""" 
    54     result = server.askDatas(["Username", "Password", "Billing code"], \ 
     54    result = server.askDatas([xmlrpclib.Binary(v) for v in ["Username", "Password", "Billing code"]], \ 
    5555                             ["username", "password", "billingcode"], \ 
    56                              {"username": username, \ 
    57                               "password": "cccccc", \ 
    58                               "billingcode" : billingcode}) 
     56                             {"username": xmlrpclib.Binary(username), \ 
     57                              "password": xmlrpclib.Binary(""), \ 
     58                              "billingcode" : xmlrpclib.Binary(billingcode)}) 
    5959    #"""                           
    6060    #server.quitApplication() 
    6161    if result["isValid"] : 
    62         print result # printing OK is safe. 
     62        print "\n".join(["%s => '%s'" % (k, v.data) for (k, v) in result.items() if k != "isValid"]) 
    6363    else :     
    6464        print "the end user closed the dialog box !"