There is another way so the function does not need to be defined before it’s called. Make it a function in the class, and because it’s a class function then, you need to call it with self.subir. Like:
class World(DirectObject):
def __init__(self):
self.accept("escape",sys.exit)
self.accept("s",self.subir)
def subir(self):
zeta = zeta + 1
Btw. your coding style is horrible this way. I suggest putting the rest also in the class constructor or don’t use classes at all.