1
파이썬 프로그램은 .py 스크립트에서 실행할 때 잘 작동하는 많은 기능을 가지고 있습니다. py2exe로 컴파일 한 후에 코드의 여러 섹션이 매우 모순 된 동작을합니다.py2exe는 소스 .py 파일과 일치하지 않습니다.
이 절의 실패는 매우 일관된 것 같습니다.
def unzipItem(self, fileName, destination):
print "--unzipItem--"
zip = zipfile.ZipFile(fileName)
nameList = zip.namelist()
fileCount = 0
for item in nameList:
fileCount += 1
dlg = wx.ProgressDialog("Unziping files",
"An informative message",
fileCount,
parent = self,
)
keepGoing = True
count = 0
for item in nameList:
count += 1
dir,file = os.path.split(item)
print "unzip " + file
self.SetStatusText("Unziping " + str(item))
(keepGoing, skip) = dlg.Update(count, file)
zip.extract(item,destination)
zip.close()
dlg.Destroy()
ProcessDialog가 나타나지 않으며 SetStatusText가 GUI를 업데이트하지 않습니다.