fix stdout option for python 2 and 3, add option for remote url