diff --git a/oml/__main__.py b/oml/__main__.py index c303fd0..d34e6fa 100644 --- a/oml/__main__.py +++ b/oml/__main__.py @@ -1,9 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 -from __future__ import division +from __future__ import division, print_function -import os import sys import api @@ -18,12 +17,12 @@ else: if command and command in names: getattr(commands, "command_%s"%command)(sys.argv[1:]) else: - print 'usage: %s [action]' % 'ctl' + print("usage: ctl [action]") indent = max([len(command) for command in names]) + 4 for command in sorted(names): space = ' ' * (indent - len(command)) info = getattr(commands, "command_%s"%command).__doc__.split('\n') info = [' %s%s' % (' ' * indent, i.strip()) for i in info] info = '\n'.join(info).strip() - print " %s%s%s"%(command, space, info) + print(" %s%s%s" % (command, space, info)) sys.exit(1)