I am trying to call a function defined in a class from main..how can I do that?
class file_process:
def findb(self, id):
....
def main():
id = sys.argv[2]
file_process.findb(id)//how to call findb function from main,this is giving an error
Since
finddbis a method, you need to call it on an instance offile_process:I strongly urge you to study up on Python and classes, I can recommend the Python tutorial, before you continue.