Nick Raptis
Wed, 01 Sep 2010 01:53:16 -0700
On 09/01/2010 11:46 AM, Nick Raptis wrote:
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.htmlQuote 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"
Ooops! Sorry if I caused any confusion, I thought the goal was to print the default browser, not all of the installed ones. Silly me. Still, the "Preferred applications" tool seems to know that info (so to give you a choice) so it might be something to dig into.
Nick _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor