python version fully ported to ArgumentParser