开发者

wxpython browse file (code needed)

Can anybody post up an easy code snippet for wxpython that allows the user to browse for a *.html fil开发者_Python百科e and have the python program take that .html file the user browsed to, and move it to a folder on my Desktop called "user-site"? I really need help making this browse feature.. any help is much appreciated. Thx in advance! :)


If you don't already have it, download the excellent wxPython demo. In the Common Dialogs section of the demo there is a FileDialog example that shows you how to do the first part. In the block starting with if dlg.ShowModal() == wx.ID_OK: you'll need something like shutil.move(path, "C:\path\to\your\Desktop\user-site"). (See shutil.move())

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