Python change function input name internaly
<p>I need to create a function which can:</p>

<ol>
<li>Inspect input arguments and get the number of inputs and their values</li>
<li>Create a loop, and add string '_in' after each input name </li>
<li>Make the new inputs global</li>
<li>Assign new inputs with old values </li>
</ol>

<p>I tried to use inspect.getargspec() but it seems like this should be called outside the function. So any suggestions?</p>

<p>Here is the pseudo code:
Define this function:</p>

<pre><code>def set_global(a1, a2, a3, .... an):
    #the number of arguments is not fixed and we need to detect that
    for old_input in total input:
         new_input_name=str(old_input.name)+'_in'
         global new_input_name 
         new_input_name = old_input.value
</code></pre>
