six-char-max
six-char-max copied to clipboard
May produce longer than 6 character line
For example, this input file produces 8 character lines:
$ cat input.py
print "α β γ"
$ python max6.py input.py output.py
$ cat output.py
a = ""
a+='p'
a+='r'
a+='i'
a+='n'
a+='t'
a+=' '
a+='"'
b='\xce'
a+=b
b='\xb1'
a+=b
a+=' '
b='\xce'
a+=b
b='\xb2'
a+=b
a+=' '
b='\xce'
a+=b
b='\xb3'
a+=b
a+='"'
b='\n'
a+=b
exec a
See this gist for a sample ascii python input file that produces an 8 character line.