Nick Raptis
Wed, 01 Sep 2010 01:48:18 -0700
On 09/01/2010 11:17 AM, Alan Gauld wrote:
"Ranjith Kumar" <ranjitht...@gmail.com> wroteI`m using ubuntu how to find and print the installed web browsers usingpython scripting.How would you do it without Python scripting? Is it even possible? And on a multiuser system like Linux would you print out all the browsers installed for the current user or for all users?
Alan, let me make a wild guess here.Ubuntu does have little "Preferred applications" config tool. I don't know how or where it stores this data, but my guess is it's the same place xdg (as in xdg-open) gets it's configuration from. This article might help http://www.crystalorb.net/mikem/xdg-settings.html
Quote from above article (near the end): "...especially as there is (currently) no single, portable, authoritative way for applications to query the values of these settings..."
Ranjith, get ready for some configuration file parsing.But if you just want to open a url with the default browser, you can just execute "xdg-open your-url" as a subprocess.
Hope I shifted you to the right direction. NickPS-trivia: I got to guess these just because I've read the source from "import antigravity"
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor