473,545 Members | 2,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1503
pr***********@g mail.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
3377
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, docstrings are not really much useful. Instead language comments are prefered for them. Language comments (starting with #) are usually considered...
2
1829
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
1378
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 numarray), with a script to rip docstrings into the required latex. However, this method is getting out of hand, and epydoc looks like a great...
0
1285
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 error: Expected a pointer Unhandled exception in thread started by <function document at 0x00A44C30> At the end of the traceback:
2
1580
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 and commit list from 'epydoc mailing list'). I'm working on marking up a class in epyDoc and have a few things that I strongly suspect I can do...
2
2294
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 epydoc? Thanks, Don.
0
941
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. <http://epydoc.sourceforge.net/> - Download epydoc 3.0 beta. <http://sourceforge.net/project/platformdownload.php? group_id=32455>
0
1424
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, which makes too much verbiage for a user to wade through in order see the documentation of my program. For example, if my module consists of only the...
0
953
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 error, but the resulting documentation is just a stub. Everything All Functions sqlalchemy.global_connect All Variables sqlalchemy.EXT_PASS
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.