[ python-Bugs-1289210 ] PyDoc crashes at os.py line 133

SourceForge.net noreply at sourceforge.net
Tue Sep 13 06:10:16 CEST 2005


Bugs item #1289210, was opened at 2005-09-12 19:23
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1289210&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Colin J. Williams (cjwhrh)
Assigned to: Nobody/Anonymous (nobody)
Summary: PyDoc crashes at os.py line 133

Initial Comment:
Details of the attempted runs are given below:

C:\Python24\Lib>python pydoc.py sys
Help on built-in module sys:

NAME
    sys

FILE
    (built-in)

MODULE DOCS
    http://www.python.org/doc/current/lib/module-sys.html
etc. etc.
------------------------------------------------------------------------------------------------------------
The above works OK but the following - advertised in
the PyDoc.py comment - fails.
-----------------------------------------------------------------------------------------------------------
C:\Python24\Lib>pydoc sys
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "C:\Python24\Lib\pydoc.py", line 54, in ?
    import sys, imp, os, re, types, inspect, __builtin__
  File "C:\Python24\Lib\os.py", line 133
    from os.path import (curdir, pardir, sep, pathsep,
defpath, extsep, altsep,
                        ^
SyntaxError: invalid syntax
------------------------------------------------------------------------------------------------------------
Lines 132 to 134 of os.py:
sys.modules['os.path'] = path
from os.path import (curdir, pardir, sep, pathsep,
defpath, extsep, altsep,
    devnull)
------------------------------------------------------------------------------------------------
The above "from X import" usage appears legitimate.

Colin W.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2005-09-12 23:10

Message:
Logged In: YES 
user_id=80475

This is probably invalid.  It looks like you may have
multiple python versions running on your system and that the
pydoc batch file is invoking an earlier version of the
interpreter that doesn't understand multiline imports).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1289210&group_id=5470


More information about the Python-bugs-list mailing list