Author: ArcRiley
Date: 2009-01-08 22:50:28 -0500 (Thu, 08 Jan 2009)
New Revision: 1447

Added:
   trunk/concordance/examples/
   trunk/concordance/examples/echo.py
Log:
added simple example with a callback


Added: trunk/concordance/examples/echo.py
===================================================================
--- trunk/concordance/examples/echo.py                          (rev 0)
+++ trunk/concordance/examples/echo.py  2009-01-09 03:50:28 UTC (rev 1447)
@@ -0,0 +1,35 @@
+#!/usr/bin/env python3.0
+
+''' Simple Concordance server that echos all callback data to stdout '''
+
+__credits__ = '''Copyright (C) 2009 Copyleft Games Group
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published
+    by the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program; if not, see http://www.gnu.org/licenses
+'''
+__author__  = 'Copyleft Games Group'
+__date__    = 'Last change on '+ \
+              '$Date$'[7:-20]+ \
+              'by '+'$Author$'[9:-2]
+__version__ = 'Trunk (r'+'$Rev$'[6:-2]+')'
+
+
+import concordance
+
+class newcore(concordance.Core) :
+  def clientHandle(self, input) :
+    print(":%s" % input)
+    return ""
+
+nc = newcore()
+nc()


Property changes on: trunk/concordance/examples/echo.py
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:keywords
   + Author Date Rev

_______________________________________________
PySoy-SVN mailing list
PySoy-SVN@pysoy.org
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to