IDLE file saving problem

N

newb.py

I am learning Python and need to use use IDLE, but I am having a
problem. When I open a new window in IDLE and write my code, all is
well. The coloring works and is very helpful. However, when I save the
file I am working on, all the color disappears. And what is more
frustrating is that when I open the saved file, it opens in TextEdit,
so I have to copy it back into a new IDLE window to work on the code.

If someone could clear up this seemingly simple problem for me, I
would really appreciate it.

Much thanks,
Sean
 
M

MRAB

newb.py said:
I am learning Python and need to use use IDLE, but I am having a
problem. When I open a new window in IDLE and write my code, all is
well. The coloring works and is very helpful. However, when I save the
file I am working on, all the color disappears. And what is more
frustrating is that when I open the saved file, it opens in TextEdit,
so I have to copy it back into a new IDLE window to work on the code.

If someone could clear up this seemingly simple problem for me, I
would really appreciate it.
That happens if you don't provide the extension, eg you save as
"my_script" instead of "my_script.py". (Perhaps IDLE should add the
extension if the user doesn't.)
 
R

r

That happens if you don't provide the extension, eg you save as
"my_script" instead of "my_script.py". (Perhaps IDLE should add the
extension if the user doesn't.)

Yes, and much more needs improvement! I have made many changes already
and i am polishing an "IDLE 3000" for the good people of Pythonia,
stay tuned more to come....
 
D

Dennis Lee Bieber

I am learning Python and need to use use IDLE, but I am having a
problem. When I open a new window in IDLE and write my code, all is
well. The coloring works and is very helpful. However, when I save the
file I am working on, all the color disappears. And what is more
frustrating is that when I open the saved file, it opens in TextEdit,
so I have to copy it back into a new IDLE window to work on the code.
Color coding is NOT part of a Python program -- it is done by the
editor IF the editor is Python aware... SciTE, IDLE, PythonWin, for
example. I suspect VIM and EMACS with proper definition files.

How are you opening the file? On Windows, double-clicking a .py file
normally RUNS the program. You have to right-click and pick edit (or
send-to, if you have added a suitable editor to the send-to list)
 
H

Harald Luessen

Yes, and much more needs improvement! I have made many changes already
and i am polishing an "IDLE 3000" for the good people of Pythonia,
stay tuned more to come....

There is a small little detail that nags me when I use IDLE:

When the cursor is somewhere in the white space at the
beginning of the lines and I use Ctrl-rightArrow [ctrl]-[->]
to go to the first word in the line then IDLE skips
the position with the first non-whitespace letter and places
the cursor after the first word in the line.
This is not consistent because moving backwards works. [ctrl]-[<-]
Similar things happen at the end of a line.

I suggest that these movements should consider 'before the first'
and 'after the last' text in the line as stop positions.

I think other editors do that, at least MS Visual Studio.

(The [pos1] alternating between first column and first text in line
does not help much.)

Harald
 
R

r

When the cursor is somewhere in the white space at the
beginning of the lines and I use Ctrl-rightArrow  [ctrl]-[->]
to go to the first word in the line then IDLE skips
the position with the first non-whitespace letter and places
the cursor after the first word in the line.
This is not consistent because moving backwards works. [ctrl]-[<-]
Similar things happen at the end of a line.

Ah yes, this is something that erks me daily, but i seem to have
forgotten about it until you brought it up (Thank you!). I must put
this on the rIDLE bug list. It's these tiny annoyances that really
ruin IDLE. It's noting major, but you know what a thousand paper-cuts
can do... With a little spit shine IDLE could be quite wonderful.

You guys will see a much improved IDLE very soon, i can promise you
that!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top