Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Update of "api-config"

Overview

Artifact ID: 08e770f6c2b8d3fa773b92536f62842b77f803e1
Page Name:api-config
Date: 2017-02-20 15:16:10
Original User: mario
Mimetype:text/html
Parent: 4fbc11d5e2e6bde753a53f478e9e6a951d6c3420 (diff)
Content

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>config</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="streamtuner2/config.py"> streamtuner2/config.py</a></font></td></tr></table>
    <p><tt>#&nbsp;encoding:&nbsp;UTF-8<br>
#&nbsp;api:&nbsp;streamtuner2<br>
#&nbsp;type:&nbsp;class<br>
#&nbsp;title:&nbsp;global&nbsp;config&nbsp;object<br>
#&nbsp;description:&nbsp;reads&nbsp;~/.config/streamtuner/*.json&nbsp;files<br>
#&nbsp;config:<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;-d,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type:&nbsp;str,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;disable[],&nbsp;description:&nbsp;Omit&nbsp;plugin&nbsp;from&nbsp;initialization.&nbsp;&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;-e,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type:&nbsp;str,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;enable[],&nbsp;&nbsp;description:&nbsp;Add&nbsp;channel&nbsp;plugin.&nbsp;&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;--gtk3,&nbsp;type:&nbsp;boolean,&nbsp;&nbsp;name:&nbsp;gtk3,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description:&nbsp;Start&nbsp;with&nbsp;Gtk3&nbsp;interface.&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;--nt,&nbsp;&nbsp;&nbsp;type:&nbsp;boolean,&nbsp;&nbsp;name:&nbsp;nothreads,&nbsp;description:&nbsp;Disable&nbsp;threading/gtk_idle&nbsp;UI.&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;-D,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type:&nbsp;boolean,&nbsp;&nbsp;name:&nbsp;debug,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description:&nbsp;Enable&nbsp;debug&nbsp;messages&nbsp;on&nbsp;console&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;action,&nbsp;type:&nbsp;str&nbsp;*,&nbsp;&nbsp;&nbsp;&nbsp;name:&nbsp;action[],&nbsp;&nbsp;description:&nbsp;CLI&nbsp;interface&nbsp;commands.&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;-x,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type:&nbsp;boolean,&nbsp;&nbsp;name:&nbsp;exit,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hidden:&nbsp;1&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;-V,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type:&nbsp;boolean,&nbsp;&nbsp;name:&nbsp;version,&nbsp;&nbsp;&nbsp;description:&nbsp;Print&nbsp;version.&nbsp;&nbsp;}<br>
#&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;arg:&nbsp;-w,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type:&nbsp;boolean,&nbsp;&nbsp;name:&nbsp;pydoc,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hiden:&nbsp;1&nbsp;&nbsp;}<br>
#&nbsp;version:&nbsp;2.7<br>
#&nbsp;priority:&nbsp;core<br>
#&nbsp;depends:&nbsp;pluginconf&nbsp;&gt;=&nbsp;0.1,&nbsp;os,&nbsp;json,&nbsp;re,&nbsp;zlib,&nbsp;pkgutil<br>
#<br>
#&nbsp;Ties&nbsp;together&nbsp;the&nbsp;global&nbsp;conf.*&nbsp;object.&nbsp;It's&nbsp;typically&nbsp;used<br>
#&nbsp;in&nbsp;the&nbsp;main&nbsp;application&nbsp;and&nbsp;modules&nbsp;with:<br>
#<br>
#&nbsp;&nbsp;&nbsp;from&nbsp;config&nbsp;import&nbsp;*<br>
#<br>
#&nbsp;The&nbsp;underlying&nbsp;ConfigDict&nbsp;class&nbsp;is&nbsp;already&nbsp;instantiated&nbsp;and<br>
#&nbsp;imported&nbsp;as&nbsp;`conf`&nbsp;then.<br>
#<br>
#&nbsp;With&nbsp;.save()&nbsp;or&nbsp;.load()&nbsp;it&nbsp;handles&nbsp;storage&nbsp;as&nbsp;JSON.&nbsp;Both<br>
#&nbsp;utility&nbsp;functions&nbsp;are&nbsp;also&nbsp;used&nbsp;for&nbsp;other&nbsp;cache&nbsp;files.<br>
#&nbsp;More&nbsp;specific&nbsp;config&nbsp;stores&nbsp;are&nbsp;available&nbsp;per&nbsp;.netrc(),<br>
#&nbsp;and&nbsp;.init_args().<br>
#<br>
#&nbsp;Whereas&nbsp;plugin&nbsp;utility&nbsp;code&nbsp;is&nbsp;available&nbsp;per&nbsp;<a href="#-plugin_meta">plugin_meta</a>(),<br>
#&nbsp;<a href="#-module_list">module_list</a>(),&nbsp;and&nbsp;<a href="#-get_data">get_data</a>().&nbsp;There's&nbsp;a&nbsp;prepared&nbsp;function<br>
#&nbsp;for&nbsp;add_plugin_config()&nbsp;on&nbsp;initialization.<br>
#<br>
#&nbsp;Also&nbsp;provides&nbsp;a&nbsp;simple&nbsp;logging&nbsp;interface&nbsp;with&nbsp;log.TYPE(...),<br>
#&nbsp;which&nbsp;is&nbsp;also&nbsp;pre-instantiated.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a
href="https://docs.python.org/3/library/argparse.html">argparse</a><br>
<a href="https://docs.python.org/3/library/glob.html">glob</a><br>
<a href="https://docs.python.org/3/library/gzip.html">gzip</a><br>
<a href="https://docs.python.org/3/library/inspect.html">inspect</a><br>
</td><td width="25%" valign=top><a href="https://docs.python.org/3/library/json.html">json</a><br>
<a href="https://docs.python.org/3/library/os.html">os</a><br>
<a href="https://docs.python.org/3/library/pkgutil.html">pkgutil</a><br>
<a href="https://docs.python.org/3/library/platform.html">platform</a><br>
</td><td width="25%" valign=top><a href="api-pluginconf">pluginconf</a><br>
<a href="https://docs.python.org/3/library/re.html">re</a><br>
<a href="https://docs.python.org/3/library/sys.html">sys</a><br>
<a href="https://docs.python.org/3/library/zipfile.html">zipfile</a><br>
</td><td width="25%" valign=top><a href="https://docs.python.org/3/library/zlib.html">zlib</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-find_executable"><strong>find_executable</strong></a>(executable, path<font color="#909090">=None</font>)</dt><dd><tt>Tries&nbsp;to&nbsp;find&nbsp;'executable'&nbsp;in&nbsp;the&nbsp;directories&nbsp;listed&nbsp;in&nbsp;'path'.<br>
&nbsp;<br>
A&nbsp;string&nbsp;listing&nbsp;directories&nbsp;separated&nbsp;by&nbsp;'os.pathsep';&nbsp;defaults&nbsp;to<br>
os.environ['PATH'].&nbsp;&nbsp;Returns&nbsp;the&nbsp;complete&nbsp;filename&nbsp;or&nbsp;None&nbsp;if&nbsp;not&nbsp;found.</tt></dd></dl>
 <dl><dt><a name="-get_data"><strong>get_data</strong></a>(fn, decode<font color="#909090">=False</font>, gz<font color="#909090">=False</font>, file_base<font color="#909090">=None</font>)</dt><dd><tt>#&nbsp;Resource&nbsp;retrieval<br>
