Call a Python function with arguments based on user input
<p>I would like to call a function from a user input, but include arguments in the parenthesis.  For example, if I have a function that takes one argument:</p>

<pre><code>def var(value):
    print(value)
</code></pre>

<p>I would like to ask the user for a command and arguments, then call the function with the arguments:</p>

<pre><code>Input Command: var("Test")
Test
</code></pre>

<p>You should investigate the <a href="https://docs.python.org/2/library/cmd.html?highlight=cmd#module-cmd" rel="nofollow">cmd</a> module. This allows you to parse input similar to shell commands, but I believe you can get tricky and change the delimiters if the parentheses are an important part of the specification.</p>

python