There is a command like the following:
for i in $(objdump -d binary |grep "^ " |cut -f2); do echo -n '\x'$i; done;echo
How can I use this command in my python code and then deliver the result of the hexdump (print) to the console.
objdump = "$(objdump -d " + str(_arg_name) + "| grep '^ ' |cut -f2);" + " do echo -n $i; done; echo"
result = os.popen(objdump).read()
result = result.replace('"','')
print(result)