[Idle-dev] [ idlefork-Bugs-803382 ] PyShell's broken in python 2.3
SourceForge.net
noreply at sourceforge.net
Tue Sep 9 18:29:46 EDT 2003
Bugs item #803382, was opened at 2003-09-09 14:24
Message generated for change (Comment added) made by kbk
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109579&aid=803382&group_id=9579
Category: None
Group: None
>Status: Closed
>Resolution: Invalid
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: Kurt B. Kaiser (kbk)
Date: 2003-09-09 19:29
Message:
Logged In: YES
user_id=149084
While some parts of the IDLE application can find uses in
other situations, e.g. rpc.py, PyShell.py is not so intended.
One can't generally expect to dive into the middle of some
code and apply it arbitrarily. If you want to go to the
effort of figuring out how IDLE works, then of course you
are welcome to mine it for whatever gold you can find.
If you are just trying to run IDLE, there should be a script
named idle in the same bin directory where your python2.3
executable lives. You can also try running python and then
from idlelib.PyShell import main
main()
(That happens to be the contents of the "idle" script)
I will probably add a global default for use_subprocess
when I get a chance.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2003-09-09 18: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 15: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 15: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