473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

epydoc help (putting XML in docstrings)

Hi everyone! I'm documenting some functions that return XML strings.
I'd like to have `sample' xml show up in my epydoc generated
documentation. However, epydoc does not like the indentation of the
XML and gives me this error ->

L28: Error: Improper paragraph indentation.

Here is a simple function that epydoc does not like:

def test():
"""
Return an XML string that looks like this::

<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>

@return: XML string.
"""
pass

[jwyant@L-JWYANT:daplib]$ epydoc test.py
Importing 1 modules.
[.]
Building API documentation for 1 modules.
[.]
================================================== =========================
C:\cygwin\home\jwyant\code\dap-support\python\daplib\test.py
In test.test docstring (line 2):
---------------------------------------------------------------------------
L5: Error: Improper paragraph indentation.

Any ideas?

Thanks!

Mar 10 '06 #1
2 1496
pr***********@gmail.com wrote:
Hi everyone! I'm documenting some functions that return XML strings.
I'd like to have `sample' xml show up in my epydoc generated
documentation. However, epydoc does not like the indentation of the
XML and gives me this error ->

L28: Error: Improper paragraph indentation.

Here is a simple function that epydoc does not like:

def test():
"""
Return an XML string that looks like this::

<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>

@return: XML string.
"""
pass

[jwyant@L-JWYANT:daplib]$ epydoc test.py
Importing 1 modules.
[.]
Building API documentation for 1 modules.
[.]
================================================== =========================
C:\cygwin\home\jwyant\code\dap-support\python\daplib\test.py
In test.test docstring (line 2):
---------------------------------------------------------------------------
L5: Error: Improper paragraph indentation.

Any ideas?

Thanks!


Just indent the xml:

def test():
"""
Return an XML string that looks like this::

<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>

@return: XML string.
"""
pass

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
Mar 10 '06 #2
Doh. That was too easy.

Thanks!
jw

Mar 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sridhar R | last post by:
When writing a python library, we can use docstrings for methods and functions that are part of API. But what about comments for non-API objects or python application code? For applications,...
2
by: Steven Bethard | last post by:
I have two classes that implement the same interface, e.g. something like: class C(object): def foo(self): """Foo things""" ... def bar(self): """Bar things""" ... def baz(self):
0
by: simon | last post by:
Hi, We have a requirement for latex math (eg. $\sum_i x_i$) in our documentation, and i'm looking at patching epydoc to handle this. We have been using the python doc system (also used by...
0
by: Laszlo Zsolt Nagy | last post by:
Hello, I would like to create documentation for my lib using EpyDoc. I do not see how to report bugs on the EpyDoc home page. When I try to create documentation, I get this error: Internal...
2
by: Neil Benn | last post by:
Hello, I can;t find a epyDoc specific mailing list, so I'll try here - if you know of a epyDoc mailing list then please let me know (google is not my friend, I can only find an announce, devel...
2
by: Don Taylor | last post by:
Does anyone know what is needed to install to get epydoc to generate pdf files on Windows. Besides epydoc itself of course. Maybe there is a more appropriate forum to ask newbie questions about...
0
by: Edward Loper | last post by:
Epydoc 3.0 beta is now available for download from SourceForge. Epydoc is a tool for generating API documentation for Python modules, based on their docstrings. - The epydoc homepage....
0
by: tom | last post by:
I would like to use Epydoc (3.0beta1) to document my wxPython (2.6.10) application. The problem is that I can't seem to instruct Epydoc to not also generate partial documentation of wxPython,...
0
by: davels | last post by:
I'm trying to use epydoc (3.0beta1) to generate documentation for some packages I've installed as eggs. When I run the epydoc command "epydoc.py -v -o sqlalchemy sqlalchemy" in completes without...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.