Skip to content

Commit

Permalink
Merge pull request #195 from strycore/master
Browse files Browse the repository at this point in the history
Use print function instead of statement
  • Loading branch information
b-ryan committed Aug 1, 2015
2 parents 896d3de + f43921d commit 45ddf9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python2
from __future__ import print_function
import os
import stat

Expand All @@ -19,7 +20,7 @@ def load_source(srcfile):
try:
return ''.join(open(srcfile).readlines()) + '\n\n'
except IOError:
print 'Could not open', srcfile
print('Could not open', srcfile)
return ''

if __name__ == "__main__":
Expand All @@ -34,7 +35,7 @@ def load_source(srcfile):
open(OUTPUT_FILE, 'w').write(source)
st = os.stat(OUTPUT_FILE)
os.chmod(OUTPUT_FILE, st.st_mode | stat.S_IEXEC)
print OUTPUT_FILE, 'saved successfully'
print(OUTPUT_FILE, 'saved successfully')
except IOError:
print 'ERROR: Could not write to powerline-shell.py. Make sure it is writable'
print('ERROR: Could not write to powerline-shell.py. Make sure it is writable')
exit(1)
5 changes: 3 additions & 2 deletions powerline_shell_base.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function

import argparse
import os
import sys

def warn(msg):
print '[powerline-bash] ', msg
print('[powerline-bash] ', msg)

class Powerline:
symbols = {
Expand Down Expand Up @@ -61,7 +62,7 @@ def bgcolor(self, code):
return self.color('48', code)

def append(self, content, fg, bg, separator=None, separator_fg=None):
self.segments.append((content, fg, bg,
self.segments.append((content, fg, bg,
separator if separator is not None else self.separator,
separator_fg if separator_fg is not None else bg))

Expand Down

0 comments on commit 45ddf9a

Please sign in to comment.