[Edu-sig] Looking for a comprehensive Python and Tkinterdocumentation (like the Java documentation)

David Handy david at handysoftware.com
Thu Mar 3 17:18:05 CET 2005


On Thu, Mar 03, 2005 at 08:08:12AM -0800, Kirby Urner wrote:
> You can run pydoc as a server and hit it with your browser:
> 
> """
> Run "pydoc -p <port>" to start an HTTP server on a given port on the
> local machine to generate documentation web pages.
> """
> 
> However, I'm having trouble getting this to work in Python 2.4 on WinXP, per
> the traceback below:
> 
> D:\Python24\Lib>python pydoc.py -p 7887
> Traceback (most recent call last):
>   File "pydoc.py", line 55, in ?
>     import sys, imp, os, re, types, inspect, __builtin__
>   File "D:\Python24\Lib\re.py", line 5, in ?
>     from sre import *
>   File "D:\Python24\Lib\sre.py", line 97, in ?
>     import sre_compile
>   File "D:\Python24\Lib\sre_compile.py", line 17, in ?
>     assert _sre.MAGIC == MAGIC, "SRE module mismatch"
> AssertionError: SRE module mismatch
> 
> 
> On the other hand, when I change to Python 2.3 and try the same thing, it
> works:
> 
> D:\Python24\Lib>cd..
> 
> D:\Python24>cd ..
> 
> D:\>cd python23
> 
> D:\Python23>cd lib
> 
> D:\Python23\Lib>python pydoc.py -p 7887
> pydoc server ready at http://localhost:7887/
> 
> Anyone able to get the 2.4 pydoc server working in Windows?
> 
> Kirby

It works great for me:

C:\Python24>python -m pydoc -p 3999
pydoc server ready at http://localhost:3999/

(Using the nice new -m flag to run a module from the command line.)

Just a thought - do you still have Python23 in your PATH? It looks like you
might be trying to run the 2.4 version of pydoc using the 2.3 version of
python.

David H.



More information about the Edu-sig mailing list