;ò Í×½Ec@s•dZdkZdkZdkZdklZd„Zd„ZedjoDedƒGHedƒGHedƒGHed ƒGHed ƒed ƒndS( sÍLook up or launch the handler for a URI. URIs are in the form scheme:other and the handler for a given scheme is .rox.sourceforge.net/URI/scheme To open up a web page in the user's prefered web browser: import rox.uri_handler try: pid=rox.uri_handler.launch('http://rox.sourceforge.net/') except: # Try firefox instead pid=os.spawnlp(os.P_NOWAIT, 'firefox', 'firefox', 'http://rox.sourceforge.net/') os.waitpid(pid) N(sbasedircCsk|djodSntidd|ƒ}| odSnti|ƒotii|dƒ}n|SdS(s‡Return the handler for URI's of the named scheme (e.g. http, file, ftp, etc.) The handler for file is always rox, otherwise it obtained from the configuration directory rox.sourceforge.net/URI. None is returned if no handler is defined. The returned string may contain %s in which case it should be replaced with the URI, otherwise append the URI (after a space). sfiles rox -U "%s"srox.sourceforge.netsURINsAppRun(sschemesbasedirsload_first_configspathsroxsisappdirsossjoin(sschemespath((sY/mnt/gmirror/ports/devel/py-roxlib/work/rox-lib2-2.0.5/ROX-Lib2/python/rox/uri_handler.pysgets cCsxti|ƒ}t|dƒ}| odSnd|jo||}n|d|}titiddd|ƒSdS(sýFor a given URI pass it to the appropriate launcher. rox.uri_handler.get() is used to look up the launcher command which is executed. The process id of the command is returned (see os.wait()), or None if no launcher is defined for that URI.iNs%ss sshs-c( surlparsesuriscompsgetshandlerscmdsossspawnlpsP_NOWAIT(suriscompscmdshandler((sY/mnt/gmirror/ports/devel/py-roxlib/work/rox-lib2-2.0.5/ROX-Lib2/python/rox/uri_handler.pyslaunch-s s__main__sfileshttpsmailtossvn+sshs file:///tmpshttp://rox.sf.net/(s__doc__sossurlparsesroxsbasedirsgetslaunchs__name__(sroxslaunchsbasedirsurlparsesgetsos((sY/mnt/gmirror/ports/devel/py-roxlib/work/rox-lib2-2.0.5/ROX-Lib2/python/rox/uri_handler.pys?s