NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
460 stars 105 forks source link

Error encountered when try to run pydocmd #15

Closed pwwang closed 7 years ago

pwwang commented 7 years ago
 >  pydocmd --help                                                                                                                                                                                                                                                    ^ 769ms 
Traceback (most recent call last):
  File "/data2/junwenwang/shared/tools/miniconda2/bin/pydocmd", line 11, in <module>
    load_entry_point('pydoc-markdown==2.0.0.dev0', 'console_scripts', 'pydocmd')()
  File "/data2/junwenwang/shared/tools/miniconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/data2/junwenwang/shared/tools/miniconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/data2/junwenwang/shared/tools/miniconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/data2/junwenwang/shared/tools/miniconda2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/data2/junwenwang/shared/tools/miniconda2/lib/python2.7/site-packages/pydocmd/__main__.py", line 131
    print(*args, **kwargs)
          ^
SyntaxError: invalid syntax
 >  python --version                                                                                                                                                                                                                                                 
Python 2.7.12

The latest version of pydoc-markdown was installed:

pip install git+https://github.com/NiklasRosenstein/pydoc-markdown.git
pwwang commented 7 years ago

Well, just realize that **kwargs just works for python3. Maybe add an instruction in README?

NiklasRosenstein commented 7 years ago

No, **kwargs works in Python 2.7 as well. Pydoc-markdown is supposed to work with Python 2 as well!

__main__.py is just missing

from __future__ import print_function

You may create a PR if you want, otherwise I'll fix that tomorrow. Cheers