blob: 323f9e7b7de9e470110755638fc016ab269c74d9 [file] [log] [blame]
Jack Jansen3beb3361997-01-07 16:17:44 +00001"""Test icglue module by printing all preferences"""
2
3import icglue
4import Res
5
6ici = icglue.ICStart('Pyth')
7ici.ICFindConfigFile()
8h = Res.Resource("")
9
10ici.ICBegin(1)
11numprefs = ici.ICCountPref()
12print "Number of preferences:", numprefs
13
14for 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
Jack Jansen4b76ba31997-01-09 16:26:23 +000021 print "Data: ", `h.data[:64]`
Jack Jansen3beb3361997-01-07 16:17:44 +000022
23ici.ICEnd()
24del ici
25
26import sys
27sys.exit(1)