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

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,
M.E.Farmer
Jul 18 '05 #1
1 1476
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.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBdAn5Jd01MZaTXX0RAuR7AKCBlgVLXCoGzc5sDhMp4u vlf8TkVQCfW5kA
N97ntNlqIOZ/IPo0me5O12o=
=/XF5
-----END PGP SIGNATURE-----

Jul 18 '05 #2

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

Similar topics

2
by: Greg Kuperberg | last post by:
I plan to use pydoc for my Python project. After looking through the standard documentation, I am not sure how pydoc interprets its input. In its basic operation it evidently looks at the first...
0
by: Tony C | last post by:
According to the help for pydoc, it can be run as a script, from the command line. "Or, at the shell command line outside of Python: Run "pydoc <name>" to show documentation on something" ...
7
by: Brian van den Broek | last post by:
Hi all, I'm posting partly so my problem and solution might be more easily found by google, and partly out of mere curiosity. I've just spent a frustrating bit of time figuring out why pydoc...
0
by: Veli-Pekka Tätilä | last post by:
Hi, My first post here. I've found some serious accessibility flaws in the Python 2.4 docs and wish they could be rectified over time. I'm very new to Python and initially contacted docs at python...
1
by: timw.google | last post by:
Hi all, I'm discovering pydoc, and it seems to me that this is a great way to have online documentation for my application. Are there any examples of using this in some kind of help menu in an...
3
by: Rob Cowie | last post by:
I have searched this group and the wider net to find an answer to this, but I haven't been successful. Pydoc seems to be capable of writing documentation for all modules within a package by...
5
by: Wijaya Edward | last post by:
I tried to call pydoc from my Linux box. To my realization that it doesn't contain pydoc. I thought this module should be a default module. Can anybody suggest where can I find the module? I...
4
by: Ron Adam | last post by:
This is for a new version of pydoc if I can get the class attributes sorted out. The module level attributes aren't too difficult to categorize. (I might be just too tired to see the obvious.) ...
2
by: A Hutchison | last post by:
Any known reasons why pydoc no longer works? AB
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.