Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3beb336

Browse files
committed
Minimal test of icglue module
1 parent 0d2971b commit 3beb336

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Mac/Lib/test/icgluetest.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""Test icglue module by printing all preferences"""
2+
3+
import icglue
4+
import Res
5+
6+
ici = icglue.ICStart('Pyth')
7+
ici.ICFindConfigFile()
8+
h = Res.Resource("")
9+
10+
ici.ICBegin(1)
11+
numprefs = ici.ICCountPref()
12+
print "Number of preferences:", numprefs
13+
14+
for i in range(1, numprefs+1):
15+
key = ici.ICGetIndPref(i)
16+
print "Key: ", key
17+
18+
h.data = ""
19+
attrs = ici.ICFindPrefHandle(key, h)
20+
print "Attr: ", attrs
21+
print "Data: ", h.data
22+
23+
ici.ICEnd()
24+
del ici
25+
26+
import sys
27+
sys.exit(1)

0 commit comments

Comments
 (0)