-
Notifications
You must be signed in to change notification settings - Fork 1
/
core.py
59 lines (55 loc) · 2.22 KB
/
core.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import sys
# Starting process
print "> Starting....\n"
print "> PyUp is checking if pip is installed......\n"
separator = "----------------------------------------------------------------------------\n"
try:
# Checking if pip is installed first, if not installed then pyUp will install it
import pip
print "> PyUp: Pip is present.\n"
print separator
print "> PyUp: checking for pip-review .....\n"
try:
# Checking for pip-review, if not installed then pyUp will install it
import pip_review
print "> PyUp: pip-review is present.\n"
except:
print "> PyUp: installing pip-review .....\n"
os.system("pip install pip-review")
os.system("pip-review --auto")
print separator
print "> PyUp: All your python packages updated successfully.\n"
print separator
except ImportError:
print "> Pip is not present."
print separator
installPIP = raw_input("> PyUp: Do you want to install it ? (Y/N): ")
print separator
if installPIP.lower() == "y":
print "> PyUp: installing pip....\n"
os.system("python get-pip.py")
print "> PyUp: checking for pip-review .....\n"
try:
# Checking for pip-review, if not installed then pyUp will install it
import pip_review
print "> PyUp: pip-review is present.\n"
except:
print "> PyUp: installing pip-review .....\n"
os.system("pip install pip-review")
os.system("pip-review --auto")
print separator
print "> PyUp: All your python packages updated successfully.\n"
print separator
else:
try:
# Checking for webbrowser, if not installed then pyUp will install it
import webbrowser
except:
print "> PyUp: You don't have webbrowser installed\n"
print separator
os.system("pip install webbrowser")
webbrowser.open('https://github.com/BurntSushi/nfldb/wiki/Python-&-pip-Windows-installation')
print separator
print "> PyUp: Please use this link to install PIP FIRST, otherwise PyUp is not able to work: https://github.com/BurntSushi/nfldb/wiki/Python-&-pip-Windows-installation"
sys.exit()
os.system("pause")