PEP 8 (I'm bored): core/util
This commit is contained in:
parent
b2b34ad81a
commit
9e06145389
@ -364,6 +364,7 @@ def internet():
|
|||||||
except OSError:
|
except OSError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def make_graph(values, upper_limit=100.0):
|
def make_graph(values, upper_limit=100.0):
|
||||||
"""
|
"""
|
||||||
Draws a graph made of unicode characters.
|
Draws a graph made of unicode characters.
|
||||||
@ -385,8 +386,8 @@ def make_graph(values, upper_limit=100.0):
|
|||||||
if extent == 0:
|
if extent == 0:
|
||||||
graph = '_' * len(values)
|
graph = '_' * len(values)
|
||||||
else:
|
else:
|
||||||
graph = ''.join(bar[int( (n - mn) / extent * bar_count)]
|
graph = ''.join(bar[int((n - mn) / extent * bar_count)]
|
||||||
for n in values[:len(values)-1]) # Don't show the upper limit value.
|
for n in values[:len(values) - 1]) # Don't show the upper limit value.
|
||||||
return graph
|
return graph
|
||||||
|
|
||||||
|
|
||||||
@ -442,4 +443,3 @@ def user_open(url_or_command):
|
|||||||
else:
|
else:
|
||||||
import subprocess
|
import subprocess
|
||||||
subprocess.Popen(url_or_command, shell=True)
|
subprocess.Popen(url_or_command, shell=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user