Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions omci-pdf-parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

from __future__ import with_statement


from ply import lex
from ply.lex import TOKEN
Expand Down Expand Up @@ -35,7 +35,7 @@ def t_SECTION(t):
def t_error(t):
t.lexer.skip(len(t.value))
t.lexer.text.append(t.value)
print TypeError("Unknown text '%s'" % (t.value,))
print(TypeError("Unknown text '%s'" % (t.value,)))

lexer = lex.lex()

Expand All @@ -56,4 +56,4 @@ class Metadata:
while True:
tok = lexer.token()
if not tok: break
print repr(tok.type), repr(tok.value)
print(repr(tok.type), repr(tok.value))
8 changes: 4 additions & 4 deletions tripper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

from __future__ import with_statement

import re


Expand Down Expand Up @@ -88,7 +88,7 @@ def identifiers(fd):
if __name__ == '__main__':

def usage():
print sys.argv[0], '<-i|-d> <filename>'
print(sys.argv[0], '<-i|-d> <filename>')
sys.exit(1)

import sys
Expand All @@ -97,7 +97,7 @@ def usage():
try:
opts, args = getopt(sys.argv[1:], 'id')
except GetoptError as err:
print str(err)
print(str(err))
usage()

if len(args) != 1: usage()
Expand All @@ -118,5 +118,5 @@ def usage():
for action in actions:
with open(filename) as fd:
for result in action(fd):
print result
print(result)