File: Thing.py

package info (click to toggle)
cyphesis-cpp 0.5.16-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,084 kB
  • ctags: 3,627
  • sloc: cpp: 30,418; python: 4,812; xml: 4,674; sh: 4,118; makefile: 902; ansic: 617
file content (18 lines) | stat: -rw-r--r-- 742 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#This file is distributed under the terms of the GNU General Public license.
#Copyright (C) 1999-2005 Al Riddoch (See the file COPYING for details).

class Thing:
    """This is the interface class for all entity and mind scripts. It
       provides the interface to the object in the server core."""
    def __init__(self, cppthing):
        #print "Thing.__init__"
        self.cinit(cppthing)
    def cinit(self, cppthing):
        self.__dict__['cppthing'] = cppthing
    def __getattr__(self, name):
        value = getattr(self.cppthing, name)
        #print "__getattr__",name,value
        return value
    def __setattr__(self, name, value):
        #print "__setattr__",name,value
        return setattr(self.cppthing, name, value)