python - Wrong import of waxeye parser -
so tried use parses generator waxeye, try use tutorial example of program in python using generated parser error:
attributeerror: 'module' object has no attribute 'parser'
here's part of code reference to:
import waxeye import parser p = parser.parser()
the last line cause error. parser generated waxeye put in same directory init.py . it's parser.py .
anyone have idea what's wrong code?
edit 20-05-2013:
beggining of parser.py file:
from waxeye import edge, state, fa, waxeyeparser class parser (waxeyeparser):
it might parser
module you're importing not 1 want.
try inserting a:
print parser.__file__
right after imports, or try naming parser module differently.
also, if working python 2.7 enable absolute_imports
__future__
module.
Comments
Post a Comment