kestrel.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:pyomo 作者: Pyomo 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号