[Tutor] a quick Q: how to use for loop to read a series of files with .doc end

lina lina.lastname at gmail.com
Thu Oct 6 12:04:07 CEST 2011


On Thu, Oct 6, 2011 at 5:18 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:

> On 06/10/11 04:54, lina wrote:
>
>     If you use IDLE, the standard IDE that comes with Python, you should
>>    find that hitting tab (or pausing briefly) in a file editor will
>>    bring up a pick list of options.
>>
>> Just tried the  idle-python2.6,
>> Q1: Is it bound with certain python version, such as for python3, do I
>> need get idle-python3 ?
>>
>
> Yes, you need IDLE for V3.
> IDLE is a python program itself so in theory you could run earlier versions
> but the version for V3 uses V3 syntax so you need to match the versions. If
> you are using Linux your package manager should have an IDLE v3 package
> available.
>
>
>
>  Q2: how to use the last command I input, such as I typed something wrong
>> and I wanna correct in the next step.
>>
>
> Use Alt-p(previous) to go back through history
> Use Alt-n(next) to go forward.
> You can also cursor up to the command you want(or use the mouse) and hit
> return to bring it into the prompt.

Thanks, this is helpful. ^_^

>
>
>  seems no much difference with using terminal directly. I might be wrong
>> here.
>>
>
> You get syntax colouring and auto indentation as well as the tool tips.
> There is a slight "bug" in the interactive window in that the alignment is
> off for some statements(*) but if typing code into a file it all works fine.
>
>
> (*)
> >>> if True:
>        x = 42
> else:
>        y = 42
>
>
> Notice the else is out of line with if because of the >>>
>
>
> Other features of IDLE are a graphical debugger that allows you to step
> through your code line by line, A syntax checker, a class browser(for when
> you get into objects). There is also a "code context" option but I have no
> idea what it does!


Thanks for your time.

>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> ______________________________**_________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor>
>



-- 
Best Regards,

lina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111006/09aae747/attachment.html>


More information about the Tutor mailing list