#&nbsp;‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾<br>
#&nbsp;Fetches&nbsp;file&nbsp;content&nbsp;from&nbsp;install&nbsp;path&nbsp;or&nbsp;from&nbsp;within&nbsp;PYZ<br>
#&nbsp;archive.&nbsp;This&nbsp;is&nbsp;just&nbsp;an&nbsp;alias&nbsp;and&nbsp;convenience&nbsp;wrapper&nbsp;for<br>
#&nbsp;pkgutil.<a href="#-get_data">get_data</a>().<br>
#&nbsp;Utilizes&nbsp;the&nbsp;module_base&nbsp;/&nbsp;file_base&nbsp;as&nbsp;top-level&nbsp;reference.</tt></dd></dl>
 <dl><dt><a name="-module_list"><strong>module_list</strong></a>(extra_paths<font color="#909090">=[]</font>)</dt><dd><tt>#&nbsp;Plugin&nbsp;name&nbsp;lookup<br>
#&nbsp;‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾<br>
#&nbsp;Search&nbsp;through&nbsp;./plugins/&nbsp;(and&nbsp;other&nbsp;configured&nbsp;plugin_base<br>
#&nbsp;names&nbsp;→&nbsp;paths)&nbsp;and&nbsp;get&nbsp;module&nbsp;basenames.</tt></dd></dl>
 <dl><dt><a name="-plugin_meta"><strong>plugin_meta</strong></a>(fn<font color="#909090">=None</font>, src<font color="#909090">=None</font>, module<font color="#909090">=None</font>, frame<font color="#909090">=1</font>, extra_base<font color="#909090">=[]</font>)</dt><dd><tt>#&nbsp;Plugin&nbsp;meta&nbsp;data&nbsp;extraction<br>
#&nbsp;‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾<br>
#&nbsp;Can&nbsp;fetch&nbsp;infos&nbsp;from&nbsp;different&nbsp;sources:<br>
#<br>
#&nbsp;&nbsp;&nbsp;fn=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;read&nbsp;literal&nbsp;files,&nbsp;or&nbsp;.pyz&nbsp;contents<br>
#<br>
#&nbsp;&nbsp;&nbsp;src=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;already&nbsp;uncovered&nbsp;script&nbsp;code<br>
#<br>
#&nbsp;&nbsp;&nbsp;module=&nbsp;&nbsp;lookup&nbsp;per&nbsp;pkgutil,&nbsp;from&nbsp;plugin&nbsp;bases<br>
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;top-level&nbsp;modules<br>
#<br>
#&nbsp;&nbsp;&nbsp;frame=&nbsp;&nbsp;&nbsp;extract&nbsp;comment&nbsp;header&nbsp;of&nbsp;caller<br>
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(default)</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__all__</strong> = ['conf', 'log', 'plugin_meta', 'module_list', 'get_data', 'find_executable']<br>
<strong>conf</strong> = {u'filter_walledgardens': True, u'radionomy_page...e/mario/.config/streamtuner2', u'history': u'20'}<br>
<strong>log</strong> = &lt;config.log_printer object&gt;</td></tr></table>