Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 882e8e7

Browse files
committed
supporting py3 because of pip3 show format
1 parent 0895003 commit 882e8e7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

plotly/check_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import os
22
import re
3+
import sys
34

45

56
def get_latest():
67
os.system('pip show plotly > pip_version.txt')
78
with open('pip_version.txt', 'r') as file:
8-
output = [i for i in file][2]
9+
output = [i for i in file][sys.version_info.major]
910
latest_version = re.findall(r'([0-9\.]+)', output)[0]
1011
return latest_version
1112

plotly/version.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
__version__ = '1.9.7'
2-
3-

0 commit comments

Comments
 (0)