[Tutor] Central Python Library / Viewing __doc__ strings

Patrick K. O'Brien pobrien@orbtech.com
Sun, 10 Jun 2001 12:28:07 -0500


Ah, yes. That code sounds interesting. I wouldn't mind seeing it myself. I
think I might have a need for something like that, actually. Useless Python
is a great spot for something like this and the Python Cookbook is as well
(http://aspn.activestate.com/ASPN/Python/Cookbook/). I think the Python
Cookbook is exactly what you were looking for. See what you think. In the
mean time, I'd love a copy of the code. Thanks.

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

-----Original Message-----
From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
Allan Crooks
Sent: Sunday, June 10, 2001 12:10 PM
To: tutor@python.org
Subject: RE: [Tutor] Central Python Library / Viewing __doc__ strings

Thanks for the information, but yes, there was a bit of a misunderstanding.
:)

What I meant was is there any kind of place where code that we've written
can become easily public domain?

For example, I've written a piece of code that denests lists, tuples, and
any other sequence type (it's better than I've described it, honest). It's
currently sitting at home, not publicly available. I could put it online,
but I doubt anyone would really be interested in it on it's own (they could
probably write something in the time it takes to actually find it).

But if there was some place where little pieces of code was collected
together and put in the public domain, so that people could find it more
easily, and people could use this utility module to use several little
functions (to save time coding their own).

I think Useless Python is the closest that I've come to it, but I think I'm
looking for a place to submit generic functions. I may just end up putting
my own repository of code online anyway...... Just wondered if there was a
way I could donate my code for the "greater good" really. :)

Thanks anyway,
Allan.

> Not entirely sure what you are looking for, but here are some suggestions
> anyway:
>
> 1. Type dir() to see a list of stuff in the current namespace. Type
> dir([object]) to get a list of attributes/methods/functions for an object.
> For example:
>
> >>> import pydoc
> >>> dir(pydoc)
> ['Doc', 'ErrorDuringImport', 'HTMLDoc', 'HTMLRepr', 'Helper',
> 'ModuleScanner', 'Repr', 'Scanner', 'TextDoc', 'TextRepr', '__author__',
> '__builtins__', '__credits__', '__date__', '__doc__', '__file__',
> '__name__', '__version__', 'allmethods', 'apropos', 'classname', 'cli',
> 'cram', 'describe', 'doc', 'expandtabs', 'find', 'getdoc', 'getpager',
> 'gui', 'help', 'html', 'imp', 'importfile', 'inspect', 'isdata',
> 'ispackage', 'ispath', 'join', 'locate', 'lower', 'os', 'pager',
'pathdirs',
> 'pipepager', 'plain', 'plainpager', 're', 'replace', 'rfind', 'rstrip',
> 'safeimport', 'serve', 'split', 'splitdoc', 'stat', 'strip', 'stripid',
> 'synopsis', 'sys', 'tempfilepager', 'text', 'ttypager', 'types',
'writedoc',
> 'writedocs']
> >>>
>
> 2. Look in the documentation at the module index to see all the modules
and
> the functions defined in each
> (http://www.python.org/doc/current/modindex.html). Or try the index
> (http://www.python.org/doc/current/lib/genindex.html).
>
>
> Let me know if I am way off base because I'm sure I probably misunderstood
> the question.
>
> ---
> Patrick K. O'Brien
> Orbtech
> "I am, therefore I think."
>
> -----Original Message-----
> From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
> Allan Crooks
> Sent: Sunday, June 10, 2001 9:29 AM
> To: tutor@python.org
> Subject: [Tutor] Central Python Library / Viewing __doc__ strings
>
> Hi,
>
> <snip>
>
> Which now brings me to my next question: Is there a central repository of
> functions that exist somewhere? Something like a utility module? It just
> seems a shame for all these methods to just float around without having a
> home of some sort...
>
> Thanks again,
> Allan.
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor