• IDLE editor suggestion.

    From Steve GS@21:1/5 to All on Tue Dec 12 03:22:22 2023
    Maybe this already exists but
    I have never seen it in any
    editor that I have used.

    It would be nice to have a
    pull-down text box that lists
    all of the searches I have
    used during this session. It
    would make editing a lot
    easier if I could select the
    previous searches rather than
    having to enter it every time.

    If this is inappropriate to
    post this here, please tell me
    where to go.
    Life should be so
    complicated.....

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MRAB@21:1/5 to Steve GS via Python-list on Tue Dec 12 16:13:16 2023
    On 2023-12-12 08:22, Steve GS via Python-list wrote:
    Maybe this already exists but
    I have never seen it in any
    editor that I have used.

    It would be nice to have a
    pull-down text box that lists
    all of the searches I have
    used during this session. It
    would make editing a lot
    easier if I could select the
    previous searches rather than
    having to enter it every time.

    If this is inappropriate to
    post this here, please tell me
    where to go.
    Life should be so
    complicated.....

    EditPad has this.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Steve GS via Python-list on Tue Dec 12 15:50:39 2023
    On 2023-12-12 08:22, Steve GS via Python-list wrote:
    Maybe this already exists but
    I have never seen it in any
    editor that I have used.

    It would be nice to have a
    pull-down text box that lists
    all of the searches I have
    used during this session. It
    would make editing a lot
    easier if I could select the
    previous searches rather than
    having to enter it every time.

    If this is inappropriate to
    post this here, please tell me
    where to go.
    Life should be so
    complicated.....

    EditPad has this.

    So do Notepad++, EditPlus (not free but low cost, Windows only, and very
    good), and I'm sure many others that are much simpler than Visual Studio
    Code, for example.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mats Wichmann@21:1/5 to Thomas Passin via Python-list on Tue Dec 12 15:07:35 2023
    On 12/12/23 13:50, Thomas Passin via Python-list wrote:
    On 2023-12-12 08:22, Steve GS via Python-list wrote:
    Maybe this already exists but
    I have never seen it in any
    editor that I have used.

    It would be nice to have a
    pull-down text box that lists
    all of the searches I have
    used during this session. It
    would make editing a lot
    easier if I could select the
    previous searches rather than
    having to enter it every time.

    If this is inappropriate to
    post this here, please tell me
    where to go.
    Life should be so
    complicated.....

    EditPad has this.

    So do Notepad++, EditPlus (not free but low cost, Windows only, and very good), and I'm sure many others that are much simpler than Visual Studio Code, for example.


    Every now and then I pop up and suggest people look at Eric. Odd name
    for an editor? Well, it continues the long pun history in the Python
    world (Eric Idle... get it?). It has search history, among many other
    things, I think once it was considered to be sort of IDLE++, but it's
    grown to a lot more than that. Not saying Eric is better-than-XYZ-IDE,
    but it is a cool project...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve GS@21:1/5 to All on Tue Dec 12 20:28:37 2023
    Does anything from the Visual Studio family of software have a pull down menu that lists previous searches so that I don’t have to enter them every time?

    SGA

    -----Original Message-----
    From: Friedrich Romstedt <friedrichromstedt@gmail.com>
    Sent: Tuesday, December 12, 2023 12:52 PM
    To: Steve GS <Gronicus@sga.ninja>
    Cc: python-list@python.org
    Subject: Re: IDLE editor suggestion.

    Hi!

    Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list <python-list@python.org>:

    Maybe this already exists but
    I have never seen it in any
    editor that I have used.

    You might want to choose Microsoft Code from its Visual Studio family of software, or, if you're ready for a deep dive, you might try using vim. Personally I am using both.

    HTH,
    Friedrich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MRAB@21:1/5 to Steve GS via Python-list on Wed Dec 13 01:52:56 2023
    On 2023-12-13 01:28, Steve GS via Python-list wrote:
    Does anything from the Visual Studio family of software have a pull down menu that lists previous searches so that I don’t have to enter them every time?

    SGA

    Visual Studio search box has a dropdown list that's shown when you press
    the down arrow key.

    -----Original Message-----
    From: Friedrich Romstedt <friedrichromstedt@gmail.com>
    Sent: Tuesday, December 12, 2023 12:52 PM
    To: Steve GS <Gronicus@sga.ninja>
    Cc: python-list@python.org
    Subject: Re: IDLE editor suggestion.

    Hi!

    Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list <python-list@python.org>:

    Maybe this already exists but
    I have never seen it in any
    editor that I have used.

    You might want to choose Microsoft Code from its Visual Studio family of software, or, if you're ready for a deep dive, you might try using vim. Personally I am using both.

    HTH,
    Friedrich


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Steve GS on Wed Dec 13 11:41:17 2023
    "Steve GS" <Gronicus@SGA.Ninja> writes:
    It would be nice to have a
    pull-down text box that lists

    You can *modify* IDLE so as to adapt it to your needs.

    To find the source code of IDLE, search for

    pyshell.py

    on your file system. The IDLE source files should be in the directory
    of that file.

    Here are two examples for possible modifications to IDLE:

    When you want to run a new program you just typed into the
    editor, it asks you for a filename. What a distraction!
    To have a filename auto-generated for you, modify the definition
    of the function "getfilename" in the file "runscript.py" of IDLE.

    When you save your source code, IDLE does not write a backup
    copy into an archive directory, so that you will lose the
    current version if you modify it later. To have a backup
    written for every version saved, modify the definition of
    the function "writefile" in the IDLE source file "iomenu.py".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Steve GS on Wed Dec 13 18:49:11 2023
    "Steve GS" <Gronicus@SGA.Ninja> writes:
    It would be nice to have a
    pull-down text box that lists
    all of the searches

    I tried to get such a box by changing the file "searchbase.py"
    of the IDLE source code adding ", Combobox" to the line

    from tkinter.ttk import Frame, Entry, Label, Button, Checkbutton, Radiobutton

    and replacing

    Entry(self.frame, textvariable=var, exportselection=0)

    by

    Combobox( self.frame, textvariable=var, exportselection=0,
    values=[ 'alpha', 'beta', 'gamma' ])

    . However, when I try it out, it seems to work for some time, but
    then IDLE freezes when trying to open a new search box.

    (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.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Ram@21:1/5 to Stefan Ram on Thu Dec 14 13:21:51 2023
    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' ]

    .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)