summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/ekhtml/testsuite/pyparser.py
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-06-19 22:15:58 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-06-19 22:15:58 +0000
commit77d2929512ff62e421e9bfee659cc86973fc7df7 (patch)
treeeaeaee2b6f7ef7498cc5aa12b340b11cb125638b /plugins/MirOTR/ekhtml/testsuite/pyparser.py
parent665935b0f99a4b9585f9afe9c9730931a3c94f85 (diff)
files structure reorganization
git-svn-id: http://svn.miranda-ng.org/main/trunk@492 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/ekhtml/testsuite/pyparser.py')
-rw-r--r--plugins/MirOTR/ekhtml/testsuite/pyparser.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/plugins/MirOTR/ekhtml/testsuite/pyparser.py b/plugins/MirOTR/ekhtml/testsuite/pyparser.py
deleted file mode 100644
index a96d999bb7..0000000000
--- a/plugins/MirOTR/ekhtml/testsuite/pyparser.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /usr/bin/env python
-
-import ek_sgmllib, sys, string
-
-class myparser(ek_sgmllib.SGMLParser):
- def __init__(self):
- ek_sgmllib.SGMLParser.__init__(self)
-
- def handle_data(self, data):
- sys.stdout.write(data)
-
- def start_way(self, attrs):
- print 'GOT WAY START!'
-
- def unknown_starttag(self, tag, attrs):
- print 'START: "%s"' % tag
- for i in range(len(attrs) - 1, -1, -1):
- key, val = attrs[i]
- print 'ATTRIBUTE: "%s" = "%s"' % (key, val)
-
- def unknown_endtag(self, tag):
- print 'END: "%s"' % tag
-
- def handle_comment(self, comment):
- print 'COMMENT: "%s"' % comment
-
- def handle_entityref(self, name):
- self.handle_data('&' + name + ';')
-
- def handle_charref(self, name):
- self.handle_data('&#' + name + ';')
-
-def testit(data):
- x = myparser()
- x.feed(data)
- x.close()
-
-if __name__ == '__main__':
- if len(sys.argv) == 1:
- f = sys.stdin
- else:
- f = open(sys.argv[1])
-
- testit(f.read())