I come from a Java background and I\'m new to python. I have a couple scripts that share some helper functions unique to the application related to reading and writing file
If the function is related to a class, then make it a static method. For example:
class DBobject():
name = StringProperty()
@staticmethod
def get_by_name(name):
return db.select('select * from DBobject where name = "%s"' % name)
python = DBobject.get_by_name('python')
That is, the method is completely related to the DBobject class so it should be a static method.