def retrieve(self,stub,jobNumber,password):
# NEOS should return results as uu-encoded xmlrpclib.Binary data
results = self.neos.getFinalResults(jobNumber,password)
if isinstance(results,xmlrpclib.Binary):
results = results.data
#decode results to kestrel.sol
# Well try to anyway, any errors will result in error strings in .sol file
# instead of solution.
if stub[-4:] == '.sol':
stub = stub[:-4]
solfile = open(stub + ".sol","wb")
solfile.write(results)
solfile.close()
评论列表
文章目录