470,856 Members | 2,397 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,856 developers. It's quick & easy.

Improving Pydoc and submitting changes:)

Hello again!,
I just wanted to start off saying I love this newsgroup!
Everytime I have an idea someone seems to post on it, or about it.
The word for today is **Synchronicity** !
The reason for this post is to talk about pydoc.
I have been writing a module that colorizes source code,
and have hoped to make it work with pydoc.
I saw a thread 2 days ago about pydoc and firefox having issues.
(Actually all Mozilla based browsers ignore 'file//:' type links.
It seems they see some security issues with local file access.
They list it as designed and won't fix it.)
In true C.L.PY fashion someone already had a fix for pydoc!
The amazing part is that piece of code is **exactly** what I needed.
Thank you Jeff Epler for that timesaver.
Basically I have taken Jeff's patch and extended it.
I modified a copy of python 2.2 pydoc.py and python 2.4 pydoc.py .
It now serves up files as plain txt and colorized html instead of local linking.
Solves the Mozilla issue, which to me seems like it needs to be addressed,
for all the non I.E. users out there.
Please kick the tires and give me some feedback.
all you need is PySourceColor ver 1.8 or up and the patched pydoc for your version .
You can get them from here 'http://bellsouthpwp.net/m/e/mefjr75/'
I don't have python 2.3 version of pydoc , I will add it later if needed.

How to get it working:
1)Remember to backup your old pydoc first so you can revert if you want to.
2)Put both files in your Lib folder (PySourceColor and the modified pydoc).
3)Start pydoc (python pydoc.py -g)
4)Click a module and look to the top-right at the links.
5)Click the bottom link. You should get served on-the-fly colorized code!

What I want to know is:
*Sorry if these questions are obvious*
Does anybody even care?
Why does pydoc handle .pyw files diffrently?
What does it need to make it better?
What functions do you need added to PySourceColor?( example: Str2Tmpfile )
What do I do to get these in the standard library, do I write a PEP:
1) PySourcColor .... It was designed to be standalone or modular
2) pydoc changes .... Jeff Epler may have already submitted some of this
I used his patch as a starting point.
Thanks for your time,
Jul 18 '05 #1
1 1376
On Mon, Oct 18, 2004 at 10:50:47AM -0700, M.E.Farmer wrote:
2) pydoc changes .... Jeff Epler may have already submitted some of this
I used his patch as a starting point.

No, I haven't submitted these changes.


Version: GnuPG v1.2.1 (GNU/Linux)


Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Greg Kuperberg | last post: by
reply views Thread by Veli-Pekka Tštilš | last post: by
1 post views Thread by timw.google | last post: by
3 posts views Thread by Rob Cowie | last post: by
5 posts views Thread by Wijaya Edward | last post: by
4 posts views Thread by Ron Adam | last post: by
2 posts views Thread by A Hutchison | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.