MCPcopy Index your code
hub / github.com/clips/pattern / get_tokens

Method get_tokens

pattern/web/pdf/psparser.py:646–658  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

644 ]
645
646 def get_tokens(self, s):
647 import StringIO
648 class MyParser(PSBaseParser):
649 def flush(self):
650 self.add_results(*self.popall())
651 parser = MyParser(StringIO.StringIO(s))
652 r = []
653 try:
654 while 1:
655 r.append(parser.nexttoken())
656 except PSEOF:
657 pass
658 return r
659
660 def get_objects(self, s):
661 import StringIO

Callers 1

test_1Method · 0.95

Calls 3

MyParserClass · 0.85
nexttokenMethod · 0.80
appendMethod · 0.45

Tested by 1

test_1Method · 0.76