/usr/lib/python3/dist-packages/ansi/sequence.py is in python3-ansi 0.1.3-1.
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 | CSI = '\x1b['
def sequence(letter, fields=1, default=[]):
def _sequence(*values):
output = list(values)
if fields >= 0 and len(output) > fields:
raise ValueError('Invalid number of fields, got %d expected %d' %
(len(output), fields))
while len(output) < fields and len(default) > len(output):
output.append(fields[len(default) - 1])
return ''.join([
CSI,
';'.join(map(str, output)),
letter,
])
return _sequence
|