Page 1 of 1

file upload option using wxPython

Posted: Thu Nov 10, 2016 6:08 am
by pikkip
I need to implement file upload option in wxPython. Can anyone tell me how to do it??? :(

Re: file upload option using wxPython

Posted: Thu Nov 10, 2016 10:33 am
by doublemax
Upload to where? To an ftp server would be easy using wxFTP. A HTTP upload should be possible using wxHTTP and wxHTTP::SetPostBuffer or wxHTTP::SetPostText, but you'd have to build the http buffer your self and of course you need a CGI script on the receiving side.

Re: file upload option using wxPython

Posted: Thu Nov 10, 2016 10:51 am
by pikkip
I have to compare two files to find the difference in their content in Python. I created a frame using wxpython. It has an option to choose number of files to be compared. After that the option of adding those files to it is what I meant. I have attached a sample image for clarity.

Re: file upload option using wxPython

Posted: Thu Nov 10, 2016 12:20 pm
by doublemax
There is no dedicated control for a file list like that. You could use two wxFilePickerCtrl's.

In the latest wxWidgets version you could also use wxAddRemoveCtrl, but i'm not sure if this is already available in wxPython.

Otherwise just use any list control, e.g. a wxListBox and a button to add more files.