![]() |
Editing in IDLE
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 |
Re: Editing in IDLE
On 9/29/2012 1:14 PM, peterfarrell66@gmail.com 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 |
Re: Editing in IDLE
On Sun, Sep 30, 2012 at 3:14 AM, <peterfarrell66@gmail.com> 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 |
Re: Editing in IDLE
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, <peterfarrell66@gmail.com> 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 |
Re: Editing in IDLE
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, <peterfarrell66@gmail.com> 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 |
| All times are GMT. The time now is 12:35 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.