Skip to content

python scratchpad (IDLE) #42484

Closed
Closed

Description

@phr
mannequin
BPO 1326830
Nosy @terryjreedy, @kbkaiser

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/kbkaiser'
closed_at = <Date 2016-02-09.19:36:32.373>
created_at = <Date 2005-10-14.14:38:52.000>
labels = ['expert-IDLE', 'type-feature']
title = 'python scratchpad (IDLE)'
updated_at = <Date 2016-02-09.19:36:32.373>
user = 'https://bugs.python.org/phr'

bugs.python.org fields:

activity = <Date 2016-02-09.19:36:32.373>
actor = 'terry.reedy'
assignee = 'kbk'
closed = True
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2005-10-14.14:38:52.000>
creator = 'phr'
dependencies = []
files = []
hgrepos = []
issue_num = 1326830
keywords = []
message_count = 3.0
messages = ['54645', '54646', '259950']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'kbk', 'phr']
pr_nums = []
priority = 'normal'
resolution = 'rejected'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue1326830'
versions = []

Activity

  1. phr commented on Oct 14, 2005

    phrmannequin
    MannequinAuthor

    Lots of times I want to use Idle sort of like a
    Mathematica notebook but for Python. That is, I want
    to enter some code and interactively run it, edit it,
    run it some more, etc. Then, at the end, I typically
    don't want to save it. It's like doing a calculation
    on scratch paper and throwing away the paper after
    finding the answer.

    It's a bit of a pain to have to explicitly save such
    code in a file, going through the whole file dialog,
    after launching to a Python editor window. Most word
    processors will generate an automatic filename like
    "Untitled", or "Untitled-1", "Untitled-2", etc., if
    "Untitled" already exists. That makes the dialog a bit
    more streamlined.

    It would be nice if this type of operation were easier
    in IDLE. I'm not sure of the exact best way. Here are
    some:

    1. Have a default filename ("Untitled-<number>.py" for
      example) that saves to the user's home dir, or
      home/.idle, or maybe some configurable place. User
      could click to confirm (that's probably the easiest) or
      IDLE could display some kind of message (preferable)
      that doesn't need user interaction. IDLE has no status
      bar right now so maybe it would need one in order to
      display such a message conveniently.

    I guess the message could be displayed in the Python
    shell (by sending an appropriate print statement to the
    subprocess) if the user saves by hitting F5 to run the
    program.

    1. (this is perhaps questionable) The default place to
      save the file could be in /tmp. On hitting F5, the
      Python shell would print a message noting that the file
      was only in /tmp and hadn't been saved anyplace permanent.
  2. kbkaiser commented on Oct 16, 2005

    @kbkaiser
    Contributor

    Logged In: YES
    user_id=149084

    You're breaking my heart. Pick a file name (how about
    reserving 'f'?) Select IDLE's autosave feature in the
    Options dialog. When you F5 a new edit window, and
    the Source Must be Saved dialog comes up, hit enter,
    type an 'f', hit enter. Three keystrokes.

    Maybe sometime I'll remove the Source Must be Saved
    dialog if IDLE is set to Autosave, then it would be two
    keystrokes.

    The downside to implementing this is some poor soul
    is going to lose significant work that he thought was
    saved. Guido wan't even very happy with Autosave,
    though I love it.

  3. terryjreedy commented on Feb 9, 2016

    @terryjreedy
    Member

    I have a tem.py 'scratch' file which I use often enough that it is nearly always in the recent files list.

    On the other hand, many beginners do not think to do that, and Guido has said recently to design for beginners. In bpo-19042, I propose that there should be an option to autosave Untitled to .idlerc/untitled.py, without associating the name with the Window.

  4. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions