aboutsummaryrefslogtreecommitdiffstats
path: root/wlp_test
diff options
context:
space:
mode:
authorMatej Cepl <mcepl@redhat.com>2008-02-26 17:27:08 +0100
committerMatej Cepl <mcepl@redhat.com>2008-02-26 17:27:08 +0100
commitc50ce75f2e06b6b8abe49e34775d343b74f7e8cd (patch)
tree14c314e39296b0c3abe781e4dac194949e220136 /wlp_test
downloadpygn-c50ce75f2e06b6b8abe49e34775d343b74f7e8cd.tar.gz
The original upstream from Debian orig.tar.gz tarball.0.9.7
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)