Connecting a Desktop App to a Web App

Daniel Fetchinson fetchinson at googlemail.com
Sun Jun 22 03:17:01 CEST 2008


> Okay, this is my first post to this mailing list, so first off if I
> shouldn't be sending something here, PLEASE correct me. Okay, so I
> want to create an app that has a GUI (most likely Tkinter) and will
> prompt the user to choose files and such and then will upload those
> files, either regularly or one time, whatever. But I don't know how to
> go abou doing such a thing, that is creating a app that will
> automatically upload to a back-up website(online storage). So if
> anyone can help me out or point me in the right direction that would
> be great. Thanks!

There are two cases: (1) you are in control of the web app (2) you are
not in control of the web app.

(1) So you need to make the web app yourself too. There are several
options for this the most popular ones are django and turbogears. For
more see http://wiki.python.org/moin/WebFrameworks Once you have your
web app up and running you can connect to it using some modules in the
stdlib: http://docs.python.org/lib/module-urllib2.html
http://docs.python.org/lib/module-httplib.html Basically you just
create http requests in your desktop app and send those just as a
browser would do.

(2) You need to figure out the API of the web app you want to connect
to. Once you have that use the stdlib modules to create the
appropriate http requests just as above.

HTH,
Daniel
-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list