move shell and python script from testcode to script