#143 Getting an error with "with" keyword

v3.0
closed-works-for-me
inspection (59)
5
2006-11-27
2006-11-27
Anonymous
No

It seems to me that EpyDoc (v3 alpha 3) doesn't understand the "with" python keyword. For the lines which have the "with" keyword I always get "Import failed (but source code parsing was successful).
| Error: SyntaxError: invalid syntax (cmdmsg.py, line 71) (line
| 11)".
If it is so please let me know how can I overcome this problem and get generated documentation for the modules which contain this keyword.

Thank you,
entis@inbox.ru

Discussion

  • Edward Loper

    Edward Loper - 2006-11-27
    • labels: 469725 --> inspection
    • status: open --> closed-works-for-me
     
  • Edward Loper

    Edward Loper - 2006-11-27

    Logged In: YES
    user_id=195958
    Originator: NO

    Epydoc uses two methods to examine your python code: introspection & source code parsing.

    Introspection works by importing your module(s) and examining them using Python. This will only work if the version of Python that you're using to run epydoc can import the module. For example, if you run epydoc using Python 2.1, then it won't be able to import & introspect a Python module that requires Python 2.3.

    So the fix is to run epydoc using a higher verison of Python. If you're on unix, you can do this with:

    % python2.5 `which epydoc`

    If you try running epydoc on your code using Python 2.5+, and it still doesn't understand the 'with' keyword, then let me know (re-open the bug) & I'll try to track down what could cause that.

    -Edward

     
  • Nobody/Anonymous

    Logged In: NO

    Thanks a lot everything is great!

    entis@inbox.ru

     

Log in to post a comment.