473,382 Members | 1,377 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,382 software developers and data experts.

Extracting documentation for user relevant functions only?

Hi,

I've written a python script and added short docstrings. Now I'd like to
create a short overview of commands the user can use. However I don't want
the internal stuff that I also commented. Is there a way to create a fancy
documentation (e.g. pydoc) of certain functions only?

Anton
Nov 28 '05 #1
1 1015
On Nov 28, Anton81 wrote:
I've written a python script and added short docstrings. Now I'd
like to create a short overview of commands the user can use.
However I don't want the internal stuff that I also commented. Is
there a way to create a fancy documentation (e.g. pydoc) of certain
functions only?


You can use the leading underscores convention
<URL:http://docs.python.org/ref/id-classes.html> to "hide" the
intended invisible names. pydoc and epydoc both honor this...

$ cat foo.py
"""Foo test mod.
"""

def spam():
"Like ham."
pass

def _secret():
"Can't see this docstring."
pass

class Mustard(object):
__name1 = 1
_name2 = 2
name3 = 3
$ pydoc foo
Help on module foo:

NAME
foo - Foo test mod.

CLASSES
...
class Mustard(__builtin__.object)
...
| name3 = 3

FUNCTIONS
spam()
Like ham.
--
_ _ ___
|V|icah |- lliott <>< md*@micah.elliott.name
" " """
Nov 28 '05 #2

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

Similar topics

14
by: Jim Hubbard | last post by:
I am looking for documentation and code examples on DDML (Display Driver Management Level). It is mentioned in the 2000, XP and 2003 DDKs - but just barely. It has to do with mirroring a...
5
by: Michael Hill | last post by:
Hi, folks. I am writing a Javascript program that accepts (x, y) data pairs from a text box and then analyzes that data in various ways. This is my first time using text area boxes; in the past,...
2
by: Chris Belcher | last post by:
First some background... The database tracks Action Items assigned to a group of 20 or so managers. Once the assignment is created it is then emailed to each of the managers that are included in...
23
by: ern | last post by:
I have a program that runs scripts. If the user types "script myScript.dat" the program will grab commands from the text file, verify correctness, and begin executing the script UNTIL... I need...
62
by: A.M. Kuchling | last post by:
Here are some thoughts on reorganizing Python's documentation, with one big suggestion. The tutorial seems to be in pretty good shape because Raymond Hettinger has been keeping it up to date. ...
3
by: Tony Burrows | last post by:
I'm building an app which lets users drag and drop classes into a tree, followed by code generation. For this, I need to have (a) a list of all the classes which can be dragged and (b) for each...
7
by: whitsey | last post by:
Help! I am trying to write an SQL statement (without much luck) to extract the total number of searches and orders from a particular customer, grouped into days/months/weeks (depending on the...
3
by: eliss | last post by:
I'm trying to find a way to extract all the function definitions AND function uses from thousands of C++ files. For example, if foo.cpp contains: int func(char b) { return 0; }
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.