2

I have a docstring in the beginning of a Python script that Doxygen parses perfectly. However, if I add #!/usr/bin/env python in the beginning of the file (to make the script executable), the entire docstring is not recognized by Doxygen.

So, how can I make Doxygen ignore this first line?

Example of a working docstring:

"""@package HelloWorld
This is a docstring and it's recognized by doxygen."""

Example of a non-working docstring:

#!/usr/bin/env python
"""@package HelloWorld
This is a docstring and it's not recognized by doxygen because of the first line."""

Thanks!

2
  • possible duplicate of Shebang conflict with doxygen Commented Apr 11, 2013 at 15:34
  • This is a more specific question than that one I think, even though they are related. Commented Apr 11, 2013 at 15:36

1 Answer 1

1

Ok, I found it: I need to use a parser first. I tried doxypy and it works really well. You only have to make the following changes in your doxy_conf file:

FILTER_SOURCE_FILES = YES
INPUT_FILTER = "python path/to/doxypy.py"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.