I need to create a function which can:
- Inspect input arguments and get the number of inputs and their values
- Create a loop, and add string '_in' after each input name
- Make the new inputs global
- Assign new inputs with old values
I tried to use inspect.getargspec() but it seems like this should be called outside the function. So any suggestions?
Here is the pseudo code: Define this function:
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