IDLE file saving problem

Discussion in 'Python' started by newb.py, Aug 21, 2009.

  1. newb.py

    newb.py Guest

    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
    newb.py, Aug 21, 2009
    #1
    1. Advertising

  2. newb.py

    MRAB Guest

    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.)
    MRAB, Aug 21, 2009
    #2
    1. Advertising

  3. newb.py

    r Guest

    On Aug 21, 4:10 pm, MRAB <> 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....
    r, Aug 21, 2009
    #3
  4. 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/
    Dennis Lee Bieber, Aug 22, 2009
    #4
  5. On Fri, 21 Aug 2009 14:48:56 -0700 (PDT), r <> wrote:

    >On Aug 21, 4:10 pm, MRAB <> 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
    Harald Luessen, Aug 23, 2009
    #5
  6. newb.py

    r Guest

    On Aug 23, 4:12 am, Harald Luessen <> 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!
    r, Sep 1, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis Esteban Valencia
    Replies:
    0
    Views:
    2,504
    Luis Esteban Valencia
    Jan 6, 2005
  2. Thomas Weber

    problem: saving files in IDLE

    Thomas Weber, Jun 27, 2003, in forum: Python
    Replies:
    0
    Views:
    653
    Thomas Weber
    Jun 27, 2003
  3. Florian Wellner

    problem: saving files in IDLE

    Florian Wellner, Jun 27, 2003, in forum: Python
    Replies:
    1
    Views:
    721
    Helmut Jarausch
    Jun 27, 2003
  4. Mark Carter

    Saving IDLE output

    Mark Carter, Sep 5, 2003, in forum: Python
    Replies:
    0
    Views:
    313
    Mark Carter
    Sep 5, 2003
  5. JohnJohnUSA
    Replies:
    1
    Views:
    322
    BartlebyScrivener
    Jul 4, 2006
Loading...

Share This Page