Das ganze sieht so aus:
Code: Alles auswählen
def clearDropBox (fenster):
for root, dirs, files in os.walk('/home'):
# fenster.text_ctrl_pfad.Update ()
for file in files:
fenster.text_ctrl_pfad.SetValue (os.path.join(root, file))
if fnmatch.fnmatch(file, '*conflicted*.*') or fnmatch.fnmatch (root, '*conflicted*.*'):
print (os.path.join(root, file))
fenster.Destroy ()
if __name__ == "__main__":
app = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
cleardropbox = wx_cleardropbox(None, -1, "")
app.SetTopWindow(cleardropbox)
cleardropbox.Show()
start_new_thread(clearDropBox,(cleardropbox,))
app.MainLoop()