#! /usr/bin/env python import subprocess, argparse Time = 'time ' CurlStart = 'curl -T ' InFile = 'FileWith24Bytes ' ServerAnduri = 'http://127.0.0.1:3456/uri/' Capability = 'URI:MDMF:icvavt7e5rocc4uwmbeidgokbi:rpflygqts7edwxgiqwjf2mtz4ubz2jqza3uqdy526g6xzw3awj5q:3:131073' StringToRun = Time + CurlStart + InFile + ServerAnduri + Capability CommandList = [CurlStart, InFile, ServerAnduri, Capability] def main(): SubProcess = subprocess.Popen(CommandList) #TestSubProcess = subprocess.Popen(["echo", "'foo'"]) if __name__ == '__main__': main()