Use the print function everywhere
python modernize.py --no-six -f libmodernize.fixes.fix_print -w With manual fixes as the import was put always on top.
This commit is contained in:
parent
d22656308a
commit
74a4ef6723
73 changed files with 499 additions and 442 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
|
@ -10,26 +12,26 @@ if '--deps' in sys.argv:
|
|||
else:
|
||||
deps = ['--nodeps']
|
||||
|
||||
print "Weboob local installer"
|
||||
print
|
||||
print("Weboob local installer")
|
||||
print()
|
||||
if len(sys.argv) < 2:
|
||||
print "This tool will install Weboob to be usuable without requiring"
|
||||
print "messing with your system, which should only be touched by a package manager."
|
||||
print
|
||||
print "Usage: %s DESTINATION [OPTIONS]" % sys.argv[0]
|
||||
print
|
||||
print "By default, no dependencies are installed, as you should try"
|
||||
print "to install them from your package manager as much as possible."
|
||||
print "To install all the missing dependencies, add the option --deps"
|
||||
print "at the end of the command line."
|
||||
print
|
||||
print >>sys.stderr, "Error: Please provide a destination, " \
|
||||
"for example ‘%s/bin’" % os.getenv('HOME')
|
||||
print("This tool will install Weboob to be usuable without requiring")
|
||||
print("messing with your system, which should only be touched by a package manager.")
|
||||
print()
|
||||
print("Usage: %s DESTINATION [OPTIONS]" % sys.argv[0])
|
||||
print()
|
||||
print("By default, no dependencies are installed, as you should try")
|
||||
print("to install them from your package manager as much as possible.")
|
||||
print("To install all the missing dependencies, add the option --deps")
|
||||
print("at the end of the command line.")
|
||||
print()
|
||||
print("Error: Please provide a destination, " \
|
||||
"for example ‘%s/bin’" % os.getenv('HOME'), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
else:
|
||||
dest = os.path.expanduser(sys.argv[1])
|
||||
|
||||
print "Installing weboob applications into ‘%s’." % dest
|
||||
print("Installing weboob applications into ‘%s’." % dest)
|
||||
|
||||
subprocess.check_call(
|
||||
[sys.executable, 'setup.py',
|
||||
|
|
@ -38,11 +40,11 @@ subprocess.check_call(
|
|||
|
||||
subprocess.check_call([sys.executable, os.path.join(dest, 'weboob-config'), 'update'])
|
||||
|
||||
print
|
||||
print "Installation done. Applications are available in ‘%s’." % dest
|
||||
print "You can remove the source files."
|
||||
print
|
||||
print "To have easy access to the Weboob applications,"
|
||||
print "you should add the following line to your ~/.bashrc or ~/.zshrc file:"
|
||||
print "export PATH=\"$PATH:%s\"" % dest
|
||||
print "And then restart your shells."
|
||||
print()
|
||||
print("Installation done. Applications are available in ‘%s’." % dest)
|
||||
print("You can remove the source files.")
|
||||
print()
|
||||
print("To have easy access to the Weboob applications,")
|
||||
print("you should add the following line to your ~/.bashrc or ~/.zshrc file:")
|
||||
print("export PATH=\"$PATH:%s\"" % dest)
|
||||
print("And then restart your shells.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue