File: encode_icons.py

package info (click to toggle)
nicotine 1.2.6%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,016 kB
  • ctags: 1,786
  • sloc: python: 16,628; ansic: 312; makefile: 74; sh: 41
file content (18 lines) | stat: -rwxr-xr-x 393 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import sys, string

table = [
	["connect.ico", "connect"],
	["disconnect.ico", "disconnect"],
	["away2.ico", "away2"],
	["hilite2.ico", "hilite2"],
]

outf = open(os.path.join("pynicotine","gtkgui","icondata.py"), "w")
for image in table:
	print image[0]
	f = open(os.path.join("img", image[0]), "rb")
	d = f.read()
	f.close()
	outf.write("%s = %s\n" % (image[1], `d`))
outf.close()