[issue21954] str(b'text') returns b'text' in interpreter

2014-07-10 Thread Dev Player

New submission from Dev Player:

str(b'text') returns double quoted item with b prefix within the str() object 
as so: b'text' in python interpreter. It seems the b shouldn't be within 
the outter quotes or apart of the str() instance data.

Is this a bug or new syntax? I personally haven't see any documentation that 
this is the correct behavior. Nor did I find any previously register issue 
tickets.

bchars_list = [b'o', b'n', b'e']
bchars_list
[b'o', b'n', b'e']
[str(x) for x in bchars_list]
[b'o', b'n', b'e']

--
components: Interpreter Core
files: str bug.bmp
messages: 222718
nosy: devplayer
priority: normal
severity: normal
status: open
title: str(b'text') returns b'text' in interpreter
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file35923/str bug.bmp

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21954
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12902] help(modules) executes module code

2014-07-10 Thread Dev Player

Dev Player added the comment:

Mentioned for informational purposes only.

I too experience the running of external packages with a different library when 
doing help('modules') in the interpreter. This is a fresh install of Python 3.4 
on WinXP.

The text I get in the python.exe interpreter is:
Expected Tk Togl installation in 
C:\Python\Python34\lib\site-packages\OpenGl\Tk\togl-win32

Then I get an empty TK popup window.

Although this other issue was ages ago and was with a different machine, Python 
version and set of libraries I'm giving reference to this only because of 
mention of help(). http://bugs.python.org/issue10060

Although there is a command line option to prevent the import of site, while I 
may not want help to be imported, I usually want site to be imported. It 
would be nice to exclude the help import only via a command line.

I wonder if the interpreter could be given a command line option just to parse 
modules/scripts/packages/librarys to only compile the lines containing def and 
class without anything within the namespace except implicitly declared 
docstrings  (it not __doc__ = ...)

In other words if you had source like:
def somefunc(arg=None):
   here is the func __doc__
   x = value
   callme()

the interpreter could basically compile that into:

def somefunc(arg-None):
here is the func __doc__
return None

or perhaps shortcircuit any non def/class/   to be tokenized as the pass 
statement would be.

Those would be feature/enhance kind thing I suppose.

--
nosy: +devplayer

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12902
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13582] IDLE and pythonw.exe stderr problem

2013-07-03 Thread Dev Player

Dev Player added the comment:

I may be mistaken but I thought, as of not too long ago, that pythonw.exe is no 
longer needed by current versions. 2.7.5

--
nosy: +devplayer

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-04-27 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

mhammond added a recent note at:

python.exe help() modules crashes - ID: 3150027 
https://sourceforge.net/tracker/?func=detailaid=3150027group_id=78018atid=551954

Scroll down below the detail and click the Comments link. View the  note from 
mhammond's on 4/24/2011. 

