/usr/lib/python2.7/dist-packages/apprecommender/utils.py is in apprecommender 0.7.5-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/usr/bin/env python
import sys
def print_progress_bar(number, n_numbers, message='Progress',
bar_length=40):
percent = float(number) / float(n_numbers)
hashes = '#' * int(round(percent * bar_length))
spaces = ' ' * (bar_length - len(hashes))
percent = int(round(percent * 100))
percent_message = ("\r{}: [{}] [{} / {}] {}%".format(message,
hashes + spaces,
number,
n_numbers,
percent))
sys.stdout.write(percent_message)
sys.stdout.flush()
if number == n_numbers:
print '\n'
def get_class_and_module_name(cls):
class_name = cls.__name__
module_name = cls.__module__
return module_name + '.' + class_name
|