mapping functions in dict
<p>I want to run python functions from linux command prompt. So, I define a functions and dictionary of mappings from linux inputs to the functions to be exectured. So,eg.</p>

<pre><code>def help():
    print(...)

def dostuff():
    do sth

functions ={
    'help': help()'
    ''dostuff' : dostuff()
    }

def parsecommand():
    return functions[sys.argv]

if __name__='__main__':
    parsecommand()    
</code></pre>

<p>When I now run a function from Linux, [python filename.py] help the problem now is that python runs through all the functions in the dictionary and executes them when building the dictionary. How can I avoid this?
Or what would be a better way to structure this?</p>
