FAQ
Hello,

What I need to know is if there is a better method to run/edit modules
on my pc.
I'm currently running the IDLE shell under Python 2.5, on Windows XP.

Every time I edit my .txt or .py file, I have to restart the IDLE shell
for the changes to take effect. It's pretty annoying. Assuming IDLE is
already open, here are the steps that I typically take:

1. Open .txt version of module or script using notepad
2. make changes
3. save .txt file as .txt file
4. save .txt file as .py file
5. reset IDLE
6. import module again

As you can see, I'm wasting a lot of time with this method. Maybe
there is some better sofware available, or maybe I'm just not utilizing
the tools at my disposal. Either way I would greatly appreciate any
insight into this problem.

Thanks in advance,
Mark

Search Discussions

  • Stef Mientki at Jan 11, 2007 at 7:47 pm

    As you can see, I'm wasting a lot of time with this method. Maybe
    there is some better sofware available, or maybe I'm just not utilizing
    the tools at my disposal. Either way I would greatly appreciate any
    insight into this problem.
    why not try a more advanced IDE, like PyScripter ?

    cheers,
    Stef Mientki
  • Brian Blais at Jan 11, 2007 at 7:58 pm

    Mark wrote:
    I'm currently running the IDLE shell under Python 2.5, on Windows XP.

    Every time I edit my .txt or .py file, I have to restart the IDLE shell
    for the changes to take effect. It's pretty annoying. Assuming IDLE is
    already open, here are the steps that I typically take:

    1. Open .txt version of module or script using notepad
    2. make changes
    3. save .txt file as .txt file
    4. save .txt file as .py file
    5. reset IDLE
    6. import module again
    why do you involve notepad, and .txt files? Instead, try this:

    1. Run Idle
    2. Choose File/New Window
    3. Edit your .py file, and save it as a .py file
    4. Choose Run/Run Module
    5. Make changes, and save again
    6. Choose Run/Run Module
    7. etc...

    you don't need to close IDLE ever. IDLE refers to the editor, and the shell that
    runs connected to it. If you have just the shell, you can open the editor with
    File/New Window. If you have just the editor, you can choose Run/Python Shell or
    Run/Run Module depending on what you want to do, to get the shell.

    You can also take a .py file in the Windows explorer, right-click, and choose "Open
    with IDLE" to start editing it directly.

    You shouldn't save things as .txt, because then IDLE will not recognize it is python
    you are writing, and the right-click trick probably won't work either. You should
    never use Notepad, because it is just icky, and doesn't know about any programming
    languages. :)

    Hope this helps,

    Brian Blais


    --
    -----------------

    bblais at bryant.edu
    http://web.bryant.edu/~bblais
  • Mark at Jan 12, 2007 at 4:19 pm
    Thanks guys. I'll give it a try.
    Brian Blais wrote:
    Mark wrote:
    I'm currently running the IDLE shell under Python 2.5, on Windows XP.

    Every time I edit my .txt or .py file, I have to restart the IDLE shell
    for the changes to take effect. It's pretty annoying. Assuming IDLE is
    already open, here are the steps that I typically take:

    1. Open .txt version of module or script using notepad
    2. make changes
    3. save .txt file as .txt file
    4. save .txt file as .py file
    5. reset IDLE
    6. import module again
    why do you involve notepad, and .txt files? Instead, try this:

    1. Run Idle
    2. Choose File/New Window
    3. Edit your .py file, and save it as a .py file
    4. Choose Run/Run Module
    5. Make changes, and save again
    6. Choose Run/Run Module
    7. etc...

    you don't need to close IDLE ever. IDLE refers to the editor, and the shell that
    runs connected to it. If you have just the shell, you can open the editor with
    File/New Window. If you have just the editor, you can choose Run/Python Shell or
    Run/Run Module depending on what you want to do, to get the shell.

    You can also take a .py file in the Windows explorer, right-click, and choose "Open
    with IDLE" to start editing it directly.

    You shouldn't save things as .txt, because then IDLE will not recognize it is python
    you are writing, and the right-click trick probably won't work either. You should
    never use Notepad, because it is just icky, and doesn't know about any programming
    languages. :)

    Hope this helps,

    Brian Blais


    --
    -----------------

    bblais at bryant.edu
    http://web.bryant.edu/~bblais

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 11, '07 at 7:41p
activeJan 12, '07 at 4:19p
posts4
users3
websitepython.org

3 users in discussion

Mark: 2 posts Stef Mientki: 1 post Brian Blais: 1 post

People

Translate

site design / logo © 2022 Grokbase