run code and insteed print in the screen write to text file code example
Example: how to save the command result with ! in python
subprocess = subprocess.Popen("echo Hello World", shell=True, stdout=subprocess.PIPE)
subprocess = subprocess.Popen("echo Hello World", shell=True, stdout=subprocess.PIPE)