aboutsummaryrefslogtreecommitdiffstats
path: root/wlp_test
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2002-06-04 17:02:00 +0200
committerMatěj Cepl <mcepl@cepl.eu>2015-01-03 10:31:58 +0100
commit59eda1d0150e4b517a071c1e04ded96ff8f0f314 (patch)
tree47db347f3ff74e3a7fb23cef1cba2ed4a452aeaa /wlp_test
parenta9d49c6a0fd9dbad859659d7f49901bc9101d790 (diff)
downloadpyg-59eda1d0150e4b517a071c1e04ded96ff8f0f314.tar.gz
pyg 0.9.6 from archive.debian.org0.9.6
Diffstat (limited to 'wlp_test')
-rwxr-xr-xwlp_test31
1 files changed, 31 insertions, 0 deletions
diff --git a/wlp_test b/wlp_test
new file mode 100755
index 0000000..5ccea1c
--- /dev/null
+++ b/wlp_test
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+
+# Script to test if wlp.so works. It should parse confile without errors.
+
+import sys
+import wlp
+
+if(len(sys.argv) == 1):
+ wlp.setfilebyname('./pyg.wl')
+else:
+ wlp.setfilebyname(sys.argv[1])
+
+# dict is a { ownername : {variable: value}} dictionary of dictionaries
+dict = wlp.mkdict()
+
+try:
+ print 'owner: option = value'
+
+ for owner in dict.keys():
+ options = dict[owner]
+ for option in options.keys():
+ print '%s: %s = %s' % (owner,option,options[option])
+except (Exception), message:
+ print message
+
+
+for k in dict.keys():
+ if(dict[k]['From:'] == 'Cosimo Alfarano'):
+ print '%s has %s' % (k,dict[k]['From:'])
+
+sys.exit(0)