fork download
  1. shell_script = '''
  2. THENAME=PETER
  3. echo "THENAME = $THENAME"
  4. '''
  5.  
  6. import subprocess
  7. subprocess.check_call(shell_script, shell=True)
Success #stdin #stdout 0.03s 9936KB
stdin
Standard input is empty
stdout
THENAME = PETER