[Pybrainsim-activity] SF.net SVN: pybrainsim:[36] trunk/src/GeneratorDummy.py
Status: Planning
Brought to you by:
rgoj
From: <rg...@us...> - 2009-08-02 16:26:05
|
Revision: 36 http://pybrainsim.svn.sourceforge.net/pybrainsim/?rev=36&view=rev Author: rgoj Date: 2009-08-02 16:25:57 +0000 (Sun, 02 Aug 2009) Log Message: ----------- * GeneratorDummy prints out messages to standard output when interesting methods are run Added Paths: ----------- trunk/src/GeneratorDummy.py Added: trunk/src/GeneratorDummy.py =================================================================== --- trunk/src/GeneratorDummy.py (rev 0) +++ trunk/src/GeneratorDummy.py 2009-08-02 16:25:57 UTC (rev 36) @@ -0,0 +1,36 @@ +# PyBrainSim Copyright 2009 Roman Goj +# +# This file is part of PyBrainSim. +# +# PyBrainSim is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# PyBrainSim 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# PyBrainSim. If not, see <http://www.gnu.org/licenses/>. + +__metaclass__ = type # New style classes. Is this necessary? + +""" +The GeneratorDummy class is a reimplementation of the parent class +GeneratorDummy, printing out a message whenever any interesting methods are +invoked. +""" + +from Generator import Generator + +class GeneratorDummy(Generator): + def printInfo(self): + print(self.name + ": A GeneratorDummy object") + + def receiveInput(self, input): + print("[receiveInput] " + self.name + ": Received input from connection") + + def runGenerator(self, time): + print("[runGenerator] " + self.name + ": Calculating activation") + return 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |