Editing in IDLE

Discussion in 'Python' started by peterfarrell66@gmail.com, Sep 29, 2012.

  1. Guest

    Hello to the group!

    I'm a new Python user and so far I'm enjoying it. One of the many newbie problems I'm having is I can't edit my code in IDLE once it's run or there's an error message. I can only copy the code so far, paste at the bottom and continue coding. Is there something simple I'm missing, or should I be using a different editor?

    Thanks in advance!

    Peter Farrell
     
    , Sep 29, 2012
    #1
    1. Advertising

  2. Terry Reedy Guest

    On 9/29/2012 1:14 PM, wrote:
    > Hello to the group!
    >
    > I'm a new Python user and so far I'm enjoying it. One of the many
    > newbie problems I'm having is I can't edit my code in IDLE once it's
    > run or there's an error message. I can only copy the code so far,
    > paste at the bottom and continue coding. Is there something simple
    > I'm missing, or should I be using a different editor?


    You are missing how to use IDLE. It has two kinds of windows:
    interactive Shell and Edit windows. The shell more or less emulates the
    interactive interpreter, running one statement at a time. You can put
    the cursor on a previous statement and hit return to make it the current
    statement, where you can edit it. You edit normal multi-statement code
    in edit windows, hit F5 to run, edit, run, edit, run.

    --
    Terry Jan Reedy
     
    Terry Reedy, Sep 29, 2012
    #2
    1. Advertising

  3. On Sun, Sep 30, 2012 at 3:14 AM, <> wrote:
    > Hello to the group!
    >
    > I'm a new Python user and so far I'm enjoying it. One of the many newbie problems I'm having is I can't edit my code in IDLE once it's run or there's an error message. I can only copy the code so far, paste at the bottom and continue coding. Is there something simple I'm missing, or should I be using a different editor?


    I only ever use IDLE in its interactive mode (at which, imho, it's
    rather better than the default Python interactive mode, as it
    auto-indents). In that mode, you can retrieve previous commands with
    Alt-P - at least, that's the keystroke on Windows, not sure if it's
    different on other platforms.

    For editing code that's to be saved in a .py file, I use SciTE, but a
    lot of people do use IDLE for that too. It's a matter of personal
    preference.

    ChrisA
     
    Chris Angelico, Sep 29, 2012
    #3
  4. Guest

    Thanks for the responses, Terry and Chris, I'll try the shell, alt-P and I'll check out SciTE!

    Peter

    On Saturday, September 29, 2012 11:35:06 AM UTC-7, Chris Angelico wrote:
    > On Sun, Sep 30, 2012 at 3:14 AM, <> wrote:
    >
    > > Hello to the group!

    >
    > >

    >
    > > I'm a new Python user and so far I'm enjoying it. One of the many newbie problems I'm having is I can't edit my code in IDLE once it's run or there's an error message. I can only copy the code so far, paste at the bottom and continue coding. Is there something simple I'm missing, or should I be using a different editor?

    >
    >
    >
    > I only ever use IDLE in its interactive mode (at which, imho, it's
    >
    > rather better than the default Python interactive mode, as it
    >
    > auto-indents). In that mode, you can retrieve previous commands with
    >
    > Alt-P - at least, that's the keystroke on Windows, not sure if it's
    >
    > different on other platforms.
    >
    >
    >
    > For editing code that's to be saved in a .py file, I use SciTE, but a
    >
    > lot of people do use IDLE for that too. It's a matter of personal
    >
    > preference.
    >
    >
    >
    > ChrisA
     
    , Sep 30, 2012
    #4
  5. Guest

    Thanks for the responses, Terry and Chris, I'll try the shell, alt-P and I'll check out SciTE!

    Peter

    On Saturday, September 29, 2012 11:35:06 AM UTC-7, Chris Angelico wrote:
    > On Sun, Sep 30, 2012 at 3:14 AM, <> wrote:
    >
    > > Hello to the group!

    >
    > >

    >
    > > I'm a new Python user and so far I'm enjoying it. One of the many newbie problems I'm having is I can't edit my code in IDLE once it's run or there's an error message. I can only copy the code so far, paste at the bottom and continue coding. Is there something simple I'm missing, or should I be using a different editor?

    >
    >
    >
    > I only ever use IDLE in its interactive mode (at which, imho, it's
    >
    > rather better than the default Python interactive mode, as it
    >
    > auto-indents). In that mode, you can retrieve previous commands with
    >
    > Alt-P - at least, that's the keystroke on Windows, not sure if it's
    >
    > different on other platforms.
    >
    >
    >
    > For editing code that's to be saved in a .py file, I use SciTE, but a
    >
    > lot of people do use IDLE for that too. It's a matter of personal
    >
    > preference.
    >
    >
    >
    > ChrisA
     
    , Sep 30, 2012
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QmFza2FyYW4uSy5S?=

    Disable editing a particaular column in a datagrid

    =?Utf-8?B?QmFza2FyYW4uSy5S?=, Sep 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    5,241
    Jonathan Allen
    Sep 25, 2004
  2. Sathyaish

    Editing the setup project script

    Sathyaish, May 25, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    519
    Sathyaish
    May 25, 2005
  3. kelly
    Replies:
    2
    Views:
    25,801
    Jim Gibson
    Jan 3, 2006
  4. Kian Goh
    Replies:
    1
    Views:
    418
    Showjumper
    Jun 30, 2003
  5. Replies:
    0
    Views:
    621
Loading...

Share This Page