Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Editing in IDLE (http://www.velocityreviews.com/forums/t952854-editing-in-idle.html)

peterfarrell66@gmail.com 09-29-2012 05:14 PM

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

Terry Reedy 09-29-2012 05:52 PM

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


Chris Angelico 09-29-2012 06:35 PM

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

peterfarrell66@gmail.com 09-30-2012 04:13 AM

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


peterfarrell66@gmail.com 09-30-2012 04:13 AM

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57