[C++-sig] C++ comments to docstrings
Hello, My team produces a C++ library exported to python via Boost.Python. We've documented our functions and classes with C#-ish style comments. These are parse-able by Visual Studio and XML files are built from them. When our shared object file is imported in python, a function opens these files and makes the association of the appropriate "docstring" in the XML file with the __doc__ property at runtime. Now that you know how we do it currently, I'd like to know are there better methods in use by, or known to, those in this list? The main hurdle to overcome at this point is that our library is built for both Windows and Linux. Because the documentation method has been to use Visual Studio to build the XML, the Windows build must be done first and the XML left in some place that the Linux build can reach. I'd like to eliminate this dependency for Linux. Andy ___ Cplusplus-sig mailing list [email protected] https://mail.python.org/mailman/listinfo/cplusplus-sig
Re: [C++-sig] C++ comments to docstrings
Hi Andy, We do something very similar to what you describe, except we use doxygen (www.doxygen.org) to output XML files that we use to generate __doc__ strings for our python bindings. We're primarily a linux shop. I don't know how hard it would be to switch to doxygen, maybe it can deal with C#-ish style comments? But I believe it runs on Linux and Windows so perhaps it might help? Alex On 11/17/2015 1:17 PM, Andy Falanga (afalanga) wrote: Hello, My team produces a C++ library exported to python via Boost.Python. We've documented our functions and classes with C#-ish style comments. These are parse-able by Visual Studio and XML files are built from them. When our shared object file is imported in python, a function opens these files and makes the association of the appropriate "docstring" in the XML file with the __doc__ property at runtime. Now that you know how we do it currently, I'd like to know are there better methods in use by, or known to, those in this list? The main hurdle to overcome at this point is that our library is built for both Windows and Linux. Because the documentation method has been to use Visual Studio to build the XML, the Windows build must be done first and the XML left in some place that the Linux build can reach. I'd like to eliminate this dependency for Linux. Andy ___ Cplusplus-sig mailing list [email protected] https://mail.python.org/mailman/listinfo/cplusplus-sig ___ Cplusplus-sig mailing list [email protected] https://mail.python.org/mailman/listinfo/cplusplus-sig
Re: [C++-sig] C++ comments to docstrings
On 11/19/2015 11:06 AM, Alex Mohr wrote: > Hi Andy, > > We do something very similar to what you describe, except we use > doxygen (www.doxygen.org) to output XML files that we use to generate > __doc__ strings for our python bindings. We're primarily a linux shop. > > I don't know how hard it would be to switch to doxygen, maybe it can > deal with C#-ish style comments? But I believe it runs on Linux and > Windows so perhaps it might help? > > Alex Alex, Knowing better how our system works, using doxygen may be a viable alternative. I'll investigate this. I've used it before on our codebase and it worked fairly well. However, the output wasn't the same as the XML produced by VS. At the time, I thought this was a showstopper. Knowing more now, however, it might be possible to alter our parsing routines to evaluate the doxygen XML. This would be grand since doxygen is pretty simple to install on Linux. Thanks again, Andy ___ Cplusplus-sig mailing list [email protected] https://mail.python.org/mailman/listinfo/cplusplus-sig
