[Idle-dev] [ idlefork-Bugs-803382 ] PyShell's broken in python 2.3

SourceForge.net noreply at sourceforge.net
Tue Sep 9 17:22:18 EDT 2003


Bugs item #803382, was opened at 2003-09-09 15:24
Message generated for change (Comment added) made by gvanrossum
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=803382&group_id=9579

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Charles Doutriaux (cdoutri)
Assigned to: Nobody/Anonymous (nobody)
Summary: PyShell's broken in python 2.3

Initial Comment:
    shell = PyShell.PyShell(parent.flist)

  File

"/roseland0/cdat/latest/lib/python2.3/idlelib/PyShell.py",

line 710, in __init__

    if use_subprocess:

NameError: global name 'use_subprocess' is not defined

 

Any idea ?

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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-09-09 19:22

Message:
Logged In: YES 
user_id=6380

Sorry, I can't help you with that. I'm tempted to ask

questions like "what are you trying to do" and "why are you

using IDLE for that" and "do you understand enough of how

IDLE works to be able to use IDLE" but then if you answer

them I still wouldn't be able to help you, because I have no

time. I recommend that you go to comp.lang.python or the

idle-dev at python.org list and present your problem there,

perhaps with answers to the above questions.

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

Comment By: Charles Doutriaux (cdoutri)
Date: 2003-09-09 16:48

Message:
Logged In: YES 
user_id=78442

Thanks a lot, it helped a bit setting it to False,

unfortunately the second time around i got an error message

about RecentUsed files:

Error: 1

AttributeError Exception in Tk callback

  Function: <browser.gui_control.Command instance at

0x416d118c> (type: <type 'instance'>)

  Args: ()

Traceback (innermost last):

  File

"/roseland0/cdat/latest/lib/python2.3/site-packages/Pmw/Pmw_1_2/lib/PmwBase.py",

line 1747, in __call__

    return apply(self.func, args)

  File

"/roseland0/cdat/latest/lib/python2.3/site-packages/browser/gui_control.py",

line 268, in __call__

    return apply(self.func, args, kw)

  File

"/roseland0/cdat/latest/lib/python2.3/site-packages/browser/gui_menu.py",

line 1184, in evt_popup_idle_command_window

    shell = PyShell.PyShell(parent.flist)

  File

"/roseland0/cdat/latest/lib/python2.3/idlelib/PyShell.py",

line 721, in __init__

    OutputWindow.__init__(self, flist, None, None)

  File

"/roseland0/cdat/latest/lib/python2.3/idlelib/OutputWindow.py",

line 16, in __init__

    EditorWindow.__init__(self, *args)

  File

"/roseland0/cdat/latest/lib/python2.3/idlelib/EditorWindow.py",

line 181, in __init__

    self.UpdateRecentFilesList()

  File

"/roseland0/cdat/latest/lib/python2.3/idlelib/EditorWindow.py",

line 597, in UpdateRecentFilesList

    menu = instance.menuRecentFiles

AttributeError: Tk instance has no attribute 'menuRecentFiles'



Any more suggestion welcome,



Thanks again,



C.

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2003-09-09 16:23

Message:
Logged In: YES 
user_id=6380

Right. It looks like this variable is only defined if main()

in the same module is run. As a workaround, try this:



from idlelib import PyShell

PyShell.use_subprocess = True # or False, whatever you prefer.



I guess the proper fix should be to give use_subprocess a

default variable through an assignment outside main().

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=803382&group_id=9579



More information about the IDLE-dev mailing list