mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2024-09-20 01:30:33 +00:00
Fix issues with python 2
This commit is contained in:
parent
32aef451de
commit
738e324f56
1 changed files with 5 additions and 3 deletions
|
@ -222,9 +222,10 @@ class Utils:
|
|||
# Header drawing method
|
||||
def head(self, text = None, width = 55):
|
||||
if not self.interactive:
|
||||
print(text, file=sys.stderr)
|
||||
sys.stderr.write(str(text)+"\n")
|
||||
sys.stderr.flush()
|
||||
return
|
||||
if text == None:
|
||||
if text is None:
|
||||
text = self.name
|
||||
self.cls()
|
||||
print(" {}".format("#"*width))
|
||||
|
@ -245,7 +246,8 @@ class Utils:
|
|||
if self.interactive:
|
||||
print(text)
|
||||
else:
|
||||
print(text, file=sys.stderr)
|
||||
sys.stderr.write(str(text)+"\n")
|
||||
sys.stderr.flush()
|
||||
|
||||
def resize(self, width, height):
|
||||
print('\033[8;{};{}t'.format(height, width))
|
||||
|
|
Loading…
Reference in a new issue