Updated Python I2P version 0.91 by sunshine
This commit is contained in:
18
apps/sam/python/doc/epydoc/calldoc.py
Normal file
18
apps/sam/python/doc/epydoc/calldoc.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/local/bin/python
|
||||||
|
|
||||||
|
#
|
||||||
|
# Call the command line interface for Epydoc.
|
||||||
|
#
|
||||||
|
|
||||||
|
# We have to do some path magic to prevent Python from getting
|
||||||
|
# confused about the difference between this epydoc module, and the
|
||||||
|
# real epydoc package. So sys.path[0], which contains the directory
|
||||||
|
# of the script.
|
||||||
|
import sys, os.path
|
||||||
|
script_path = os.path.abspath(sys.path[0])
|
||||||
|
sys.path = [p for p in sys.path if
|
||||||
|
os.path.abspath(p) != script_path]
|
||||||
|
|
||||||
|
from epydoc.cli import cli
|
||||||
|
cli()
|
||||||
|
|
35
apps/sam/python/doc/epydoc/makedoc.py
Normal file
35
apps/sam/python/doc/epydoc/makedoc.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Make epydoc HTML documentation in the 'html' subdirectory.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import epydoc as epydoc_
|
||||||
|
import inspect
|
||||||
|
import os, sys
|
||||||
|
|
||||||
|
def epydoc(args):
|
||||||
|
"""Run epydoc (command line) with given argument string."""
|
||||||
|
os.system('python calldoc.py ' + args)
|
||||||
|
|
||||||
|
def makedoc():
|
||||||
|
"""Make all epydoc HTML documentation for Python I2P library."""
|
||||||
|
modlist = [
|
||||||
|
'i2p',
|
||||||
|
'i2p.eep',
|
||||||
|
'i2p.tunnel',
|
||||||
|
'i2p.router',
|
||||||
|
'i2p.socket',
|
||||||
|
'i2p.select',
|
||||||
|
'i2p.samclasses',
|
||||||
|
'i2p.CGIHTTPServer',
|
||||||
|
'i2p.SimpleHTTPServer',
|
||||||
|
'i2p.BaseHTTPServer',
|
||||||
|
'i2p.SocketServer',
|
||||||
|
'i2p.pylib'
|
||||||
|
]
|
||||||
|
modlist.reverse()
|
||||||
|
epydoc('--html ' + ' '.join(modlist))
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
makedoc()
|
@ -1,40 +0,0 @@
|
|||||||
|
|
||||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module i2p.eep</title>
|
|
||||||
</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><a href="i2p.html"><font color="#ffffff">i2p</font></a>.eep</strong></big></big></font></td
|
|
||||||
><td align=right valign=bottom
|
|
||||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///D|/code/i2p/i2p/eep.py">d:\code\i2p\i2p\eep.py</a></font></td></tr></table>
|
|
||||||
<p><tt>Eeproxy Python API</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="#fffff" 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="urllib2.html">urllib2</a><br>
|
|
||||||
</td><td width="25%" valign=top></td><td width="25%" valign=top></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="-urlget"><strong>urlget</strong></a>(url, eepaddr<font color="#909090">='127.0.0.1:4444'</font>)</dt><dd><tt>Get contents of an eepsite.<br>
|
|
||||||
Example: <a href="#-urlget">urlget</a>('<a href="http://duck.i2p/">http://duck.i2p/</a>').</tt></dd></dl>
|
|
||||||
<dl><dt><a name="-urlopen"><strong>urlopen</strong></a>(url, eepaddr<font color="#909090">='127.0.0.1:4444'</font>)</dt><dd><tt>Like urllib2.<a href="#-urlopen">urlopen</a>(url), but only works for eep-sites.<br>
|
|
||||||
Example: f = <a href="#-urlopen">urlopen</a>('<a href="http://duck.i2p/index.html">http://duck.i2p/index.html</a>')</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>eepaddr</strong> = '127.0.0.1:4444'</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,90 +0,0 @@
|
|||||||
|
|
||||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: package i2p</title>
|
|
||||||
</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>i2p</strong></big></big></font></td
|
|
||||||
><td align=right valign=bottom
|
|
||||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///D|/code/i2p/i2p/__init__.py">d:\code\i2p\i2p\__init__.py</a></font></td></tr></table>
|
|
||||||
<p><tt>i2p -- I2P Python interface</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>Package Contents</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="i2p.eep.html">eep</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="i2p.router.html">router</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="i2p.sam.html">sam</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="i2p.samclasses.html">samclasses</a><br>
|
|
||||||
</td></tr></table></td></tr></table><p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ee77aa">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%"><dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.html#Error">Error</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.html#RouterError">RouterError</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Base class for all I2P errors.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="RouterError">class <strong>RouterError</strong></a>(<a href="i2p.html#Error">Error</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Could not connect to router.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="i2p.html#RouterError">RouterError</a></dd>
|
|
||||||
<dd><a href="i2p.html#Error">Error</a></dd>
|
|
||||||
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="RouterError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="RouterError-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="RouterError-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table></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>__all__</strong> = ['Error', 'RouterError', 'sam', 'eep', 'router']</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,38 +0,0 @@
|
|||||||
|
|
||||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module i2p.router</title>
|
|
||||||
</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><a href="i2p.html"><font color="#ffffff">i2p</font></a>.router</strong></big></big></font></td
|
|
||||||
><td align=right valign=bottom
|
|
||||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///D|/code/i2p/i2p/router.py">d:\code\i2p\i2p\router.py</a></font></td></tr></table>
|
|
||||||
<p><tt>Router Control API for Python</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="#fffff" 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="i2p.html">i2p</a><br>
|
|
||||||
<a href="os.html">os</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="socket.html">socket</a><br>
|
|
||||||
<a href="sys.html">sys</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="threading.html">threading</a><br>
|
|
||||||
<a href="time.html">time</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="urllib2.html">urllib2</a><br>
|
|
||||||
</td></tr></table></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>check_addrlist</strong> = ['127.0.0.1:7656', '127.0.0.1:4444']<br>
|
|
||||||
<strong>our_router</strong> = False<br>
|
|
||||||
<strong>our_router_lock</strong> = <thread.lock object at 0x008AD0F0><br>
|
|
||||||
<strong>router_config</strong> = 'router.config'</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,374 +0,0 @@
|
|||||||
|
|
||||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module i2p.sam</title>
|
|
||||||
</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><a href="i2p.html"><font color="#ffffff">i2p</font></a>.sam</strong></big></big></font></td
|
|
||||||
><td align=right valign=bottom
|
|
||||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///D|/code/i2p/i2p/sam.py">d:\code\i2p\i2p\sam.py</a></font></td></tr></table>
|
|
||||||
<p><tt>SAM Python API</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="#fffff" 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="Queue.html">Queue</a><br>
|
|
||||||
<a href="copy.html">copy</a><br>
|
|
||||||
<a href="i2p.html">i2p</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="select.html">select</a><br>
|
|
||||||
<a href="socket.html">socket</a><br>
|
|
||||||
<a href="i2p.samclasses.html">i2p.samclasses</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="thread.html">thread</a><br>
|
|
||||||
<a href="threading.html">threading</a><br>
|
|
||||||
<a href="time.html">time</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="#ee77aa">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%"><dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.html#Error">i2p.Error</a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.sam.html#Error">Error</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.sam.html#BlockError">BlockError</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.sam.html#ClosedError">ClosedError</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.sam.html#NetworkError">NetworkError</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.sam.html#Timeout">Timeout</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.sam.html#Poll">Poll</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.sam.html#Socket">Socket</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.sam.html#Tunnel">Tunnel</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.sam.html#TunnelClient">TunnelClient</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.sam.html#TunnelServer">TunnelServer</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="BlockError">class <strong>BlockError</strong></a>(<a href="i2p.sam.html#Error">Error</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt><a href="#Socket">Socket</a> call would have blocked.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="i2p.sam.html#BlockError">BlockError</a></dd>
|
|
||||||
<dd><a href="i2p.sam.html#Error">Error</a></dd>
|
|
||||||
<dd><a href="i2p.html#Error">i2p.Error</a></dd>
|
|
||||||
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="BlockError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="BlockError-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="BlockError-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="ClosedError">class <strong>ClosedError</strong></a>(<a href="i2p.sam.html#Error">Error</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>A command was used on a socket that closed gracefully.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="i2p.sam.html#ClosedError">ClosedError</a></dd>
|
|
||||||
<dd><a href="i2p.sam.html#Error">Error</a></dd>
|
|
||||||
<dd><a href="i2p.html#Error">i2p.Error</a></dd>
|
|
||||||
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="ClosedError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ClosedError-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="ClosedError-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="i2p.html#Error">i2p.Error</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Base class for all SAM errors.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="i2p.sam.html#Error">Error</a></dd>
|
|
||||||
<dd><a href="i2p.html#Error">i2p.Error</a></dd>
|
|
||||||
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="NetworkError">class <strong>NetworkError</strong></a>(<a href="i2p.sam.html#Error">Error</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Network error occurred within I2P.<br>
|
|
||||||
The error object is a 2-tuple: (errtag, errdesc).<br>
|
|
||||||
errtag is a SAM error string,<br>
|
|
||||||
errdesc is a human readable error description.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="i2p.sam.html#NetworkError">NetworkError</a></dd>
|
|
||||||
<dd><a href="i2p.sam.html#Error">Error</a></dd>
|
|
||||||
<dd><a href="i2p.html#Error">i2p.Error</a></dd>
|
|
||||||
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="NetworkError-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="NetworkError-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="NetworkError-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Poll">class <strong>Poll</strong></a></font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Class implementing poll interface. Works for Python sockets<br>
|
|
||||||
and SAM sockets.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="Poll-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Poll-poll"><strong>poll</strong></a>(self, timeout<font color="#909090">=None</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Poll-register"><strong>register</strong></a>(self, fd, eventmask<font color="#909090">=13</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Poll-unregister"><strong>unregister</strong></a>(self, fd)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Socket">class <strong>Socket</strong></a></font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>A socket object.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="Socket-__deepcopy__"><strong>__deepcopy__</strong></a>(self, memo)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-__init__"><strong>__init__</strong></a>(self, session, type, samaddr<font color="#909090">='127.0.0.1:7656'</font>, **kwargs)</dt><dd><tt>Equivalent to socket().</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-accept"><strong>accept</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-bind"><strong>bind</strong></a>(self, address)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-close"><strong>close</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-connect"><strong>connect</strong></a>(self, address)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-connect_ex"><strong>connect_ex</strong></a>(self, address)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-getpeername"><strong>getpeername</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-getsockname"><strong>getsockname</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-gettimeout"><strong>gettimeout</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-listen"><strong>listen</strong></a>(self, backlog)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-makefile"><strong>makefile</strong></a>(self, mode<font color="#909090">='r'</font>, bufsize<font color="#909090">=-1</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-recv"><strong>recv</strong></a>(self, bufsize, flags<font color="#909090">=0</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-recvfrom"><strong>recvfrom</strong></a>(self, bufsize, flags<font color="#909090">=0</font>)</dt><dd><tt>For a datagram or raw socket, bufsize = -1 indicates that the<br>
|
|
||||||
entire packet should be retrieved.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-send"><strong>send</strong></a>(self, string, flags<font color="#909090">=0</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-sendall"><strong>sendall</strong></a>(self, string, flags<font color="#909090">=0</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-sendto"><strong>sendto</strong></a>(self, string, flags, address)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-setblocking"><strong>setblocking</strong></a>(self, flag)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Socket-settimeout"><strong>settimeout</strong></a>(self, value)</dt></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Properties defined here:<br>
|
|
||||||
<dl><dt><strong>dest</strong></dt>
|
|
||||||
<dd><tt>Local I2P Destination of socket</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>session</strong></dt>
|
|
||||||
<dd><tt>Session name</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>type</strong></dt>
|
|
||||||
<dd><tt><a href="#Socket">Socket</a> type: SOCK_STREAM, SOCK_DGRAM, or SOCK_RAW.</tt></dd>
|
|
||||||
</dl>
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Timeout">class <strong>Timeout</strong></a>(<a href="i2p.sam.html#Error">Error</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Time out occurred for a socket which had timeouts enabled<br>
|
|
||||||
via a prior call to settimeout().<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%"><dl><dt>Method resolution order:</dt>
|
|
||||||
<dd><a href="i2p.sam.html#Timeout">Timeout</a></dd>
|
|
||||||
<dd><a href="i2p.sam.html#Error">Error</a></dd>
|
|
||||||
<dd><a href="i2p.html#Error">i2p.Error</a></dd>
|
|
||||||
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
|
|
||||||
<dl><dt><a name="Timeout-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Timeout-__init__"><strong>__init__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Timeout-__str__"><strong>__str__</strong></a>(...)</dt></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Tunnel">class <strong>Tunnel</strong></a></font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="Tunnel-__init__"><strong>__init__</strong></a>(self, receive, make_send, nconnect<font color="#909090">=-1</font>, timeout<font color="#909090">=60.0</font>)</dt><dd><tt>A <a href="#Tunnel">Tunnel</a> relays connections from a 'receive' socket to one<br>
|
|
||||||
or more 'send' sockets. The receive socket must be bound<br>
|
|
||||||
and listening. For each incoming connection, a new send<br>
|
|
||||||
socket is created by calling make_send(). Data is then<br>
|
|
||||||
exchanged between the created streams until one socket is<br>
|
|
||||||
closed. nconnect is the maximum number of simultaneous<br>
|
|
||||||
connections (-1 for infinite), and timeout is the time that<br>
|
|
||||||
a single connection can last for (None allows a connection<br>
|
|
||||||
to last forever).<br>
|
|
||||||
<br>
|
|
||||||
Sockets must accept stream traffic and support the Python<br>
|
|
||||||
socket interface. A separate daemonic thread is created to<br>
|
|
||||||
manage the tunnel. For high performance, make_send() should<br>
|
|
||||||
make a socket and connect in non-blocking mode (you should<br>
|
|
||||||
catch and discard the sam.<a href="#BlockError">BlockError</a> or socket.error due to<br>
|
|
||||||
executing connect on a non-blocking socket).<br>
|
|
||||||
<br>
|
|
||||||
Security Note:<br>
|
|
||||||
A firewall is needed to maintain the end user's anonymity.<br>
|
|
||||||
An attacker could keep a tunnel socket open by pinging it<br>
|
|
||||||
regularly. The accepted sockets from 'receive' must prevent<br>
|
|
||||||
this by closing down eventually.<br>
|
|
||||||
<br>
|
|
||||||
<a href="#Socket">Socket</a> errors do not cause the <a href="#Tunnel">Tunnel</a> to shut down.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Tunnel-close"><strong>close</strong></a>(self)</dt><dd><tt>Close all connections made for this tunnel.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="TunnelClient">class <strong>TunnelClient</strong></a>(<a href="i2p.sam.html#Tunnel">Tunnel</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="TunnelClient-__init__"><strong>__init__</strong></a>(self, session, port, dest, samaddr<font color="#909090">='127.0.0.1:7656'</font>, nconnect<font color="#909090">=-1</font>, timeout<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Tunnels localhost:port --> I2P Destination dest.<br>
|
|
||||||
<br>
|
|
||||||
A session named 'session' is created locally, for purposes<br>
|
|
||||||
of routing to 'dest'. nconnect and timeout are the maximum<br>
|
|
||||||
number of connections and maximum time per connection. All<br>
|
|
||||||
other arguments are passed to sam.socket(). This call blocks<br>
|
|
||||||
until the tunnel is ready.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Properties defined here:<br>
|
|
||||||
<dl><dt><strong>dest</strong></dt>
|
|
||||||
<dd><strong><em>get</em></strong> = 'Local Destination used for routing.'</dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>remotedest</strong></dt>
|
|
||||||
<dd><tt>Remote Destination.</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>session</strong></dt>
|
|
||||||
<dd><strong><em>get</em></strong> = 'Session name for local Destination.'</dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="i2p.sam.html#Tunnel">Tunnel</a>:<br>
|
|
||||||
<dl><dt><a name="TunnelClient-close"><strong>close</strong></a>(self)</dt><dd><tt>Close all connections made for this tunnel.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="TunnelServer">class <strong>TunnelServer</strong></a>(<a href="i2p.sam.html#Tunnel">Tunnel</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="TunnelServer-__init__"><strong>__init__</strong></a>(self, session, port, samaddr<font color="#909090">='127.0.0.1:7656'</font>, nconnect<font color="#909090">=-1</font>, timeout<font color="#909090">=None</font>, **kwargs)</dt><dd><tt>Tunnels incoming SAM streams --> localhost:port.<br>
|
|
||||||
<br>
|
|
||||||
nconnect and timeout are the maximum number of connections<br>
|
|
||||||
and maximum time per connection. All other arguments are<br>
|
|
||||||
passed to sam.socket(). This call blocks until the tunnel<br>
|
|
||||||
is ready.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Properties defined here:<br>
|
|
||||||
<dl><dt><strong>dest</strong></dt>
|
|
||||||
<dd><tt>I2P Destination of server.</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<dl><dt><strong>session</strong></dt>
|
|
||||||
<dd><tt>Session name for server.</tt></dd>
|
|
||||||
</dl>
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="i2p.sam.html#Tunnel">Tunnel</a>:<br>
|
|
||||||
<dl><dt><a name="TunnelServer-close"><strong>close</strong></a>(self)</dt><dd><tt>Close all connections made for this tunnel.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table></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>MAX_DGRAM</strong> = 31744<br>
|
|
||||||
<strong>MAX_RAW</strong> = 32768<br>
|
|
||||||
<strong>MSG_DONTWAIT</strong> = 128<br>
|
|
||||||
<strong>MSG_PEEK</strong> = 2<br>
|
|
||||||
<strong>MSG_WAITALL</strong> = 64<br>
|
|
||||||
<strong>POLLERR</strong> = 8<br>
|
|
||||||
<strong>POLLHUP</strong> = 16<br>
|
|
||||||
<strong>POLLIN</strong> = 1<br>
|
|
||||||
<strong>POLLNVAL</strong> = 32<br>
|
|
||||||
<strong>POLLOUT</strong> = 4<br>
|
|
||||||
<strong>POLLPRI</strong> = 1<br>
|
|
||||||
<strong>SOCK_DGRAM</strong> = 2<br>
|
|
||||||
<strong>SOCK_RAW</strong> = 3<br>
|
|
||||||
<strong>SOCK_STREAM</strong> = 1<br>
|
|
||||||
<strong>samaddr</strong> = '127.0.0.1:7656'<br>
|
|
||||||
<strong>samver</strong> = 1.0</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,314 +0,0 @@
|
|||||||
|
|
||||||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
<html><head><title>Python: module i2p.samclasses</title>
|
|
||||||
</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><a href="i2p.html"><font color="#ffffff">i2p</font></a>.samclasses</strong></big></big></font></td
|
|
||||||
><td align=right valign=bottom
|
|
||||||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///D|/code/i2p/i2p/samclasses.py">d:\code\i2p\i2p\samclasses.py</a></font></td></tr></table>
|
|
||||||
<p><tt>Lower-level SAM API, interfaces with SAM Bridge.<br>
|
|
||||||
<br>
|
|
||||||
For internal use only.<br>
|
|
||||||
<br>
|
|
||||||
Use the higher level i2p.sam module for your own programs.<br>
|
|
||||||
<br>
|
|
||||||
For details on SAM, see "Simple Anonymous Messaging (SAM) v1.0,"<br>
|
|
||||||
as published by jrandom.<br>
|
|
||||||
<br>
|
|
||||||
Class Overview:<br>
|
|
||||||
<br>
|
|
||||||
<a href="#SAMTerminal">SAMTerminal</a>: Message sender/reader, talks to SAM Bridge<br>
|
|
||||||
through a single socket.<br>
|
|
||||||
<a href="#StringBuffer">StringBuffer</a>: Queue for character data.<br>
|
|
||||||
<a href="#BaseSession">BaseSession</a>: SAM session classes are derived from this.<br>
|
|
||||||
<a href="#StreamSession">StreamSession</a>: Manipulate a SAM stream session through a<br>
|
|
||||||
threadsafe, high-level interface.<br>
|
|
||||||
<a href="#DatagramSession">DatagramSession</a>: SAM datagram session, threadsafe, high level.<br>
|
|
||||||
<a href="#RawSession">RawSession</a>: SAM raw session, threadsafe, high level.<br>
|
|
||||||
<br>
|
|
||||||
Note that a 'None' timeout is an infinite timeout: it<br>
|
|
||||||
blocks forever if necessary.<br>
|
|
||||||
<br>
|
|
||||||
Todo:<br>
|
|
||||||
* Error handling is a huge mess. Neaten it up.<br>
|
|
||||||
Subclass a ErrorMixin class, then use set_error(e),<br>
|
|
||||||
check_error(), get_error().<br>
|
|
||||||
* Streams are a huge mess. Neaten them up.<br>
|
|
||||||
* This whole interface is a tad confusing. Neaten it up.</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="#fffff" 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="Queue.html">Queue</a><br>
|
|
||||||
<a href="i2p.html">i2p</a><br>
|
|
||||||
<a href="random.html">random</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="shlex.html">shlex</a><br>
|
|
||||||
<a href="socket.html">socket</a><br>
|
|
||||||
<a href="string.html">string</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
|
|
||||||
<a href="thread.html">thread</a><br>
|
|
||||||
<a href="threading.html">threading</a><br>
|
|
||||||
</td><td width="25%" valign=top><a href="time.html">time</a><br>
|
|
||||||
<a href="traceback.html">traceback</a><br>
|
|
||||||
</td></tr></table></td></tr></table><p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ee77aa">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
|
|
||||||
|
|
||||||
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
|
|
||||||
<td width="100%"><dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.samclasses.html#BaseSession">BaseSession</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.samclasses.html#DatagramSession">DatagramSession</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.samclasses.html#RawSession">RawSession</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.samclasses.html#StreamSession">StreamSession</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.samclasses.html#Deque">Deque</a>
|
|
||||||
</font></dt><dd>
|
|
||||||
<dl>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.samclasses.html#StringBuffer">StringBuffer</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
</dd>
|
|
||||||
<dt><font face="helvetica, arial"><a href="i2p.samclasses.html#SAMTerminal">SAMTerminal</a>
|
|
||||||
</font></dt><dt><font face="helvetica, arial"><a href="i2p.samclasses.html#Stream">Stream</a>
|
|
||||||
</font></dt></dl>
|
|
||||||
<p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="BaseSession">class <strong>BaseSession</strong></a></font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Base session, from which <a href="#StreamSession">StreamSession</a>, <a href="#DatagramSession">DatagramSession</a>,<br>
|
|
||||||
and <a href="#RawSession">RawSession</a> are derived.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="BaseSession-__init__"><strong>__init__</strong></a>(self, addr<font color="#909090">=''</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="BaseSession-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the session.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="DatagramSession">class <strong>DatagramSession</strong></a>(<a href="i2p.samclasses.html#BaseSession">BaseSession</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Datagram session. All methods are blocking and threadsafe.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="DatagramSession-__init__"><strong>__init__</strong></a>(self, name, addr<font color="#909090">=''</font>, **kwargs)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DatagramSession-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt>Number of packets in read buffer.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DatagramSession-recv"><strong>recv</strong></a>(self, timeout<font color="#909090">=None</font>, peek<font color="#909090">=False</font>)</dt><dd><tt>Get a single packet. Blocks for up to timeout seconds if<br>
|
|
||||||
n > 0 and no packet is available (timeout=None means wait<br>
|
|
||||||
forever). If still no packet is available, raises BlockError<br>
|
|
||||||
or Timeout. Returns the pair (data, address). If peek is<br>
|
|
||||||
True, the data is not removed.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="DatagramSession-send"><strong>send</strong></a>(self, s, dest)</dt><dd><tt>Send packet with contents s to given destination.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="i2p.samclasses.html#BaseSession">BaseSession</a>:<br>
|
|
||||||
<dl><dt><a name="DatagramSession-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the session.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Deque">class <strong>Deque</strong></a></font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>A double-ended queue.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="Deque-__init__"><strong>__init__</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Deque-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt>Number of items in the deque.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Deque-pop_first"><strong>pop_first</strong></a>(self)</dt><dd><tt>Pop an item off the beginning of the deque, and return it.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Deque-pop_last"><strong>pop_last</strong></a>(self)</dt><dd><tt>Pop an item off the end of the deque, and return it.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Deque-push_first"><strong>push_first</strong></a>(self, obj)</dt><dd><tt>Prepend obj to the beginning of the deque.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Deque-push_last"><strong>push_last</strong></a>(self, obj)</dt><dd><tt>Append obj to the end of the deque.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="RawSession">class <strong>RawSession</strong></a>(<a href="i2p.samclasses.html#BaseSession">BaseSession</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Raw session. All methods are blocking and threadsafe.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="RawSession-__init__"><strong>__init__</strong></a>(self, name, addr<font color="#909090">=''</font>, **kwargs)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="RawSession-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt>Number of packets in read buffer.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="RawSession-recv"><strong>recv</strong></a>(self, timeout<font color="#909090">=None</font>, peek<font color="#909090">=False</font>)</dt><dd><tt>Identical to DatagramSocket.recv. The from address is an<br>
|
|
||||||
empty string.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="RawSession-send"><strong>send</strong></a>(self, s, dest)</dt><dd><tt>Send packet with contents s to given destination.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="i2p.samclasses.html#BaseSession">BaseSession</a>:<br>
|
|
||||||
<dl><dt><a name="RawSession-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the session.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="SAMTerminal">class <strong>SAMTerminal</strong></a></font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Message-by-message communication with SAM through a single<br>
|
|
||||||
socket. _on_* messages are dispatched to msgobj.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="SAMTerminal-__init__"><strong>__init__</strong></a>(self, addr, msgobj)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="SAMTerminal-check"><strong>check</strong></a>(self)</dt><dd><tt>Raise an error if terminal was closed, otherwise do<br>
|
|
||||||
nothing.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="SAMTerminal-check_message"><strong>check_message</strong></a>(self, kwargs)</dt><dd><tt>Raises an error if kwargs['RESULT'] != 'OK'.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="SAMTerminal-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the SAM terminal.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="SAMTerminal-on_message"><strong>on_message</strong></a>(self, msg, kwargs)</dt><dd><tt>Process a SAM message that was received. Dispatch to<br>
|
|
||||||
_on_MESSAGE_NAME(**kwargs).</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="SAMTerminal-queue_get"><strong>queue_get</strong></a>(self, q)</dt><dd><tt>Identical to q.get() unless a call to <a href="#SAMTerminal-check">check</a>() fails,<br>
|
|
||||||
in which case the waiting is cut short with an error.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="SAMTerminal-send_message"><strong>send_message</strong></a>(self, msg)</dt><dd><tt>Send a message to the SAM bridge. A newline will be<br>
|
|
||||||
automatically added if none is present.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="Stream">class <strong>Stream</strong></a></font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>Receives and sends data for an individual stream.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="Stream-__del__"><strong>__del__</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Stream-__init__"><strong>__init__</strong></a>(self, parent, remotedest, id, didconnect<font color="#909090">=True</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Stream-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt>Current length of read buffer.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Stream-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the stream. Threadsafe.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Stream-on_close"><strong>on_close</strong></a>(self, e)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Stream-on_receive"><strong>on_receive</strong></a>(self, s)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Stream-recv"><strong>recv</strong></a>(self, n, timeout<font color="#909090">=None</font>, peek<font color="#909090">=False</font>, waitall<font color="#909090">=False</font>)</dt><dd><tt>Reads up to n bytes in a manner identical to socket.recv.<br>
|
|
||||||
Blocks for up to timeout seconds if n > 0 and no data is<br>
|
|
||||||
available (timeout=None means wait forever). If still no data<br>
|
|
||||||
is available, raises BlockError or Timeout. For a closed<br>
|
|
||||||
stream, recv will read the data stored in the buffer until<br>
|
|
||||||
EOF, at which point the read data will be truncated. If peek<br>
|
|
||||||
is True, the data is not removed. If waitall is True, reads<br>
|
|
||||||
exactly n bytes, or raises BlockError or Timeout as<br>
|
|
||||||
appropriate. Returns data.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="Stream-send"><strong>send</strong></a>(self, s)</dt><dd><tt>Sends the string s, blocking if necessary.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="StreamSession">class <strong>StreamSession</strong></a>(<a href="i2p.samclasses.html#BaseSession">BaseSession</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt><a href="#Stream">Stream</a> session. All methods are blocking and threadsafe.<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="StreamSession-__init__"><strong>__init__</strong></a>(self, name, addr<font color="#909090">=''</font>, **kwargs)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StreamSession-__len__"><strong>__len__</strong></a>(self)</dt><dd><tt>Unconnected session; has no read data available.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StreamSession-accept"><strong>accept</strong></a>(self, timeout<font color="#909090">=None</font>)</dt><dd><tt>Wait for incoming connection, and return a <a href="#Stream">Stream</a> object<br>
|
|
||||||
for it.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StreamSession-connect"><strong>connect</strong></a>(self, dest, timeout<font color="#909090">=None</font>)</dt><dd><tt>Create a stream connected to remote destination 'dest'. The<br>
|
|
||||||
id is random. If the timeout is exceeded, do NOT raise an<br>
|
|
||||||
error; rather, return a <a href="#Stream">Stream</a> object with .didconnect set<br>
|
|
||||||
to False.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StreamSession-listen"><strong>listen</strong></a>(self, backlog)</dt><dd><tt>Set maximum number of queued connections.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="i2p.samclasses.html#BaseSession">BaseSession</a>:<br>
|
|
||||||
<dl><dt><a name="StreamSession-close"><strong>close</strong></a>(self)</dt><dd><tt>Close the session.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table> <p>
|
|
||||||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
|
|
||||||
<tr bgcolor="#ffc8d8">
|
|
||||||
<td colspan=3 valign=bottom> <br>
|
|
||||||
<font color="#000000" face="helvetica, arial"><a name="StringBuffer">class <strong>StringBuffer</strong></a>(<a href="i2p.samclasses.html#Deque">Deque</a>)</font></td></tr>
|
|
||||||
|
|
||||||
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
|
|
||||||
<td colspan=2><tt>A FIFO for characters. Strings can be efficiently<br>
|
|
||||||
appended to the end, and read from the beginning.<br>
|
|
||||||
<br>
|
|
||||||
Example:<br>
|
|
||||||
B = <a href="#StringBuffer">StringBuffer</a>('Hello W')<br>
|
|
||||||
B.<a href="#StringBuffer-append">append</a>('orld!')<br>
|
|
||||||
print B.<a href="#StringBuffer-read">read</a>(5) # 'Hello'<br>
|
|
||||||
print B.<a href="#StringBuffer-read">read</a>() # 'World!'<br> </tt></td></tr>
|
|
||||||
<tr><td> </td>
|
|
||||||
<td width="100%">Methods defined here:<br>
|
|
||||||
<dl><dt><a name="StringBuffer-__init__"><strong>__init__</strong></a>(self, s<font color="#909090">=''</font>)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-__len__"><strong>__len__</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-__str__"><strong>__str__</strong></a>(self)</dt></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-append"><strong>append</strong></a>(self, s)</dt><dd><tt>Append string data to the end of the buffer.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-peek"><strong>peek</strong></a>(self, n<font color="#909090">=None</font>)</dt><dd><tt>Like <a href="#StringBuffer-read">read</a>(), but do not remove the data that is returned.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-prepend"><strong>prepend</strong></a>(self, s)</dt><dd><tt>Prepend string data to the beginning of the buffer.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-read"><strong>read</strong></a>(self, n<font color="#909090">=None</font>)</dt><dd><tt>Read n bytes of data (or less if less data available) from the<br>
|
|
||||||
beginning of the buffer. The data is removed. If n is<br>
|
|
||||||
omitted, read the entire buffer.</tt></dd></dl>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
Methods inherited from <a href="i2p.samclasses.html#Deque">Deque</a>:<br>
|
|
||||||
<dl><dt><a name="StringBuffer-pop_first"><strong>pop_first</strong></a>(self)</dt><dd><tt>Pop an item off the beginning of the deque, and return it.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-pop_last"><strong>pop_last</strong></a>(self)</dt><dd><tt>Pop an item off the end of the deque, and return it.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-push_first"><strong>push_first</strong></a>(self, obj)</dt><dd><tt>Prepend obj to the beginning of the deque.</tt></dd></dl>
|
|
||||||
|
|
||||||
<dl><dt><a name="StringBuffer-push_last"><strong>push_last</strong></a>(self, obj)</dt><dd><tt>Append obj to the end of the deque.</tt></dd></dl>
|
|
||||||
|
|
||||||
</td></tr></table></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>sam_log</strong> = False</td></tr></table>
|
|
||||||
</body></html>
|
|
@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
# -------------------------------------------------------------
|
|
||||||
# makedoc.py: Make pydoc documentation for Python SAM API
|
|
||||||
# -------------------------------------------------------------
|
|
||||||
|
|
||||||
import os, inspect
|
|
||||||
import pydoc as pydoc_
|
|
||||||
|
|
||||||
def pydoc(args):
|
|
||||||
"""Run pydoc (command line) with given argument string."""
|
|
||||||
filename = inspect.getsourcefile(pydoc_)
|
|
||||||
os.system('python ' + filename + ' ' + args)
|
|
||||||
|
|
||||||
def move(f1, f2):
|
|
||||||
"""Moves filename f1 to filename f2, overwriting if f2 already exists."""
|
|
||||||
try: os.remove(f2)
|
|
||||||
except: pass
|
|
||||||
os.rename(f1, f2)
|
|
||||||
|
|
||||||
def makedoc():
|
|
||||||
"""Make all HTML documentation for Python I2P library."""
|
|
||||||
modules = ['i2p', 'i2p.sam', 'i2p.eep', 'i2p.router', 'i2p.samclasses']
|
|
||||||
|
|
||||||
origdir = os.getcwd()
|
|
||||||
os.chdir('../..')
|
|
||||||
|
|
||||||
for m in modules:
|
|
||||||
pydoc('-w ' + m)
|
|
||||||
|
|
||||||
os.chdir(origdir)
|
|
||||||
|
|
||||||
for m in modules:
|
|
||||||
move('../../' + m + '.html', './' + m + '.html')
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
makedoc()
|
|
Reference in New Issue
Block a user