Author: aum
Date: 2006-05-12 20:00:13 +0000 (Fri, 12 May 2006)
New Revision: 8685
Added:
trunk/apps/pyFreenet/start.sh
trunk/apps/pyFreenet/stop.sh
trunk/apps/pyFreenet/updatesites.py
Modified:
trunk/apps/pyFreenet/code.leo
trunk/apps/pyFreenet/fcp.py
trunk/apps/pyFreenet/fcpxmlrpc.py
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
trunk/apps/pyFreenet/html/private/SocketServer.BaseServer-class.html
trunk/apps/pyFreenet/html/private/SocketServer.TCPServer-class.html
trunk/apps/pyFreenet/html/private/SocketServer.ThreadingMixIn-class.html
trunk/apps/pyFreenet/html/private/exceptions.Exception-class.html
trunk/apps/pyFreenet/html/private/fcp-module.html
trunk/apps/pyFreenet/html/private/fcp.ConnectionRefused-class.html
trunk/apps/pyFreenet/html/private/fcp.FCPException-class.html
trunk/apps/pyFreenet/html/private/fcp.FCPGetFailed-class.html
trunk/apps/pyFreenet/html/private/fcp.FCPNodeConnection-class.html
trunk/apps/pyFreenet/html/private/fcp.FCPProtocolError-class.html
trunk/apps/pyFreenet/html/private/fcp.FCPPutFailed-class.html
trunk/apps/pyFreenet/html/private/fcp.JobTicket-class.html
trunk/apps/pyFreenet/html/private/fcpxmlrpc-module.html
trunk/apps/pyFreenet/html/private/fcpxmlrpc.FCPXMLRPCServer-class.html
trunk/apps/pyFreenet/html/private/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
trunk/apps/pyFreenet/html/private/help.html
trunk/apps/pyFreenet/html/private/indices.html
trunk/apps/pyFreenet/html/private/sitemgr-module.html
trunk/apps/pyFreenet/html/private/sitemgr.SiteMgr-class.html
trunk/apps/pyFreenet/html/private/trees.html
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
trunk/apps/pyFreenet/html/public/SocketServer.TCPServer-class.html
trunk/apps/pyFreenet/html/public/SocketServer.ThreadingMixIn-class.html
trunk/apps/pyFreenet/html/public/exceptions.Exception-class.html
trunk/apps/pyFreenet/html/public/fcp-module.html
trunk/apps/pyFreenet/html/public/fcp.ConnectionRefused-class.html
trunk/apps/pyFreenet/html/public/fcp.FCPException-class.html
trunk/apps/pyFreenet/html/public/fcp.FCPGetFailed-class.html
trunk/apps/pyFreenet/html/public/fcp.FCPNodeConnection-class.html
trunk/apps/pyFreenet/html/public/fcp.FCPProtocolError-class.html
trunk/apps/pyFreenet/html/public/fcp.FCPPutFailed-class.html
trunk/apps/pyFreenet/html/public/fcp.JobTicket-class.html
trunk/apps/pyFreenet/html/public/fcpxmlrpc-module.html
trunk/apps/pyFreenet/html/public/fcpxmlrpc.FCPXMLRPCServer-class.html
trunk/apps/pyFreenet/html/public/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
trunk/apps/pyFreenet/html/public/help.html
trunk/apps/pyFreenet/html/public/indices.html
trunk/apps/pyFreenet/html/public/sitemgr-module.html
trunk/apps/pyFreenet/html/public/sitemgr.SiteMgr-class.html
trunk/apps/pyFreenet/html/public/trees.html
trunk/apps/pyFreenet/sitemgr.py
Log:
Added scripts to support cron'ed insertion of freesites
on a transient node.
Further tidy-ups, including removing Leo markups
Modified: trunk/apps/pyFreenet/code.leo
===================================================================
--- trunk/apps/pyFreenet/code.leo 2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/code.leo 2006-05-12 20:00:13 UTC (rev 8685)
@@ -2,14 +2,105 @@
<leo_file>
<leo_header file_format="2" tnodes="0" max_tnode_index="6" clone_windows="0"/>
<globals body_outline_ratio="0.313893653516">
- <global_window_position top="147" left="74" height="694" width="1166"/>
+ <global_window_position top="87" left="116" height="649" width="1141"/>
<global_log_window_position top="0" left="0" height="0" width="0"/>
</globals>
<preferences/>
<find_panel_settings/>
<vnodes>
<v t="aum.20060506215300" a="E"><vh>PyFCP</vh></v>
-<v t="aum.20060509223528"
tnodeList="aum.20060509223528,aum.20060509223528.1,aum.20060509223528.2,aum.20060509223528.3,aum.20060509223528.4,aum.20060509223528.5,aum.20060509223528.6,aum.20060509223528.7,aum.20060509223528.8,aum.20060509223528.9,aum.20060509223528.10,aum.20060509223528.11,aum.20060509223528.12,aum.20060509223528.13,aum.20060509223528.14,aum.20060509223528.15,aum.20060509223528.16,aum.20060509223528.17,aum.20060509223528.18,aum.20060509223528.19,aum.20060509223528.20,aum.20060509223528.21,aum.20060509223528.22,aum.20060509223528.23,aum.20060509223528.24,aum.20060509223528.25,aum.20060509223528.26,aum.20060509223528.27,aum.20060509223528.28,aum.20060509223528.29,aum.20060509223528.30,aum.20060509223528.31,aum.20060509223528.32,aum.20060509223528.33,aum.20060509223528.34,aum.20060509223528.35,aum.20060509223528.36,aum.20060509223528.37,aum.20060509223528.38,aum.20060509223528.39,aum.20060509223528.40,aum.20060509223528.41,aum.20060509223528.42,aum.20060509223528.43,aum.20060509223528.44,aum.20060509223528.45,aum.20060509223528.46,aum.20060509223528.47,aum.20060509223528.48,aum.20060509223528.49,aum.20060509223528.50,aum.20060509223528.51,aum.20060509223528.52,aum.20060509223528.53,aum.20060509223528.54,aum.20060509223528.55,aum.20060509223528.56,aum.20060509223528.57,aum.20060509223528.58,aum.20060509223528.59,aum.20060509223528.60,aum.20060509223528.61,aum.20060509223528.62,aum.20060509223528.63,aum.20060509223528.64,aum.20060509223528.65,aum.20060509223528.66,aum.20060509223528.67,aum.20060509223528.68,aum.20060509223528.69,aum.20060509223528.70,aum.20060509223528.71,aum.20060509223528.72,aum.20060509223528.73,aum.20060509223528.74,aum.20060509223528.75,aum.20060509223528.76,aum.20060509223528.77,aum.20060509223528.78,aum.20060509223528.79,aum.20060509223528.80,aum.20060509223528.81,aum.20060509223528.82,aum.20060509223528.83,aum.20060509223528.84,aum.20060509223528.85,aum.20060509223528.86,aum.20060509223528.87,aum.20060509223528.88,aum.20060509223528.89,aum.20060509223528.90,aum.20060509223528.91,aum.20060509223528.92,aum.20060509223528.93,aum.20060509223528.94,aum.20060509223528.95,aum.20060509223528.96,aum.20060509223528.97,aum.20060509223528.98,aum.20060509223528.99,aum.20060509223528.100,aum.20060509223528.101,aum.20060509223528.102,aum.20060509223528.103,aum.20060509223528.104,aum.20060509223528.105,aum.20060509223528.106,aum.20060509223528.107,aum.20060509223528.108,aum.20060509223528.109,aum.20060509223528.110,aum.20060509223528.111,aum.20060509223528.112,aum.20060509223528.113,aum.20060509223528.114,aum.20060509223528.115,aum.20060509223528.116,aum.20060509223528.117,aum.20060509223528.118,aum.20060509223528.119"><vh>@file
freenet_old.py</vh>
+<v t="aum.20060513073239" a="E"><vh>Main library module</vh>
+<v t="aum.20060506215707"
tnodeList="aum.20060506215707,aum.20060506215707.1,aum.20060506220237,aum.20060506215707.2,aum.20060506215707.3,aum.20060506220237.1,aum.20060506220237.2,aum.20060506224238,aum.20060506231352.1,aum.20060506231352,aum.20060507003931,aum.20060511001853,aum.20060511205201,aum.20060506232639,aum.20060506232639.1,aum.20060511222538,aum.20060512101715,aum.20060511205201.1,aum.20060511205201.2,aum.20060506223545,aum.20060506224238.1,aum.20060506231352.2,aum.20060506220856,aum.20060506222005,aum.20060507124316,aum.20060511103841,aum.20060511103841.1,aum.20060511103952,aum.20060511103952.1,aum.20060512181209,aum.20060512102840,aum.20060509184020.1,aum.20060509184020.2,aum.20060509224119,aum.20060509224221"><vh>@nosent
fcp.py</vh>
+<v t="aum.20060506215707.1"><vh>imports</vh></v>
+<v t="aum.20060506220237"><vh>exceptions</vh></v>
+<v t="aum.20060506215707.2"><vh>globals</vh></v>
+<v t="aum.20060506215707.3" a="E"><vh>class FCPNodeConnection</vh>
+<v t="aum.20060506220237.1"><vh>__init__</vh></v>
+<v t="aum.20060506220237.2"><vh>__del__</vh></v>
+<v t="aum.20060506224238" a="E"><vh>High Level Methods</vh>
+<v t="aum.20060506231352.1"><vh>genkey</vh></v>
+<v t="aum.20060506231352"><vh>get</vh></v>
+<v t="aum.20060507003931"><vh>put</vh></v>
+<v t="aum.20060511001853"><vh>putdir</vh></v>
+<v t="aum.20060511205201"><vh>shutdown</vh></v>
+</v>
+<v t="aum.20060506232639" a="E"><vh>Manager Thread</vh>
+<v t="aum.20060506232639.1"><vh>_mgrThread</vh></v>
+<v t="aum.20060511222538"><vh>_msgIncoming</vh></v>
+<v t="aum.20060512101715"><vh>_submitCmd</vh></v>
+<v t="aum.20060511205201.1"><vh>_on_rxMsg</vh></v>
+<v t="aum.20060511205201.2"><vh>_on_clientReq</vh></v>
+</v>
+<v t="aum.20060506223545" a="E"><vh>Low Level Methods</vh>
+<v t="aum.20060506224238.1"><vh>_hello</vh></v>
+<v t="aum.20060506231352.2"><vh>_getUniqueId</vh></v>
+<v t="aum.20060506220856"><vh>_txMsg</vh></v>
+<v t="aum.20060506222005"><vh>_rxMsg</vh></v>
+<v t="aum.20060507124316"><vh>_log</vh></v>
+</v>
+</v>
+<v t="aum.20060511103841" a="E"><vh>class JobTicket</vh>
+<v t="aum.20060511103841.1"><vh>__init__</vh></v>
+<v t="aum.20060511103952"><vh>isDone</vh></v>
+<v t="aum.20060511103952.1"><vh>wait</vh></v>
+<v t="aum.20060512181209"><vh>callback</vh></v>
+<v t="aum.20060512102840"><vh>_putResult</vh></v>
+</v>
+<v t="aum.20060509184020.1" a="E"><vh>util funcs</vh>
+<v t="aum.20060509184020.2"><vh>toBool</vh></v>
+<v t="aum.20060509224119"><vh>readdir</vh></v>
+<v t="aum.20060509224221"><vh>guessMimetype</vh></v>
+</v>
+</v>
+</v>
+<v t="aum.20060513073239.1" a="E"><vh>XML-RPC Server</vh>
+<v t="aum.20060512172707"
tnodeList="aum.20060512172707,aum.20060512172843,aum.20060512173027,aum.20060512175041,aum.20060512175041.1,aum.20060512175218,aum.20060507155016,aum.20060507162314,aum.20060507162314.2,aum.20060507162314.3,aum.20060507162543.1,aum.20060507195029,aum.20060507163143,aum.20060507154638,aum.20060507195029.1,aum.20060506224545"><vh>@nosent
fcpxmlrpc.py</vh>
+<v t="aum.20060512172843"><vh>imports</vh></v>
+<v t="aum.20060512173027"><vh>globals</vh></v>
+<v t="aum.20060512175041" a="E"><vh>class FCPXMLRPCServer</vh>
+<v t="aum.20060512175041.1"><vh>__init__</vh></v>
+<v t="aum.20060512175218"><vh>run</vh></v>
+</v>
+<v t="aum.20060507155016" a="E"><vh>class FreenetXMLRPCRequestHandler</vh>
+<v t="aum.20060507162314"><vh>__init__</vh></v>
+<v t="aum.20060507162314.2"><vh>get</vh></v>
+<v t="aum.20060507162314.3"><vh>put</vh></v>
+<v t="aum.20060507162543.1"><vh>genkey</vh></v>
+</v>
+<v t="aum.20060507195029"><vh>usage</vh></v>
+<v t="aum.20060507163143"><vh>testServer</vh></v>
+<v t="aum.20060507154638"><vh>runServer</vh></v>
+<v t="aum.20060507195029.1"><vh>main</vh></v>
+<v t="aum.20060506224545"><vh>mainline</vh></v>
+</v>
+</v>
+<v t="aum.20060513073239.2" a="E"><vh>Freesite management</vh>
+<v t="aum.20060511101147"
tnodeList="aum.20060511101147,aum.20060511113333,aum.20060511113333.1,aum.20060511114439,aum.20060511114439.1,aum.20060512150118,aum.20060511114439.2,aum.20060511120059,aum.20060511114604,aum.20060511114604.1,aum.20060511113333.3,aum.20060513071956,aum.20060511130507,aum.20060511120024"><vh>@nosent
sitemgr.py</vh>
+<v t="aum.20060511113333"><vh>imports</vh></v>
+<v t="aum.20060511113333.1"><vh>config</vh></v>
+<v t="aum.20060511114439" a="E"><vh>class SiteMgr</vh>
+<v t="aum.20060511114439.1"><vh>__init__</vh></v>
+<v t="aum.20060512150118"><vh>__del__</vh></v>
+<v t="aum.20060511114439.2"><vh>createConfig</vh></v>
+<v t="aum.20060511120059"><vh>createNode</vh></v>
+<v t="aum.20060511114604"><vh>loadConfig</vh></v>
+<v t="aum.20060511114604.1"><vh>saveConfig</vh></v>
+<v t="aum.20060511113333.3"><vh>update</vh></v>
+<v t="aum.20060513071956"><vh>shutdown</vh></v>
+</v>
+<v t="aum.20060511130507"><vh>help</vh></v>
+<v t="aum.20060511120024"><vh>mainline</vh></v>
+</v>
+<v t="aum.20060512140230" tnodeList="aum.20060512140230"><vh>@nosent
updatesites.py</vh></v>
+<v t="aum.20060513073239.3" tnodeList="aum.20060513073239.3"><vh>@nosent
start.sh</vh></v>
+<v t="aum.20060513073239.4" a="V" tnodeList="aum.20060513073239.4"><vh>@nosent
stop.sh</vh></v>
+</v>
+<v t="aum.20060513073239.5" a="E"><vh>Test files</vh>
+<v t="aum.20060511003500" tnodeList="aum.20060511003500"><vh>@file
test.py</vh></v>
+<v t="aum.20060512152233" tnodeList="aum.20060512152233"><vh>@file
genkey.py</vh></v>
+</v>
+<v t="aum.20060513073239.6" a="E"><vh>Old stuff</vh>
+<v t="aum.20060509223528"><vh>file freenet_old.py</vh>
<v t="aum.20060509223528.1"><vh>imports</vh></v>
<v t="aum.20060509223528.2"><vh>constants</vh></v>
<v t="aum.20060509223528.3"><vh>class node</vh></v>
@@ -131,85 +222,7 @@
<v t="aum.20060509223528.118"><vh>num2str</vh></v>
<v t="aum.20060509223528.119"><vh>exceptions</vh></v>
</v>
-<v t="aum.20060511003500" tnodeList="aum.20060511003500"><vh>@file
test.py</vh></v>
-<v t="aum.20060512152233" tnodeList="aum.20060512152233"><vh>@file
genkey.py</vh></v>
-<v t="aum.20060512140230" tnodeList="aum.20060512140230"><vh>@file
updatesites.py</vh></v>
-<v t="aum.20060512172707" a="E"
tnodeList="aum.20060512172707,aum.20060512172843,aum.20060512173027,aum.20060512175041,aum.20060512175041.1,aum.20060512175218,aum.20060507155016,aum.20060507162314,aum.20060507162314.2,aum.20060507162314.3,aum.20060507162543.1,aum.20060507195029,aum.20060507163143,aum.20060507154638,aum.20060507195029.1,aum.20060506224545"><vh>@file
fcpxmlrpc.py</vh>
-<v t="aum.20060512172843"><vh>imports</vh></v>
-<v t="aum.20060512173027"><vh>globals</vh></v>
-<v t="aum.20060512175041" a="E"><vh>class FCPXMLRPCServer</vh>
-<v t="aum.20060512175041.1"><vh>__init__</vh></v>
-<v t="aum.20060512175218"><vh>run</vh></v>
</v>
-<v t="aum.20060507155016" a="E"><vh>class FreenetXMLRPCRequestHandler</vh>
-<v t="aum.20060507162314"><vh>__init__</vh></v>
-<v t="aum.20060507162314.2"><vh>get</vh></v>
-<v t="aum.20060507162314.3"><vh>put</vh></v>
-<v t="aum.20060507162543.1"><vh>genkey</vh></v>
-</v>
-<v t="aum.20060507195029"><vh>usage</vh></v>
-<v t="aum.20060507163143"><vh>testServer</vh></v>
-<v t="aum.20060507154638"><vh>runServer</vh></v>
-<v t="aum.20060507195029.1"><vh>main</vh></v>
-<v t="aum.20060506224545"><vh>mainline</vh></v>
-</v>
-<v t="aum.20060511101147"
tnodeList="aum.20060511101147,aum.20060511113333,aum.20060511113333.1,aum.20060511114439,aum.20060511114439.1,aum.20060512150118,aum.20060511114439.2,aum.20060511120059,aum.20060511114604,aum.20060511114604.1,aum.20060511113333.3,aum.20060511130507,aum.20060511120024"><vh>@nosent
sitemgr.py</vh>
-<v t="aum.20060511113333"><vh>imports</vh></v>
-<v t="aum.20060511113333.1"><vh>config</vh></v>
-<v t="aum.20060511114439" a="E"><vh>class SiteMgr</vh>
-<v t="aum.20060511114439.1"><vh>__init__</vh></v>
-<v t="aum.20060512150118"><vh>__del__</vh></v>
-<v t="aum.20060511114439.2"><vh>createConfig</vh></v>
-<v t="aum.20060511120059"><vh>createNode</vh></v>
-<v t="aum.20060511114604"><vh>loadConfig</vh></v>
-<v t="aum.20060511114604.1"><vh>saveConfig</vh></v>
-<v t="aum.20060511113333.3"><vh>update</vh></v>
-</v>
-<v t="aum.20060511130507"><vh>help</vh></v>
-<v t="aum.20060511120024"><vh>mainline</vh></v>
-</v>
-<v t="aum.20060506215707" a="E"
tnodeList="aum.20060506215707,aum.20060506215707.1,aum.20060506220237,aum.20060506215707.2,aum.20060506215707.3,aum.20060506220237.1,aum.20060506220237.2,aum.20060506224238,aum.20060506231352.1,aum.20060506231352,aum.20060507003931,aum.20060511001853,aum.20060511205201,aum.20060506232639,aum.20060506232639.1,aum.20060511222538,aum.20060512101715,aum.20060511205201.1,aum.20060511205201.2,aum.20060506223545,aum.20060506224238.1,aum.20060506231352.2,aum.20060506220856,aum.20060506222005,aum.20060507124316,aum.20060511103841,aum.20060511103841.1,aum.20060511103952,aum.20060511103952.1,aum.20060512181209,aum.20060512102840,aum.20060509184020.1,aum.20060509184020.2,aum.20060509224119,aum.20060509224221"><vh>@nosent
fcp.py</vh>
-<v t="aum.20060506215707.1"><vh>imports</vh></v>
-<v t="aum.20060506220237"><vh>exceptions</vh></v>
-<v t="aum.20060506215707.2"><vh>globals</vh></v>
-<v t="aum.20060506215707.3" a="EV"><vh>class FCPNodeConnection</vh>
-<v t="aum.20060506220237.1"><vh>__init__</vh></v>
-<v t="aum.20060506220237.2"><vh>__del__</vh></v>
-<v t="aum.20060506224238" a="E"><vh>High Level Methods</vh>
-<v t="aum.20060506231352.1"><vh>genkey</vh></v>
-<v t="aum.20060506231352"><vh>get</vh></v>
-<v t="aum.20060507003931"><vh>put</vh></v>
-<v t="aum.20060511001853"><vh>putdir</vh></v>
-<v t="aum.20060511205201"><vh>shutdown</vh></v>
-</v>
-<v t="aum.20060506232639" a="E"><vh>Manager Thread</vh>
-<v t="aum.20060506232639.1"><vh>_mgrThread</vh></v>
-<v t="aum.20060511222538"><vh>_msgIncoming</vh></v>
-<v t="aum.20060512101715"><vh>_submitCmd</vh></v>
-<v t="aum.20060511205201.1"><vh>_on_rxMsg</vh></v>
-<v t="aum.20060511205201.2"><vh>_on_clientReq</vh></v>
-</v>
-<v t="aum.20060506223545" a="E"><vh>Low Level Methods</vh>
-<v t="aum.20060506224238.1"><vh>_hello</vh></v>
-<v t="aum.20060506231352.2"><vh>_getUniqueId</vh></v>
-<v t="aum.20060506220856"><vh>_txMsg</vh></v>
-<v t="aum.20060506222005"><vh>_rxMsg</vh></v>
-<v t="aum.20060507124316"><vh>_log</vh></v>
-</v>
-</v>
-<v t="aum.20060511103841" a="E"><vh>class JobTicket</vh>
-<v t="aum.20060511103841.1"><vh>__init__</vh></v>
-<v t="aum.20060511103952"><vh>isDone</vh></v>
-<v t="aum.20060511103952.1"><vh>wait</vh></v>
-<v t="aum.20060512181209"><vh>callback</vh></v>
-<v t="aum.20060512102840"><vh>_putResult</vh></v>
-</v>
-<v t="aum.20060509184020.1" a="E"><vh>util funcs</vh>
-<v t="aum.20060509184020.2"><vh>toBool</vh></v>
-<v t="aum.20060509224119"><vh>readdir</vh></v>
-<v t="aum.20060509224221"><vh>guessMimetype</vh></v>
-</v>
-</v>
</vnodes>
<tnodes>
<t tx="aum.20060506215300">@nocolor
@@ -292,10 +305,7 @@
- setting a callback. You can pass to any of the primitives a
'callback=somefunc' keyword arg, where 'somefunc' is a callable
object
- conforming to::
-
- def somefunc(status, value):
- ...
+ conforming to 'def somefunc(status, value)'
The callback function will be invoked when a primitive succeeds or
fails,
as well as when a pending message is received from the node.
@@ -6176,7 +6186,7 @@
if relpath == 'index.html':
default = file
- print "n=%s relpath=%s" % (repr(n), repr(relpath))
+ self._log(DETAIL, "n=%s relpath=%s" % (repr(n), repr(relpath)))
msgLines.extend(["Files.%d.Name=%s" % (n, relpath),
"Files.%d.UploadFrom=disk" % n,
@@ -6271,7 +6281,7 @@
return self.result
</t>
-<t tx="aum.20060511113333">import fcp, sys, os, sha
+<t tx="aum.20060511113333">import fcp, sys, os, sha, traceback
from ConfigParser import SafeConfigParser
@@ -6306,11 +6316,16 @@
print "Updating site %s" % sitename
print "privatekey=%s" % privatekey
noSites = False
- res = self.node.put(privatekey,
- dir=dir,
- name=sitename,
- version=version,
- usk=True)
+ try:
+ res = self.node.put(privatekey,
+ dir=dir,
+ name=sitename,
+ version=version,
+ usk=True)
+ print "site %s updated successfully" % sitename
+ except:
+ traceback.print_exc()
+ print "site %s failed to update" % sitename
conf.set(sitename, "hash", hashNew)
self.saveConfig()
@@ -6318,8 +6333,6 @@
if noSites:
print "No sites needed updating"
- return res
-
</t>
<t tx="aum.20060511114439">class SiteMgr:
"""
@@ -6742,13 +6755,25 @@
</t>
<t tx="aum.20060512140230">@first #!/usr/bin/env python
-import sys, os, time
+import sys, os, time, commands
import sitemgr
-startupTime = 60
+# time we wait after starting fred, to allow the node to 'warm up'
+# and make connections to its peers
+startupTime = 180
+
+# directory where we have freenet installed,
+# change it as needed
freenetDir = "/home/david/freenet"
+
+# derive path of freenet pid file, the (non)existence
+# of which is the easiest test of whether the freenet
+# node is running
pidFile = os.path.join(freenetDir, "Freenet.pid")
+# small wrapper which, if freenet isn't already running,
+# starts it prior to inserting then stops it after
+# inserting
def main(verbose=None):
if verbose == None:
@@ -6762,7 +6787,7 @@
startingFreenet = True
os.chdir(freenetDir)
print "Starting freenet..."
- os.system("./run.sh start")
+ print commands.getstatusoutput("%s/start.sh &" % freenetDir)
print "Letting node settle for %s seconds..." % startupTime
time.sleep(startupTime)
else:
@@ -6774,13 +6799,11 @@
kw = {"verbosity" : sitemgr.fcp.DETAIL}
else:
kw = {}
- #print "updatesites: kw=%s" % str(kw)
# get a site manager object, and perform the actual insertions
s = sitemgr.SiteMgr(**kw)
- uri = s.update()
+ s.update()
del s
- print "Site updated: uri=%s" % uri
# kill freenet if it was dynamically started
if startingFreenet:
@@ -6797,6 +6820,8 @@
<t tx="aum.20060512150118">def __del__(self):
try:
+ if hasattr(self, 'node'):
+ self.node.shutdown()
del self.node
self.node = None
except:
@@ -6904,5 +6929,46 @@
# no action needed
</t>
+<t tx="aum.20060513071956">def shutdown(self):
+ self.node.shutdown()
+
+</t>
+<t tx="aum.20060513073239"></t>
+<t tx="aum.20060513073239.1"></t>
+<t tx="aum.20060513073239.2"></t>
+<t tx="aum.20060513073239.3">@first #!/bin/bash
+
+# a wrapper which starts the freenet node,
+# and is used with the cron'ed freesite insertion
+# scripts
+
+# change this to where your bash startup script lives
+source /home/david/.bashrc
+
+# change this to where your freenet is installed
+cd /home/david/freenet
+
+# now start the freenet node
+./run.sh start
+
+</t>
+<t tx="aum.20060513073239.4">@first #!/bin/bash
+
+# a wrapper which starts the freenet node,
+# and is used with the cron'ed freesite insertion
+# scripts
+
+# change this to where your bash startup script lives
+source /home/david/.bashrc
+
+# change this to where your freenet is installed
+cd /home/david/freenet
+
+# now stop the freenet node
+./run.sh stop
+
+</t>
+<t tx="aum.20060513073239.5"></t>
+<t tx="aum.20060513073239.6"></t>
</tnodes>
</leo_file>
Modified: trunk/apps/pyFreenet/fcp.py
===================================================================
--- trunk/apps/pyFreenet/fcp.py 2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/fcp.py 2006-05-12 20:00:13 UTC (rev 8685)
@@ -99,10 +99,7 @@
- setting a callback. You can pass to any of the primitives a
'callback=somefunc' keyword arg, where 'somefunc' is a callable
object
- conforming to::
-
- def somefunc(status, value):
- ...
+ conforming to 'def somefunc(status, value)'
The callback function will be invoked when a primitive succeeds or
fails,
as well as when a pending message is received from the node.
@@ -415,7 +412,7 @@
if relpath == 'index.html':
default = file
- print "n=%s relpath=%s" % (repr(n), repr(relpath))
+ self._log(DETAIL, "n=%s relpath=%s" % (repr(n), repr(relpath)))
msgLines.extend(["Files.%d.Name=%s" % (n, relpath),
"Files.%d.UploadFrom=disk" % n,
Modified: trunk/apps/pyFreenet/fcpxmlrpc.py
===================================================================
--- trunk/apps/pyFreenet/fcpxmlrpc.py 2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/fcpxmlrpc.py 2006-05-12 20:00:13 UTC (rev 8685)
@@ -1,35 +1,24 @@
#! /usr/bin/env python
-#@+leo-ver=4
-#@+node:@file fcpxmlrpc.py
-#@@first
"""
fcpxmlrpc.py
Exposes some pyfcp primitives over an XML-RPC service
"""
-#@+others
-#@+node:imports
import sys
from SimpleXMLRPCServer import SimpleXMLRPCServer
from SocketServer import ThreadingMixIn
import fcp
-#@-node:imports
-#@+node:globals
# where to listen, for the xml-rpc server
xmlrpcHost = "127.0.0.1"
xmlrpcPort = 19481
-#@-node:globals
-#@+node:class FCPXMLRPCServer
class FCPXMLRPCServer(ThreadingMixIn, SimpleXMLRPCServer):
"""
Multi-threaded XML-RPC server for freenet FCP access
"""
- #@ @+others
- #@+node:__init__
def __init__(self, **kw):
"""
Creates the xml-rpc server
@@ -65,8 +54,6 @@
self.register_instance(hdlr)
self.register_introspection_functions()
- #@-node:__init__
- #@+node:run
def run(self):
"""
Launch the server to run forever
@@ -77,25 +64,17 @@
self.node.shutdown()
raise
- #@-node:run
- #@-others
-#@-node:class FCPXMLRPCServer
-#@+node:class FreenetXMLRPCRequestHandler
class FreenetXMLRPCRequestHandler:
"""
Simple class which exposes basic primitives
for freenet xmlrpc server
"""
- #@ @+others
- #@+node:__init__
def __init__(self, node):
self.node = node
- #@-node:__init__
- #@+node:get
def get(self, uri, options=None):
"""
Performs a fetch of a key
@@ -110,8 +89,6 @@
return self.node.get(uri, **options)
- #@-node:get
- #@+node:put
def put(self, uri, options=None):
"""
Inserts data to node
@@ -126,17 +103,11 @@
return self.node.put(uri, data=data, **options)
- #@-node:put
- #@+node:genkey
def genkey(self):
return self.node.genkey()
- #@-node:genkey
- #@-others
-#@-node:class FreenetXMLRPCRequestHandler
-#@+node:usage
def usage(msg="", ret=1):
if msg:
@@ -171,14 +142,10 @@
sys.exit(ret)
-#@-node:usage
-#@+node:testServer
def testServer():
runServer(host="", fcpHost="10.0.0.1", verbosity=DETAIL)
-#@-node:testServer
-#@+node:runServer
def runServer(**kw):
"""
Creates and runs a basic XML-RPC server for FCP access
@@ -187,8 +154,6 @@
"""
FCPXMLRPCServer(**kw).run()
-#@-node:runServer
-#@+node:main
def main():
"""
When this script is executed, it runs the XML-RPC server
@@ -250,13 +215,7 @@
-#@-node:main
-#@+node:mainline
if __name__ == '__main__':
main()
-#@-node:mainline
-#@-others
-#@-node:@file fcpxmlrpc.py
-#@-leo
Modified:
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
===================================================================
---
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -309,7 +309,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified:
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
===================================================================
---
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++
trunk/apps/pyFreenet/html/private/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -232,7 +232,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/SocketServer.BaseServer-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/SocketServer.BaseServer-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/SocketServer.BaseServer-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -278,7 +278,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/SocketServer.TCPServer-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/SocketServer.TCPServer-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/SocketServer.TCPServer-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -382,7 +382,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified:
trunk/apps/pyFreenet/html/private/SocketServer.ThreadingMixIn-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/SocketServer.ThreadingMixIn-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/SocketServer.ThreadingMixIn-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -157,7 +157,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/exceptions.Exception-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/exceptions.Exception-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/exceptions.Exception-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -86,7 +86,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp-module.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp-module.html 2006-05-12 19:19:54 UTC
(rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp-module.html 2006-05-12 20:00:13 UTC
(rev 8685)
@@ -55,8 +55,8 @@
<th colspan="2">Classes</th></tr>
<tr><td width="15%">
<b><a
href="fcp.FCPNodeConnection-class.html"><code>FCPNodeConnection</code></a></b></td>
- <td>Represents an interface to a freenet node via its FCP port,
-and exposes primitives for the basic genkey, get, put and putdir
+ <td>Represents an interface to a freenet node via its FCP port, and
+exposes primitives for the basic genkey, get, put and putdir
operations.</td></tr>
<tr><td width="15%">
<b><a href="fcp.JobTicket-class.html"><code>JobTicket</code></a></b></td>
@@ -458,7 +458,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp.ConnectionRefused-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp.ConnectionRefused-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp.ConnectionRefused-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -89,7 +89,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp.FCPException-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp.FCPException-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp.FCPException-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -93,7 +93,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp.FCPGetFailed-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp.FCPGetFailed-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp.FCPGetFailed-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -91,7 +91,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp.FCPNodeConnection-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp.FCPNodeConnection-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp.FCPNodeConnection-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -43,51 +43,55 @@
<hr/>
-<pre class="literalblock">
-Represents an interface to a freenet node via its FCP port,
-and exposes primitives for the basic genkey, get, put and putdir
-operations.
-
-Only one instance of FCPNodeConnection is needed across an entire
-running client application, because its methods are quite thread-safe.
-Creating 2 or more instances is a waste of resources.
-
-Clients, when invoking methods, have several options regarding flow
+<p>Represents an interface to a freenet node via its FCP port, and
+exposes primitives for the basic genkey, get, put and putdir
+operations.</p>
+<p>Only one instance of FCPNodeConnection is needed across an entire
+running client application, because its methods are quite thread-safe.
+Creating 2 or more instances is a waste of resources.</p>
+Clients, when invoking methods, have several options regarding flow
control and event notification:
-
- - synchronous call (the default). Here, no pending status messages
- will ever be seen, and the call will only control when it has
- completed (successfully, or otherwise)
-
- - asynchronous call - this is invoked by passing the keyword argument
- 'async=True' to any of the main primitives. When a primitive is invoked
- asynchronously, it will return a 'job ticket object' immediately. This
- job ticket has methods for polling for job completion, or blocking
- awaiting completion
-
- - setting a callback. You can pass to any of the primitives a
- 'callback=somefunc' keyword arg, where 'somefunc' is a callable object
- conforming to::
-
- def somefunc(status, value):
- ...
-
- The callback function will be invoked when a primitive succeeds or fails,
- as well as when a pending message is received from the node.
-
- The 'status' argument passed will be one of:
- - 'successful' - the primitive succeeded, and 'value' will contain
- the result of the primitive
- - 'pending' - the primitive is still executing, and 'value' will
- contain the raw pending message sent back from the node, as a
- dict
- - 'failed' - the primitive failed, and as with 'pending', the
- argument 'value' contains a dict containing the message fields
- sent back from the node
-
- Note that callbacks can be set in both synchronous and asynchronous
- calling modes.
-</pre>
+<ul>
+ <li>
+ synchronous call (the default). Here, no pending status messages
+ will ever be seen, and the call will only control when it has
+ completed (successfully, or otherwise)
+ </li>
+ <li>
+ asynchronous call - this is invoked by passing the keyword
+ argument 'async=True' to any of the main primitives. When a primitive
+ is invoked asynchronously, it will return a 'job ticket object'
+ immediately. This job ticket has methods for polling for job
+ completion, or blocking awaiting completion
+ </li>
+ <li>
+ <p>setting a callback. You can pass to any of the primitives a
+ 'callback=somefunc' keyword arg, where 'somefunc' is a callable
+ object conforming to 'def somefunc(status, value)'</p>
+ <p>The callback function will be invoked when a primitive succeeds or
+ fails, as well as when a pending message is received from the
+ node.</p>
+ The 'status' argument passed will be one of:
+ <ul>
+ <li>
+ 'successful' - the primitive succeeded, and 'value' will
+ contain the result of the primitive
+ </li>
+ <li>
+ 'pending' - the primitive is still executing, and 'value' will
+ contain the raw pending message sent back from the node, as a
+ dict
+ </li>
+ <li>
+ 'failed' - the primitive failed, and as with 'pending', the
+ argument 'value' contains a dict containing the message fields
+ sent back from the node
+ </li>
+ </ul>
+ Note that callbacks can be set in both synchronous and
+ asynchronous calling modes.
+ </li>
+</ul>
<hr/>
@@ -646,7 +650,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp.FCPProtocolError-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp.FCPProtocolError-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp.FCPProtocolError-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -91,7 +91,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp.FCPPutFailed-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp.FCPPutFailed-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp.FCPPutFailed-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -91,7 +91,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcp.JobTicket-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcp.JobTicket-class.html 2006-05-12
19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcp.JobTicket-class.html 2006-05-12
20:00:13 UTC (rev 8685)
@@ -178,7 +178,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcpxmlrpc-module.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcpxmlrpc-module.html 2006-05-12
19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcpxmlrpc-module.html 2006-05-12
20:00:13 UTC (rev 8685)
@@ -185,7 +185,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/fcpxmlrpc.FCPXMLRPCServer-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/fcpxmlrpc.FCPXMLRPCServer-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/fcpxmlrpc.FCPXMLRPCServer-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -294,7 +294,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified:
trunk/apps/pyFreenet/html/private/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
===================================================================
---
trunk/apps/pyFreenet/html/private/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++
trunk/apps/pyFreenet/html/private/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -142,7 +142,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/help.html
===================================================================
--- trunk/apps/pyFreenet/html/private/help.html 2006-05-12 19:19:54 UTC (rev
8684)
+++ trunk/apps/pyFreenet/html/private/help.html 2006-05-12 20:00:13 UTC (rev
8685)
@@ -225,7 +225,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/indices.html
===================================================================
--- trunk/apps/pyFreenet/html/private/indices.html 2006-05-12 19:19:54 UTC
(rev 8684)
+++ trunk/apps/pyFreenet/html/private/indices.html 2006-05-12 20:00:13 UTC
(rev 8685)
@@ -320,7 +320,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/sitemgr-module.html
===================================================================
--- trunk/apps/pyFreenet/html/private/sitemgr-module.html 2006-05-12
19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/sitemgr-module.html 2006-05-12
20:00:13 UTC (rev 8685)
@@ -185,7 +185,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/sitemgr.SiteMgr-class.html
===================================================================
--- trunk/apps/pyFreenet/html/private/sitemgr.SiteMgr-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/private/sitemgr.SiteMgr-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -166,7 +166,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/private/trees.html
===================================================================
--- trunk/apps/pyFreenet/html/private/trees.html 2006-05-12 19:19:54 UTC
(rev 8684)
+++ trunk/apps/pyFreenet/html/private/trees.html 2006-05-12 20:00:13 UTC
(rev 8685)
@@ -89,8 +89,8 @@
</ul>
</ul>
<li> <b><a
href="fcp.FCPNodeConnection-class.html"><code>fcp.FCPNodeConnection</code></a></b>:
<i>
-Represents an interface to a freenet node via its FCP port,
-and exposes primitives for the basic genkey, get, put and putdir
+Represents an interface to a freenet node via its FCP port, and
+exposes primitives for the basic genkey, get, put and putdir
operations.</i>
<li> <b><a
href="fcp.JobTicket-class.html"><code>fcp.JobTicket</code></a></b>: <i>
A JobTicket is an object returned to clients making asynchronous
@@ -120,7 +120,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified:
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
===================================================================
---
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCDispatcher-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -258,7 +258,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified:
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
===================================================================
---
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++
trunk/apps/pyFreenet/html/public/SimpleXMLRPCServer.SimpleXMLRPCServer-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -186,7 +186,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/SocketServer.TCPServer-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/SocketServer.TCPServer-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/SocketServer.TCPServer-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -348,7 +348,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified:
trunk/apps/pyFreenet/html/public/SocketServer.ThreadingMixIn-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/SocketServer.ThreadingMixIn-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/SocketServer.ThreadingMixIn-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -157,7 +157,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/exceptions.Exception-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/exceptions.Exception-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/exceptions.Exception-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -86,7 +86,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp-module.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp-module.html 2006-05-12 19:19:54 UTC
(rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp-module.html 2006-05-12 20:00:13 UTC
(rev 8685)
@@ -55,8 +55,8 @@
<th colspan="2">Classes</th></tr>
<tr><td width="15%">
<b><a
href="fcp.FCPNodeConnection-class.html"><code>FCPNodeConnection</code></a></b></td>
- <td>Represents an interface to a freenet node via its FCP port,
-and exposes primitives for the basic genkey, get, put and putdir
+ <td>Represents an interface to a freenet node via its FCP port, and
+exposes primitives for the basic genkey, get, put and putdir
operations.</td></tr>
<tr><td width="15%">
<b><a href="fcp.JobTicket-class.html"><code>JobTicket</code></a></b></td>
@@ -458,7 +458,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp.ConnectionRefused-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp.ConnectionRefused-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp.ConnectionRefused-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -89,7 +89,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp.FCPException-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp.FCPException-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp.FCPException-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -93,7 +93,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp.FCPGetFailed-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp.FCPGetFailed-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp.FCPGetFailed-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -91,7 +91,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp.FCPNodeConnection-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp.FCPNodeConnection-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp.FCPNodeConnection-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -43,51 +43,55 @@
<hr/>
-<pre class="literalblock">
-Represents an interface to a freenet node via its FCP port,
-and exposes primitives for the basic genkey, get, put and putdir
-operations.
-
-Only one instance of FCPNodeConnection is needed across an entire
-running client application, because its methods are quite thread-safe.
-Creating 2 or more instances is a waste of resources.
-
-Clients, when invoking methods, have several options regarding flow
+<p>Represents an interface to a freenet node via its FCP port, and
+exposes primitives for the basic genkey, get, put and putdir
+operations.</p>
+<p>Only one instance of FCPNodeConnection is needed across an entire
+running client application, because its methods are quite thread-safe.
+Creating 2 or more instances is a waste of resources.</p>
+Clients, when invoking methods, have several options regarding flow
control and event notification:
-
- - synchronous call (the default). Here, no pending status messages
- will ever be seen, and the call will only control when it has
- completed (successfully, or otherwise)
-
- - asynchronous call - this is invoked by passing the keyword argument
- 'async=True' to any of the main primitives. When a primitive is invoked
- asynchronously, it will return a 'job ticket object' immediately. This
- job ticket has methods for polling for job completion, or blocking
- awaiting completion
-
- - setting a callback. You can pass to any of the primitives a
- 'callback=somefunc' keyword arg, where 'somefunc' is a callable object
- conforming to::
-
- def somefunc(status, value):
- ...
-
- The callback function will be invoked when a primitive succeeds or fails,
- as well as when a pending message is received from the node.
-
- The 'status' argument passed will be one of:
- - 'successful' - the primitive succeeded, and 'value' will contain
- the result of the primitive
- - 'pending' - the primitive is still executing, and 'value' will
- contain the raw pending message sent back from the node, as a
- dict
- - 'failed' - the primitive failed, and as with 'pending', the
- argument 'value' contains a dict containing the message fields
- sent back from the node
-
- Note that callbacks can be set in both synchronous and asynchronous
- calling modes.
-</pre>
+<ul>
+ <li>
+ synchronous call (the default). Here, no pending status messages
+ will ever be seen, and the call will only control when it has
+ completed (successfully, or otherwise)
+ </li>
+ <li>
+ asynchronous call - this is invoked by passing the keyword
+ argument 'async=True' to any of the main primitives. When a primitive
+ is invoked asynchronously, it will return a 'job ticket object'
+ immediately. This job ticket has methods for polling for job
+ completion, or blocking awaiting completion
+ </li>
+ <li>
+ <p>setting a callback. You can pass to any of the primitives a
+ 'callback=somefunc' keyword arg, where 'somefunc' is a callable
+ object conforming to 'def somefunc(status, value)'</p>
+ <p>The callback function will be invoked when a primitive succeeds or
+ fails, as well as when a pending message is received from the
+ node.</p>
+ The 'status' argument passed will be one of:
+ <ul>
+ <li>
+ 'successful' - the primitive succeeded, and 'value' will
+ contain the result of the primitive
+ </li>
+ <li>
+ 'pending' - the primitive is still executing, and 'value' will
+ contain the raw pending message sent back from the node, as a
+ dict
+ </li>
+ <li>
+ 'failed' - the primitive failed, and as with 'pending', the
+ argument 'value' contains a dict containing the message fields
+ sent back from the node
+ </li>
+ </ul>
+ Note that callbacks can be set in both synchronous and
+ asynchronous calling modes.
+ </li>
+</ul>
<hr/>
@@ -432,7 +436,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp.FCPProtocolError-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp.FCPProtocolError-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp.FCPProtocolError-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -91,7 +91,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp.FCPPutFailed-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp.FCPPutFailed-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp.FCPPutFailed-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -91,7 +91,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcp.JobTicket-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcp.JobTicket-class.html 2006-05-12
19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcp.JobTicket-class.html 2006-05-12
20:00:13 UTC (rev 8685)
@@ -161,7 +161,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcpxmlrpc-module.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcpxmlrpc-module.html 2006-05-12
19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcpxmlrpc-module.html 2006-05-12
20:00:13 UTC (rev 8685)
@@ -185,7 +185,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/fcpxmlrpc.FCPXMLRPCServer-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/fcpxmlrpc.FCPXMLRPCServer-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/fcpxmlrpc.FCPXMLRPCServer-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -254,7 +254,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified:
trunk/apps/pyFreenet/html/public/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
===================================================================
---
trunk/apps/pyFreenet/html/public/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
2006-05-12 19:19:54 UTC (rev 8684)
+++
trunk/apps/pyFreenet/html/public/fcpxmlrpc.FreenetXMLRPCRequestHandler-class.html
2006-05-12 20:00:13 UTC (rev 8685)
@@ -142,7 +142,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/help.html
===================================================================
--- trunk/apps/pyFreenet/html/public/help.html 2006-05-12 19:19:54 UTC (rev
8684)
+++ trunk/apps/pyFreenet/html/public/help.html 2006-05-12 20:00:13 UTC (rev
8685)
@@ -225,7 +225,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/indices.html
===================================================================
--- trunk/apps/pyFreenet/html/public/indices.html 2006-05-12 19:19:54 UTC
(rev 8684)
+++ trunk/apps/pyFreenet/html/public/indices.html 2006-05-12 20:00:13 UTC
(rev 8685)
@@ -272,7 +272,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/sitemgr-module.html
===================================================================
--- trunk/apps/pyFreenet/html/public/sitemgr-module.html 2006-05-12
19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/sitemgr-module.html 2006-05-12
20:00:13 UTC (rev 8685)
@@ -185,7 +185,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/sitemgr.SiteMgr-class.html
===================================================================
--- trunk/apps/pyFreenet/html/public/sitemgr.SiteMgr-class.html 2006-05-12
19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/html/public/sitemgr.SiteMgr-class.html 2006-05-12
20:00:13 UTC (rev 8685)
@@ -166,7 +166,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/html/public/trees.html
===================================================================
--- trunk/apps/pyFreenet/html/public/trees.html 2006-05-12 19:19:54 UTC (rev
8684)
+++ trunk/apps/pyFreenet/html/public/trees.html 2006-05-12 20:00:13 UTC (rev
8685)
@@ -77,8 +77,8 @@
</ul>
</ul>
<li> <b><a
href="fcp.FCPNodeConnection-class.html"><code>fcp.FCPNodeConnection</code></a></b>:
<i>
-Represents an interface to a freenet node via its FCP port,
-and exposes primitives for the basic genkey, get, put and putdir
+Represents an interface to a freenet node via its FCP port, and
+exposes primitives for the basic genkey, get, put and putdir
operations.</i>
<li> <b><a
href="fcp.JobTicket-class.html"><code>fcp.JobTicket</code></a></b>: <i>
A JobTicket is an object returned to clients making asynchronous
@@ -108,7 +108,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
18:42:19 2006</font></td>
+ <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri May 12
19:09:59 2006</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
Modified: trunk/apps/pyFreenet/sitemgr.py
===================================================================
--- trunk/apps/pyFreenet/sitemgr.py 2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/sitemgr.py 2006-05-12 20:00:13 UTC (rev 8685)
@@ -2,7 +2,7 @@
"""
A small freesite insertion/management utility
"""
-import fcp, sys, os, sha
+import fcp, sys, os, sha, traceback
from ConfigParser import SafeConfigParser
@@ -49,6 +49,8 @@
def __del__(self):
try:
+ if hasattr(self, 'node'):
+ self.node.shutdown()
del self.node
self.node = None
except:
@@ -163,11 +165,16 @@
print "Updating site %s" % sitename
print "privatekey=%s" % privatekey
noSites = False
- res = self.node.put(privatekey,
- dir=dir,
- name=sitename,
- version=version,
- usk=True)
+ try:
+ res = self.node.put(privatekey,
+ dir=dir,
+ name=sitename,
+ version=version,
+ usk=True)
+ print "site %s updated successfully" % sitename
+ except:
+ traceback.print_exc()
+ print "site %s failed to update" % sitename
conf.set(sitename, "hash", hashNew)
self.saveConfig()
@@ -175,7 +182,8 @@
if noSites:
print "No sites needed updating"
- return res
+ def shutdown(self):
+ self.node.shutdown()
def help():
Added: trunk/apps/pyFreenet/start.sh
===================================================================
--- trunk/apps/pyFreenet/start.sh 2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/start.sh 2006-05-12 20:00:13 UTC (rev 8685)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# a wrapper which starts the freenet node,
+# and is used with the cron'ed freesite insertion
+# scripts
+
+# change this to where your bash startup script lives
+source /home/david/.bashrc
+
+# change this to where your freenet is installed
+cd /home/david/freenet
+
+# now start the freenet node
+./run.sh start
+
Property changes on: trunk/apps/pyFreenet/start.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/apps/pyFreenet/stop.sh
===================================================================
--- trunk/apps/pyFreenet/stop.sh 2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/stop.sh 2006-05-12 20:00:13 UTC (rev 8685)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# a wrapper which starts the freenet node,
+# and is used with the cron'ed freesite insertion
+# scripts
+
+# change this to where your bash startup script lives
+source /home/david/.bashrc
+
+# change this to where your freenet is installed
+cd /home/david/freenet
+
+# now stop the freenet node
+./run.sh stop
+
Property changes on: trunk/apps/pyFreenet/stop.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/apps/pyFreenet/updatesites.py
===================================================================
--- trunk/apps/pyFreenet/updatesites.py 2006-05-12 19:19:54 UTC (rev 8684)
+++ trunk/apps/pyFreenet/updatesites.py 2006-05-12 20:00:13 UTC (rev 8685)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+
+import sys, os, time, commands
+import sitemgr
+
+# time we wait after starting fred, to allow the node to 'warm up'
+# and make connections to its peers
+startupTime = 180
+
+# directory where we have freenet installed,
+# change it as needed
+freenetDir = "/home/david/freenet"
+
+# derive path of freenet pid file, the (non)existence
+# of which is the easiest test of whether the freenet
+# node is running
+pidFile = os.path.join(freenetDir, "Freenet.pid")
+
+# small wrapper which, if freenet isn't already running,
+# starts it prior to inserting then stops it after
+# inserting
+def main(verbose=None):
+
+ if verbose == None:
+ verbose = ('-v' in sys.argv)
+
+ print "--------------------------------------------"
+ print "Start of site updating run"
+
+ # start freenet and let it warm up, if it's not already running
+ if not os.path.isfile(pidFile):
+ startingFreenet = True
+ os.chdir(freenetDir)
+ print "Starting freenet..."
+ print commands.getstatusoutput("%s/start.sh &" % freenetDir)
+ print "Letting node settle for %s seconds..." % startupTime
+ time.sleep(startupTime)
+ else:
+ print "Freenet node is already running!"
+ startingFreenet = False
+
+ # add verbosity argument if needed
+ if verbose:
+ kw = {"verbosity" : sitemgr.fcp.DETAIL}
+ else:
+ kw = {}
+
+ # get a site manager object, and perform the actual insertions
+ s = sitemgr.SiteMgr(**kw)
+ s.update()
+ del s
+
+ # kill freenet if it was dynamically started
+ if startingFreenet:
+ print "Waiting %s for inserts to finish..." % startupTime
+ time.sleep(startupTime)
+ print "Stopping node..."
+ os.system("./run.sh stop")
+ print "Node stopped"
+
+if __name__ == '__main__':
+ main()
+
Property changes on: trunk/apps/pyFreenet/updatesites.py
___________________________________________________________________
Name: svn:executable
+ *