Class too big and hard to add new features
<p>I have a class with like 50 methods.</p>

<pre><code>class MyProgram(object):
    def method1(self):
        pass
    def method2(self):
        pass
    # and so on  
</code></pre>

<p>Its that big because my Class is also my program, i call myProgram.py via the console and many methods are options like:</p>

<pre><code>myProgram.py --method1 --method2
</code></pre>

<p>On the one hand it is really easy for me to use the methods like this. On the other hand the code is just not readable anymore. If I have to change two things, I have to go 1000 lines up and then 2000 lines down to just changes some dependencies or add a new feature like method999().</p>

<p>How can I split my class and still have something like myProgramm.py --method1 --method2 ?
Its important that I can call my program like this to do some cronjobs.</p>

<p>(I'm convinced that there is a really easy solution to this, but I just can't think about it now)</p>

<p>EDIT: a better example of my god class.</p>

<pre><code>class myprogram(object):
    def __init__(self)
        self.prepare()
    def prepare(self):
        # some initializations
        self.prepareCommands()
    def prepareCommands(self):
        self.initCommand("--updateDatabase", self.updateDatabase)
        self.initCommand("--getImages", self.getImages)
        # and so on
    def initCommand(self, cmd, func):
        options = sys.argv
        for option in options:
            if option.find(cmd)!=-1:
                return func()
    # my commands
    def updateDatabase(self):
        #...
    def getImages(self):
        #...
if __name__ == "__main__":
    p = myprogram()
</code></pre>

<p>EDIT2: After researching a little I think I got a good solution. I will update everything when I've rewritten my programm. :)      </p>
