-def progress(message):
-
- MSG_LENGTH = 30
-
- def progress_gen(n):
- msg = "%s:" % message
-
- progressbar = Bar(msg.ljust(MSG_LENGTH))
- progressbar.max = n
- progressbar.fill = '#'
- progressbar.bar_prefix = ' ['
- progressbar.bar_suffix = '] '
-
- for _ in range(n):
- yield
- progressbar.next()
- output("\r%s...\033[K" % message, False)
- success("done")
- yield
- return progress_gen
-
-
-class Kamaki:
- def __init__(self, account, token):
+class Kamaki(object):
+ def __init__(self, account, token, output):