def main(): client = myclient.MyClient() print client.add(1, 2) print client.now() print client.add(1, 2) client.ok() try: client.err() except Exception, e: print str(e)
def main(): client=myclient.MyClient() print client.add(1,2) print client.now() print client.add(1,2) # client.ok([i for i in range(100)]) try: client.err() except Exception,e: print str(e)
def main(): client = myclient.MyClient() a1 = time.time() tmp = 0 for i in range(10000): tmp = client.add(y=1011230, x=212312345121200) # client.now() # client.add(1,2) print time.time() - a1 print tmp client.ok() try: client.qq() except Exception, e: print str(e)
import socket, select, sys import myclient import threading if __name__ == '__main__': serverPort = 6666 serverHost = sys.argv[1] mainClient = myclient.MyClient() mainClient.Start(serverHost, serverPort)
import os import myclient import time files = open('filenames_R147.txt', 'r') for line in files: line = line.strip() end = line.find('.fits') start = line.find('R147_') print line cli = myclient.MyClient() ### Put your API key below in places of xxxxxxx cli.login('xxxxxxxxxxxxxx') #Set some solving options opts=dict() opts['allow_commercial_use'] = 'n' opts['allow_modifications'] = 'n' opts['publicly_visible'] = 'n' opts['scale_units'] = "arcsecperpix" opts['scale_lower'] = 3.9 opts['scale_upper'] = 4.1 opts['tweak_order'] = 1 #Upload an image cli.upload(line, **opts) #Save state in case of problems. This uses python shelves underneath #so it's not portable between machines. To restore a client in