脚本成功完成后,Python是否可以打印语句? 实施例的代码将是这样的: if 'code variable' == 0:
print "Script ran successfully"
else:
print "There was an error"
怎么能我的退出代码值传递给一个变量(例如“代码变量”)? 我觉得这将是一个很好的事情,包括在其他用户的脚本。 谢谢。
我正在使用Python 2.7。 class Client():
def __init__(self, host, server_port):
"""
This method is run when creating a new Client object
"""
self.host = 'localhost'
self.s