Sujet : Re: IDLE editor suggestion.
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.pythonDate : 14. Dec 2023, 14:21:51
Autres entêtes
Organisation : Stefan Ram
Message-ID : <combobox-20231214141742@ram.dialup.fu-berlin.de>
References : 1 2
ram@zedat.fu-berlin.de (Stefan Ram) writes:
(If this problem could be solved, one would still need to add
some more code to add to the search strings to the value list.)
The program still freezes/crashes here, but maybe this has to do
with special circumstance of my personal Python installation.
That being said, here's what makes the OP's suggestion work:
In the IDLE source file "searchbase.py", replace the two occurences
of "Entry" by "Combobox".
In the file "search.py", in the definition of "default_command",
before the line "if not self.engine.getprog():", insert
(adding indentation as required by the context):
combobox = self.ent
if type( combobox[ 'values' ])!= type( () ):
combobox[ 'values' ]=( combobox.get(), )
else:
combobox[ 'values' ]=( combobox.get(), )+ combobox[ 'values' ]
.