• Main Page
  • Namespaces
  • Classes
  • Files
  • File List

/home/mark/model/software/ScrumPy/ScrumPy/Util/Kali.py

00001 
00002 """
00003 
00004 ScrumPy -- Metabolic Modelling with Python
00005 
00006 Copyright Mark Poolman 1995 - 2002
00007 
00008  This file is part of ScrumPy.
00009 
00010     ScrumPy is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     ScrumPy is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU General Public License for more details.
00019 
00020     You should have received a copy of the GNU General Public License
00021     along with ScrumPy; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 
00024 """
00025 
00026 
00027 # Kali - devours all, returns None
00028 
00029 
00030 debug = 0
00031 
00032 
00033 class Kali:
00034     def __init__(self, ident=None,*args,**kwargs):
00035         self.ident = ident
00036         
00037 
00038     def __str__(self):
00039         return "Kali from " + str(self.ident) + "\n"
00040 
00041     def __repr__(self):
00042         return str(self)
00043 
00044     def __getitem__(self, i):
00045         return None
00046 
00047     def __setitem__(self, i):
00048         pass
00049 
00050     if debug:
00051         def __getattr__(self, a):
00052             print "Kali  ", self.ident, a
00053             return self.DoNothing
00054     else:
00055         def __getattr__(self, a):
00056             return self.DoNothing
00057 
00058     def DoNothing(self, *args, **kwargs):
00059         pass

Generated on Tue Sep 4 2012 15:38:02 for ScrumPy by  doxygen 1.7.1