blob: 4895f86921010eb41c44bc434becd939cee87616 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import base64, glob
print 'import Tix as tk'
print
for image in glob.glob('res/*.gif'):
print image.upper().replace('.', '_').replace('RES\\', '').replace('_GIF', '_ICON'), '= tk.PhotoImage(data=\'\'\''
content = base64.b64encode(file(image, 'rb').read())
while len(content) > 0:
chunk = content[0:80]
content = content[80:]
print chunk
print '\'\'\')'
|