【发布时间】:2014-11-23 00:17:10
【问题描述】:
我想确认上传是否成功,我定义了类似于以下的方法。但是全局变量的值没有改变。请帮忙
global upload_confirm
upload_confirm = False
def confirm_upload():
upload_confirm = True
def start_new_upload():
confirm_upload()
while (upload_confirm != True):
print "waiting for upload to be true"
time.sleep(5)
if (upload_confirm == True):
print "start Upload"
start_new_upload()
【问题讨论】:
标签: python