On Mon, 17 Aug 2009 21:45:57 -0700, naveen wrote: > Is it possible to split up a class definition over multiple files?
Not exactly, but you can do variations of this: In file A.py, create: class Parent: def method(self): return "Method" In file B.py, do this: import A class Child(B.parent): def another_method(self): return "Another Method" Now your class Child has two methods, method() and another_method(). Similarly, you can do this: # File A.py def function(x, y): return x+y # or something more complicated # File B.py import A def MyClass(object): def func(self, x, y): return A.function(x, y) -- Steven -- http://mail.python.org/mailman/listinfo/python-list