Although this note will likely solve my particular problem, I suspect it does 
not directly solve any corrput package that would cause python.exe help() 
modules to crash or appear to crash (i.e. the modal popup appearing behind 
it's parent window).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-04-27 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

What about this application modal popup window appearing behind the DOS window? 
(See attached) That popup window may only need to have a system style flag to 
push it to the top of the window z-order stack.

What causes that popup to appear? Is it Python source code or compiled C code 
built into python.exe?

There is a MS-Windows win32 function called SetForegroundWindow() that may be 
the issue if it's not Python source code.
Maybe this URL might shed some light on the popup issue?

http://stackoverflow.com/questions/3772233/win32-setforegroundwindow-unreliable

I am grasping for straws here.

Perhaps the python.exe app crashes in the cmd.exe window because of attempts to 
do something with the cmd.exe window while the app modal popup windows is 
behind it? 

As per my previous post is seems mhammond has a solution for his pythonwin 
package causing python.exe-help()-modules to crash. (If that's the case) it 
still doesn't address other packages having the same ability to crash 
python.exe, IDLE and other interactive interpreters thru help()-modules.

--
Added file: 
http://bugs.python.org/file21805/python_exe_help()_modules_app_modal_popup_window_behind_main_window_a.png

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-04-27 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

This is an acedmic note. This is not really the place and perhaps better moved 
to a PEP or a forum. 

In my search to discover more about Python ( and its interactive interpreter 
and its help() function? statement? on my own) I noticed it was kind of a wart 
in Python world. It seems like the print statement or the exit() interactive 
interpreter command in someways.

I was not able to pass in any arguments into help() or pipe in modules into 
it from the DOS command line.

For example while you are in the Python interactive command interpreter; you 
can not call help() like a function; such as:
 help(modules) 

Nor will this work: help();modules in the interactive interpreter  as 
modules is considered a seperate attempted statement (which raises and 
exception because modules is not a valid __builtin__ object.

It seemed like Python's help() command is its own little interactive 
interpreter. Like it's own seperate subprocess. Is it? I don't know, not 
likely. But that's how it behaves to me. Which lead me thinking in another 
direction. 

So I tried these commands knowing they wouldn't work but leads to an idea:

c:\python.exe -c help(modules)   # help() is not a classic function it seems; 
perhaps it should be
c:\python.exe -c help();modules  # definitly wrong
c:\python.exe -h modules # looks like a viable idea; perhaps a nice PEP?

Which led me to try to find a way to run the help() command in it's own 
seperate process or subprocess. So if it failed it wouldn't effect python.exe. 
Well the help() command appears to be baked right into the python.exe program. 
So perahps a seperate second python.exe subprocess to test the idea that help() 
should eventaully be an actual subprocess with the ability to check on failure 
of help()-modules; or anything like it; a design change of python.exe

I started with:
c:\python.exe -c import os; os.system('python.exe -c help()')

Some problems with this attempt is: 1. os.system() is being obseleted for the 
subprocess.Popen() module. 2. There are MS-DOS command prompt quotation issues 
with trying to get modules piped into the new process somewhere at the end of 
that. 3. Lots of other stuff.

Anyway I moved forward with the idea to test this code within the python.exe 
interactive interpreter to test:

# code
from subprocess import Popen, PIPE
cmds = ['python.exe', '-c', 'help()']
p1 = Popen(cmds, stdout=PIPE, stdin=PIPE)
print p1.communicate(modules)[0]
# end code

On my system the app model popup still pop's up behind the ORIGINAL cmd.exe 
window. Therefore still the same problem and potential of crashing. 

So digging further I came to 
http://docs.python.org/library/subprocess.html

Quoted from website The startupinfo and creationflags, if given, will be 
passed to the underlying CreateProcess() function. They can specify things such 
as appearance of the main window and priority for the new process. (Windows 
only) and then changing the code to:

# code
from subprocess import Popen, PIPE, CREATE_NEW_CONSOLE
cmds = ['python.exe', '-c', 'help()']
p1 = Popen(cmds, stdout=PIPE, stdin=PIPE, creationflags=CREATE_NEW_CONSOLE)
print p1.communicate(modules)[0]
# end code

which does seem to force the modal popup to the top of the DOS command window. 
See URL: 
http://msdn.microsoft.com/en-us/library/ms684863(v=VS.85).aspx


Why this tangent on a basically esoteric issue? 
One reason is security. I see this as a way a hacker can crash Python apps 
easily. A horrible thing on a webserver with Python served webpages.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-04-27 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

Just delete the previous message... please.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8232] webbrowser.open incomplete on Windows

2011-01-14 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

Don't forget to check if the MS Internet Explorer's advanced option to open new 
URLS in a seperate windows effects this.  Users can have this advanced setting 
set differently on different computers(or even accounts). Also different 
browser versions call that option by different names. And I think there may 
even be a way to turn off tabs altogether, so check that too.

--
nosy: +devplayer

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8232
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-01-03 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

It was suggested that a corrupt package would be where I'm experiencing the
lockup or crash of python.exe when issuing help() and then modules. And
that if I or someone could verify that a corrupt package has this effect by
creating a corrupt package. I have not figured out how to make a package let
a lone a corrupt one. I think the following traceback points to my pywin32
being corrupt. Although I've downloaded that package from sourceforge more
then twice and reinstalled that package.

I included the information in the previous posts in case it helps in the
following mannger;
I expect others here in this forum are likely to have pywin32 version 214
installed. They could compare what I get from the traceback (returned when
using help() modules) the dir(win32ui.GetMainFrame) with what they have.
So that if they get something different with their dir(win32ui.GetmainFrame)
then we at least are more sure of where this issue is occuring.

Why does python.exe help() fail when an object, in this case win32ui, in the
traceback does not have a certain attribute, GetMainframe?

The dir() outputs in my previous posts show an object pywin32 package
doesn't have all the expected member attributes. It calls
win32ui.GetMainFrame.GetWindowText() method which doesn't exist.

Why would help() fail on that?
I'm no expert but I figured the information could help point someone in the
right direction.

BTW I've created a ticket in the pywin32 at sourceforge.net. - Because I
only suspect it's a corrupt package, I'm not sure and thought others there
would be able to tell me if it's the distro file or my installation.

Traceback reprinted:

Traceback (most recent call last):
  File input, line 1, in module
  File Q:\Python27\lib\site.py, line 453, in __call__
return pydoc.help(*args, **kwds)
  File Q:\Python27\lib\pydoc.py, line 1723, in __call__
self.interact()
  File Q:\Python27\lib\pydoc.py, line 1735, in interact
request = self.getline('help ')
  File Q:\Python27\lib\pydoc.py, line 1746, in getline
return raw_input(prompt)
  File Q:\Python27\Lib\site-packages\pythonwin\pywin\framework\app.py,
line 367, in Win32RawInput
ret=dialog.GetSimpleInput(prompt)
  File Q:\Python27\Lib\site-packages\pythonwin\pywin\mfc\dialog.py, line
223, in GetSimpleInput
if title is None: title=win32ui.GetMainFrame().GetWindowText()
error: The frame does not exist

--
Added file: http://bugs.python.org/file20245/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___divIt was suggested that a corrupt package would be where I#39;m 
experiencing the lockup or crash of python.exe when issuing help() and then 
quot;modulesquot;. And that if I or someone could verify that a corrupt 
package has this effect by creating a corrupt package. I have not figured out 
how to make a package let a lone a corrupt one. I think the following traceback 
points to my pywin32 being corrupt. Although I#39;ve downloaded that package 
from sourceforge more then twice and reinstalled that package. /div

div /div
divI included the information in the previous posts in case it helps in the 
following mannger;/div
divI expect others here in this forum are likely to have pywin32 version 214 
installed. They could compare what I get from the traceback (returned when 
using help() modules) the quot;dir(win32ui.GetMainFrame)quot; with what they 
have. So that if they get something different with their 
dir(win32ui.GetmainFrame) then we at least are more sure of where this issue is 
occuring./div

div /div
divWhy does python.exe help() fail when an object, in this case win32ui, in 
the traceback does not have a certain attribute, GetMainframe?/div
div /div
divThe dir() outputs in my previous posts show an object pywin32 package 
doesn#39;t have all the expected member attributes. It calls 
win32ui.GetMainFrame.GetWindowText() method which doesn#39;t exist./div
div /div
divWhy would help() fail on that? /div
divI#39;m no expert but I figured the information could help point someone 
in the right direction./div
div /div
divBTW I#39;ve created a ticket in the pywin32 at a 
href=http://sourceforge.net;sourceforge.net/a. - Because I only suspect 
it#39;s a corrupt package, I#39;m not sure and thought others there would be 
able to tell me if it#39;s the distro file or my installation./div

div /div
divTraceback reprinted:/div
div /div
divTraceback (most recent call last):br  File quot;lt;inputgt;quot;, 
line 1, in lt;modulegt;br  File quot;Q:\Python27\lib\site.pyquot;, line 
453, in __call__br    return pydoc.help(*args, **kwds)br  File 
quot;Q:\Python27\lib\pydoc.pyquot;, line 1723, in __call__br
    self.interact()br  File quot;Q:\Python27\lib\pydoc.pyquot;, line 
1735, in interactbr    request = self.getline(#39;helpgt; #39;)br  
File quot;Q:\Python27\lib\pydoc.pyquot;, line

[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-01-02 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

import win32ui
from win32ui import GetMainFrame

dir(win32ui.GetMainFrame)
['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__eq__', 
'__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', 
'__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', 
'__reduce__', '__reduce_ex__', '__repr__', '__self__', '__setattr__', 
'__sizeof__', '__str__', '__subclasshook__']

dir(GetMainFrame)
['__call__', '__class__', '__cmp__', '__delattr__', '__doc__', '__eq__', 
'__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', 
'__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', 
'__reduce__', '__reduce_ex__', '__repr__', '__self__', '__setattr__', 
'__sizeof__', '__str__', '__subclasshook__']


Is this normal? I'd expect at least GetWindowText() in the dir().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-01-02 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

from GetMainFrame import GetWindowText
Traceback (most recent call last):
  File input, line 1, in module
ImportError: No module named GetMainFrame


Also, I installed from the MS-Windows installer file:
pywin32-214.win32-py2.7.exe

not from pywin32-214.zip which I think is the source distrobution.

I've tried reinstallation but I get the same results.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2011-01-02 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

Oh I am running on an Intel Pentium 4 3.2GHz/3.2Ghz.
Windows XP Pro SP3 32 bit
So I presume I should not have used the AMD 64 versions of course.

http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2010-10-29 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

Another thing I've noticed that makes the issue more complicated (or perhaps 
less complicated depending on your view).

When running the python.exe at the DOS prompt (in a window on WinXP), then 
issuing the help() then modules commands, python.exe seems to hang at times, 
when it doesn't crash. However this apparent hang sometimes seems to be related 
to the attached help child window/dialog popup instantating with focus 
behind the DOS window. This popup with the focus (and behind it's parent window 
and being modal) prevents the mouse from moving the DOS window (holding the 
running python.exe) from being moved.  The -sometimes- solution to this 
apparent hang is ALT-TAB back to the DOS window which will put the 
help-modal-dialog on top of said DOS window (which is running Python).

--
Added file: http://bugs.python.org/file19421/python_help_modules_help_dialog.png

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2010-10-11 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

I believe that a 3rd party package is corrupt. Whether it is or not I don't 
know. However whether or not a package is corrupt or not is not what I am 
reporting as a bug.

I am reporting that python.exe crashes when I do help() modules.


In GUI wrappers around python.exe, such as idle and pycrust, I get more 
information to the problem then when just in python.exe command line 
interpreter. As per the first post the errors I get in pycrust and idle are:
...
  File Q:\Python27\Lib\site-packages\pythonwin\pywin\framework\app.py, line 
367, in Win32RawInput
ret=dialog.GetSimpleInput(prompt)
  File Q:\Python27\Lib\site-packages\pythonwin\pywin\mfc\dialog.py, line 223, 
in GetSimpleInput
if title is None: title=win32ui.GetMainFrame().GetWindowText()
error: The frame does not exist

To be honest the meaning of these errors is beyond my expertise, or lack of 
thereof. I attempted to give as much info on what I experienced with running 
python.exe help() modules as I saw.

If there is a direction you can point me to that I can gather more information 
then what I've already given, I'll give that a go as well.

Other pointers to reported problems of a similar nature:
http://mail.python.org/pipermail/pythonmac-sig/2008-November/020712.html
https://bugs.launchpad.net/ubuntu/+source/python2.5/+bug/137210

Again this is not a report of a corrupt package. 

It is a report of python.exe crashing using commands considered part of 
Python.exe; that being help() then modules.

An external library may be the cause or may not. But if it is an external 
library that is corrupt I would hope python.exe would not fail because of it, 
but instead just either ignore the package or report an error. Another reason 
why I think python.exe shouldn't crash because of external library integrity is 
what if there is a file or some such thing in one's Python path that looks like 
and smells like a Python module/package but isn't? Should python.exe fail 
because of such a file?

I do not know the structure of a Python package or whether pythonwin on my PC 
is corrupt. However I imaging that if a fake package can be made so that IT is 
corrupt (perhaps make a missing file) that testing would be relatively easy.

Sorry I don't have more information for you. But hearing from others who have 
tried their python.exe help() modules works or fails would be a start.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2010-10-11 Thread Dev Player

Dev Player devpla...@gmail.com added the comment:

 On Mon, Oct 11, 2010 at 1:43 PM, R. David Murray 
 rep...@bugs.python.orgwrote:
 R. David Murray rdmur...@bitdance.com added the comment:
 Can you reproduce the problem using a pure Python 'corrupt' module?
 --


When in python.exe, and you type help() then modules, aren't you really
asking for packages?
I don't know how to make a package let alone a corrupt one.

If help() modules is in fact looking for just a Python module file with
extension _.py in lib\site-packages I don't know what Python help() modules
looks for in that source code _.py file to be considered a module worth
reporting back to the user. Certain module attributes?

I do not know enough atm about how PythonWin is packaged. I'll look into it
but I'm a newbie here and hopes for well informed facts on PythonWin may be
... well leave it at that.

Perhaps an idea here too: If python.exe help() modules crashes when it
passes control to a module or package that is not pure Python (source code
or byte code) but some kind of C SWIG thing, then perhaps to make python.exe
more robust it should simulate what idle does, as idle does not crash and it
reports error when finished with calling python.exe help() modules.

In other words, perhaps the Python interpreter can call an external routine
(another program) that behaves like help() modules, perhaps using something
like os.system() or subprocess.Popen(). Call it help.py or help.exe or
something. If help.exe returns, all is good. If help crashes just like
Python did at least Python can handle the crashing of help.exe gracefully.
This idea is purely with the interest to make python.exe more robust.

--
Added file: http://bugs.python.org/file19192/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10060
___br
div class=gmail_quote
blockquote style=BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; 
PADDING-LEFT: 1ex class=gmail_quote
div class=imOn Mon, Oct 11, 2010 at 1:43 PM, R. David Murray span 
dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:brR. David Murray lt;a 
href=mailto:rdmur...@bitdance.com;rdmur...@bitdance.com/agt; added the 
comment:br
Can you reproduce the problem using a pure Python #39;corrupt#39; 
module?br--br/div/blockquote
div /div
divWhen in python.exe, and you type help() then modules, aren#39;t you 
really asking for packages? /div
divI don#39;t know how to make a package let alone a corrupt one./div
div /div
divIf help() modules is in fact looking for just a Python module file with 
extension _.py in lib\site-packages I don#39;t know what Python help() modules 
looks for in that source code _.py file to be considered a module worth 
reporting back to the user. Certain module attributes?/div

div /div
divI do not know enough atm about how PythonWin is packaged. I#39;ll look 
into it but I#39;m a newbie here and hopes for well informed facts on 
PythonWin may be ... well leave it at that./div
div /div
divPerhaps an idea here too: If python.exe help() modules crashes when it 
passes control to a module or package that is not pure Python (source code or 
byte code) but some kind of C SWIG thing, then perhaps to make python.exe more 
robust it should simulate what idle does, as idle does not crash and it reports 
error when finished with calling python.exe help() modules./div

div /div
divIn other words, perhaps the Python interpreter can call an external 
routine (another program) that behaves like help() modules, perhaps using 
something like os.system() or subprocess.Popen(). Call it help.py or help.exe 
or something. If help.exe returns, all is good. If help crashes just like 
Python did at least Python can handle the crashing of help.exe gracefully. This 
idea is purely with the interest to make python.exe more robust./div

div /div/div
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10060] python.exe crashes or hangs on help() modules when bad modules found

2010-10-09 Thread Dev Player

New submission from Dev Player devpla...@gmail.com:

2010-10-10 python.exe crashes or hangs on help() modules 
when bad modules found

###
SUMMARY

The python.exe command line interpreter crashes or hangs when
typing first help() then modules and a corrupt module is found.

Python 2.7 WinXP SP3 see version details in OUTPUT sections
###
EXPLANATION

# ---
I have a workaround as a user. However it appears to be a bug 
from previous Python versions, 2.5 and 2.6 from what I've seen 
through Google and other help() module tickets. 

The workaround is simply remove the corrupt package.

# ---
I've noticed when there is a corrupt package on my PC in the 
Q:\Python27\Lib\site-packages folder that seems to cause 
a problem when issuing help() then modules in Python. 

Python command line interperter doesn't gracefully exit the 
assertion, it crashes or hangs.

When entering python.exe, idle.exe or pycrust.bat (runs pycrust.py),
typing help(), then typing modules, the help routine runs most of 
the search-for-packages routine fine (see OUTPUT SECTION below) 
and seems to find all the installed modules but when it's 
finished it does the following:

- python.exe either crashes, or puts up a help prompt window and 
  then drops to the DOS command prompt as seen below.

  MS window error:
  python.exe has encountered a problem and needs to clos.
  We are sorry for the inconvienience
  AppName: python.exe
  AppVer: 0.0.0.0
  ModName: unknown
  ModVer: 0.0.0.0
  Offset: 00a20fdf

- IDLE.py doesn't crash but after the help() modules it shows
  the errors in .py files

- PyCrust.py runs the help()  modules it then shows errors 
  in .py files, it then crashes


In my case you will note the problem occurs on my install of the 
pythonwin package. On my system pythonwin will work until I exit. 

I installed a new version pythonwin just after installing Python 2.7.
The pythonwin version always crashed on exit since it was installed. 
The old pythonwin was deinstalled before installation of the new.

However, having a corrupt installed package shouldn't crash python.

pythonwin version: pywin32 build214

# ---
Something of note:
All my development, including Python 2.7 installation and 
packages and projects are on my Q: drive, which is 
a mapped drive pointing to a sub-folder on a 
networked-shared folder in WinXP.

Actual Folder:
D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT
Net-shared Folder:
   \\Mycomp\D$\Subst_drives
Mapped Folder:
Q: = \\Mycomp\D$\Subst_drives\DRIVE_Q_DEVELOPMENT

Although not directly used by the user (me) I also have 
subst'd drives attached to sub-folders of:
D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT
such as:
U: = D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT\Projects\Python27\current

I only mention this in case the help() modules routine, 
while seeking modules, can traverse folder structure attached 
to soft and hard link combos, symbolic links and junction points 
or whether they have an effect on traversing the folder structure 
while searching for packages.

However, I went directly to the folder holding python.exe
at D:\SUBST_DRIVES\DRIVE_Q_DEVELOPMENT\Python27\python.exe
When doing help() modules .\python.exe crashed at the end of 
executing modules as well.

# ---
So far, I personally have not come across any other issues 
with my installation and python programs and demo code run 
with Python 2.7 except the previously noted exiting-of-pythonwin

# ---
Further details and output from running help() modules below for each
of python.exe, pycrust and idle.


###
OUTPUT 
(3 Sections for 3 programs packaged with Python distribution)
###
###
###
SECTION 1 OF 3 
python.exe
#--

Q:\Projects\Python27python.exe
Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on 
win32
Type help, copyright, credits or license for more information.
 help()

Welcome to Python 2.7!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/tutorial/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type quit.

To get a list of available modules, keywords, or topics, type modules,
keywords, or topics.  Each module also comes with a one-line