Created
April 6, 2018 10:11
-
-
Save rootcss/04d8e1a7151f22842b8d690202c2680c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| from threading import Thread | |
| def call_subprocess(cmd): | |
| proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
| out, err = proc.communicate() | |
| if err: | |
| print(err) | |
| thread = Thread(target=call_subprocess, args=['pip install --upgrade pip && pip install pysftp']) | |
| thread.start() | |
| thread.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment