Martin Höfling wrote: > Hi there, > > is it possible to put the methods of a class in different files? I just > want to order them and try to keep the files small. > > Regards > Martin
you could do this: file_1.py: class A: def __init__(self): self.a = 1 file_2.py: from file_1 import A def seta(self,value): self.a = value setattr(A,"seta",seta) but to use the "complete" class you should then import file_2 in other source files. bye rm -- http://mail.python.org/mailman/listinfo/python-list