Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > IDLE file saving problem

Reply
Thread Tools

IDLE file saving problem

 
 
newb.py
Guest
Posts: n/a
 
      08-21-2009
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
 
Reply With Quote
 
 
 
 
MRAB
Guest
Posts: n/a
 
      08-21-2009
newb.py wrote:
> 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.)
 
Reply With Quote
 
 
 
 
r
Guest
Posts: n/a
 
      08-21-2009
On Aug 21, 4:10*pm, MRAB <pyt...@mrabarnett.plus.com> wrote:
[snip]
> 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....
 
Reply With Quote
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      08-22-2009
On Fri, 21 Aug 2009 13:55:51 -0700 (PDT), "newb.py" <>
declaimed the following in gmane.comp.python.general:

> 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)

--
Wulfraed Dennis Lee Bieber KD6MOG
HTTP://wlfraed.home.netcom.com/

 
Reply With Quote
 
Harald Luessen
Guest
Posts: n/a
 
      08-23-2009
On Fri, 21 Aug 2009 14:48:56 -0700 (PDT), r <> wrote:

>On Aug 21, 4:10*pm, MRAB <pyt...@mrabarnett.plus.com> wrote:
>
>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

 
Reply With Quote
 
r
Guest
Posts: n/a
 
      09-01-2009
On Aug 23, 4:12*am, Harald Luessen <harald.lues...@gmx.de> wrote:
(snip)
> 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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to specify default directory for saving files in IDLE JohnJohnUSA Python 1 07-04-2006 09:19 PM
EXCEL question saving a file saving the the first column as read only Luis Esteban Valencia ASP .Net 0 01-06-2005 07:02 PM
Saving IDLE output Mark Carter Python 0 09-05-2003 10:43 AM
problem: saving files in IDLE Florian Wellner Python 1 06-27-2003 02:58 PM
problem: saving files in IDLE Thomas Weber Python 0 06-27-2003 11:23 AM



Advertisments
 



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