You are not logged in Log in Join
You are here: Home » Members » andym » C:\Documents and Settings\andym\Desktop\ZDictionary.py » View File

Log in
Name

Password

 

C:\Documents and Settings\andym\Desktop\ZDictionary.py

File details
Size
1 K
File type
text/plain

File contents

import xmlrpclib
import tempfile
import os
import time

term = 'macintosh'
server = 'http://fork:8080/test123'

start_time = time.time()
filename = tempfile.mktemp()
server = xmlrpclib.Server(server)
results = server.manage_search(term)

file = open(filename, 'w')
file.write('<html><pre>')
for res in results:
    for k, v in res.items():
        file.write('%s\t%s\n' % (k, v))
file.write('</pre></html>')
file.close()

print "Time taken = %s" % (time.time() - start_time)
os.system("explorer %s" % filename)