How do I call a function from the same file as I would if using getattr?
<p>In my program I have 25 different functions named <code>"task1"</code>, <code>"task2"</code>, <code>"task3"</code>, etc...
At the moment I can call on these functions from a separate file and do them in the shell:</p>

<pre><code>import examplefilename
tasknum = str(input("Which task would you like to see? "))
task = "task" + tasknum
methodToCall = getattr(examplefilename, task)
result = methodToCall()
</code></pre>

<p>What I have done will only call from a different file though so how do I do a function in this manner from the same file?</p>