From: Stephen W. <st...@ke...> - 2003-12-19 14:41:20
|
Stephen Watson <st...@ke...> wrote: > Stuart Langridge <aqu...@kr...> wrote: > > > How am I best, from a ROX application, to find what the association is > > for documents of type text/html? Should I use rox.choices with the > > application set to "MIME-types" or do something else? > > Pretty much so. In Python: > > path=rox.choices.load('MIME-types', str(type)) Oops, that should be path=rox.choices.load('MIME-types', '%s_%s' % (type.media, type.subtype)) > if not path: > path=rox.choices.load('MIME-types', type.media) -- Stephen Watson http://www.kerofin.demon.co.uk/ I woke up and I had a big idea/To buy a new soul at the start of every year I paid up and it cost me pretty dear/Here's a hymn to those that disappear |