Getting started with IDLE and Python - no highlighting and no execution
Terry Reedy
tjreedy at udel.edu
Sun Aug 5 21:32:36 EDT 2012
On 8/5/2012 7:46 PM, PeterSo wrote:
> I am just starting to learn Python, and I like to use the editor
> instead of the interactive shell. So I wrote the following little
> program in IDLE
>
> # calculating the mean
>
> data1=[49, 66, 24, 98, 37, 64, 98, 27, 56, 93, 68, 78, 22, 25, 11]
>
> def mean(data):
> return sum(data)/len(data)
>
> mean(data1)
>
>
> There is no syntax highlighting
If properly installed and working, IDLE does syntax highliting if and
only if you name the file with a .py, .pyw, .pyo extension. I have a
'play around' directory with a tem.py file that is always in the recent
files lists. I use it for short shippets that are two long to directly
type into the shell.
--
Terry Jan Reedy
More information about the Python-list
mailing list