I have a python script that implements several functions, but I want to be flexible in terms of which functions I use every time. When I would run the Python Script I would want to pass some arguments that would stand as "flags" for executing my functions.
In MATLAB would look something like this:
function metrics( Min, Max )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
x = [1,2,3,4,5,5];
if (Min==1)
min(x)
else
disp('something')
end
if (Max==1)
max(x)
else
disp('else')
end
end
Which I call from command window with (for example):
metrics(1,0)
In Python I tried using
def metrics(min, max)
argparse()
and
os.system("metrics.py 1,1")
Any suggestion how to transpose the MATLAB function calling in the Python Shell (I am using Anaconda's Spyder for the matter)?