mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-26 04:32:51 +01:00
54 lines
3.8 KiB
HTML
54 lines
3.8 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<html><head><title>Python: module conf</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
</head><body bgcolor="#f0f0f8">
|
|
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
|
<tr bgcolor="#7799ee">
|
|
<td valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>conf</strong></big></big></font></td
|
|
><td align=right valign=bottom
|
|
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/gl/pylink/conf.py">/home/gl/pylink/conf.py</a></font></td></tr></table>
|
|
<p><tt>conf.py - PyLink configuration core.<br>
|
|
<br>
|
|
This module is used to access the complete configuration for the current<br>
|
|
PyLink instance. It will load the config on first import, taking the<br>
|
|
configuration file name from the first command-line argument, but defaulting<br>
|
|
to 'config.yml' if this isn't given.<br>
|
|
<br>
|
|
If world.testing is set to True, it will return a preset testing configuration<br>
|
|
instead.<br>
|
|
<br>
|
|
This module also provides simple checks for validating and loading YAML-format<br>
|
|
configurations from arbitrary files.</tt></p>
|
|
<p>
|
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
<tr bgcolor="#aa55cc">
|
|
<td colspan=3 valign=bottom> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
|
|
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
|
</td><td width="25%" valign=top><a href="world.html">world</a><br>
|
|
</td><td width="25%" valign=top><a href="yaml.html">yaml</a><br>
|
|
</td><td width="25%" valign=top></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> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
|
|
<td width="100%"><dl><dt><a name="-loadConf"><strong>loadConf</strong></a>(fname, errors_fatal=True)</dt><dd><tt>Loads a PyLink configuration file from the filename given.</tt></dd></dl>
|
|
<dl><dt><a name="-validateConf"><strong>validateConf</strong></a>(conf)</dt><dd><tt>Validates a parsed configuration dict.</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> <br>
|
|
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
|
|
|
|
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
|
|
<td width="100%"><strong>conf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7ff39bba5598>, {})}<br>
|
|
<strong>confname</strong> = 'testconf'<br>
|
|
<strong>fname</strong> = None<br>
|
|
<strong>testconf</strong> = {'bot': {'nick': 'PyLink', 'realname': 'PyLink Service Client', 'serverdesc': 'PyLink unit tests', 'user': 'pylink'}, 'logging': {'stdout': 'CRITICAL'}, 'servers': defaultdict(<function <lambda> at 0x7ff39bba5598>, {})}</td></tr></table>
|
|
</body></html> |