PEP8 compliance
--HG-- branch : sandbox
This commit is contained in:
@@ -19,29 +19,31 @@ import ImageTk
|
||||
|
||||
LOG = logging.getLogger()
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
logging.basicConfig(level=logging.DEBUG,
|
||||
format='%(asctime)s.%(msecs)03i %(levelname).4s %(process)d:%(thread)d %(message)s',
|
||||
datefmt='%H:%M:%S')
|
||||
|
||||
CODE = "#MWmBEKNQkAbqXHgUFRhdwp8&aDGVZ9utO03CYvlrI=i<7+?}(*[/|;!^-~`,:. "
|
||||
|
||||
|
||||
def main():
|
||||
tkis = []
|
||||
# build gui
|
||||
root = Tk.Tk()
|
||||
root.title("bottier")
|
||||
bu1 = Tk.Button(root, text='Quit', command= root.quit)
|
||||
bu1.pack(side = Tk.BOTTOM, padx = 5, pady = 5)
|
||||
bu1 = Tk.Button(root, text='Quit', command=root.quit)
|
||||
bu1.pack(side=Tk.BOTTOM, padx=5, pady=5)
|
||||
for s in (PIC1, PIC2, PIC3, PIC4, PIC5):
|
||||
im = ascii2img(s)
|
||||
tki = ImageTk.PhotoImage(im, gamma = 2)
|
||||
tki = ImageTk.PhotoImage(im, gamma=2)
|
||||
tkis.append(tki)
|
||||
la = Tk.Label(root, image = tki)
|
||||
la.pack(side = Tk.RIGHT, padx = 5, pady = 5)
|
||||
la = Tk.Label(root, image=tki)
|
||||
la.pack(side=Tk.RIGHT, padx=5, pady=5)
|
||||
|
||||
root.mainloop()
|
||||
root.destroy()
|
||||
|
||||
|
||||
def ascii2img(s):
|
||||
# create the image
|
||||
# lines = StringIO(s).readlines()
|
||||
@@ -54,7 +56,7 @@ def ascii2img(s):
|
||||
im.putpixel((x, y), CODE.find(c) * 4)
|
||||
bbox = im.getbbox()
|
||||
bbim = im.crop(bbox)
|
||||
imx2 = bbim.resize((bbox[2]*2, bbox[3]*2), Image.ANTIALIAS)
|
||||
imx2 = bbim.resize((bbox[2] * 2, bbox[3] * 2), Image.ANTIALIAS)
|
||||
return imx2
|
||||
|
||||
PIC1 = """\
|
||||
@@ -316,7 +318,7 @@ uuO03v=iIlaXAkdlrRB#WWmAQMmEBEBmmEKBEN3([*[[[[[/[*(?++?7?+7+<<7<77i<77+:
|
||||
OOt0CYlIl<<iIYbHZCGBMkuC<OWBBMMBMBmmBK3}+((}*//[[[[*[?(((}(??}?}}}}7+?(.
|
||||
ut9tO0YvI=I=rYHH0YIVEN&ppuXB#W#MWmBN8Y3Y7}?}(([(*[**[**/*[/[[(*((}}***[:
|
||||
ZZ99ttCCYlrrIuOUGv<+rGaUavHW#MWWWEAqw8NQaul=7?+}?(((*[*****[[*/[*[[**[/:
|
||||
aGDZV9tt03vvlCY&X&07++}l}+uNEHd8wqEmMWAqXNKU0<7?}+??}(}([[*[**[*/(*/[//
|
||||
aGDZV9tt03vvlCY&X&07++}l}+uNEHd8wqEmMWAqXNKU0<7?}+??}(}([[*[**[*/(*/[//
|
||||
&pa&8GVZut0OYYYOdXF8VCIIY&dw&DpgEBNq&VXKHXdHHgv7i7<7777++?}}(}*}*([[*//.
|
||||
Fhdw&8a&aZZuuuOuwOXKKKQbqqF&&FKmmWBXDZi?IagqURbhIII=<i<7++???}}}+((}*[/:
|
||||
UhRhdR&Rp8a&DaVZGDhFwZZI=rZhFqkQKEHabC```~~^[uggROrrI=i<7+<7<7777+?(?(}`
|
||||
@@ -362,4 +364,4 @@ hFwwwdRggRUgUHUbXXqXbggbqHXgUggXUgUURhwww88&&88aVZVZGGDDZ&ZDpD8u9uZ&GGGZ
|
||||
"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user