diff options
-rw-r--r-- | pkg/tools/upgrade_all.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/tools/upgrade_all.py b/pkg/tools/upgrade_all.py new file mode 100644 index 0000000..0732285 --- /dev/null +++ b/pkg/tools/upgrade_all.py @@ -0,0 +1,13 @@ +import os +import sys + +import pip +from subprocess import call + +if not os.environ.get('VIRTUAL_ENV'): + print('[!] Should call this script inside a virtualenv, I do not want to ' + 'mess with your system. Bye!') + sys.exit(1) + +for dist in pip.get_installed_distributions(): + call("pip install --upgrade " + dist.project_name, shell=True) |