Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Tk_Alpha_Art_Test_6.py ZZZ
- from Tkinter import *
- from PIL import Image, ImageTk
- from itertools import combinations
- import string
- import random
- import tempfile
- import webbrowser
- srcfilename=tempfile.mktemp(".py", "1400x680_")
- srcfilename=srcfilename.rsplit('\\',1)[0]+'\\alpha1400x680art.py'
- print srcfilename
- rnd = random.randint
- ww = 1200
- hh = 600
- root = Tk()
- root.title("Tk_Alpha_Art.py")
- root.geometry("%dx%d+0+0"%(ww,hh))
- aaa = list(string.uppercase)
- bbb = list(string.lowercase)
- ppp = [a+b for a in aaa+bbb for b in aaa+bbb]
- L = len(ppp)
- print L
- rgb2 = []
- for y in range(hh):
- for x in range(ww):
- rgb2 += ['('+'+'.join([ppp[z%L]+'_' for z in (x+hh,y)])+')']
- 0
- ttt = 'alpha_art = lambda zzzzz : '
- abc = ttt+'['+','.join(rgb2)+']'
- '''
- temp=open(srcfilename, 'w')
- temp.write(abc)
- temp.close()
- webbrowser.open_new_tab(srcfilename)
- import alpha1400x680art
- '''
- exec(abc)
- def draw():
- image.putdata(rgb_)
- photo = ImageTk.PhotoImage(image)
- canvas.create_image(0,0,image=photo,anchor=NW)
- canvas.update()
- 0
- canvas = Canvas(root, width=ww, height=hh)
- canvas.pack()
- image = Image.new("RGB", (ww,hh), (255,255,255))
- ccccc = 255**3
- i = 0
- while 1:
- for p in ppp:
- t = str(i)
- exec(p+'_='+t)
- i = (i+1)%ccccc
- rgb_ = alpha_art(0)
- '''
- '''
- draw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement