By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,626 Members | 1,146 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,626 IT Pros & Developers. It's quick & easy.

Need better run/edit method. I have to restart the shell after every script change.

P: n/a
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

Jan 11 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
Jan 11 '07 #2

P: n/a
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
--
-----------------

bb****@bryant.edu
http://web.bryant.edu/~bblais
Jan 11 '07 #3

P: n/a
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
--
-----------------

bb****@bryant.edu
http://web.bryant.edu/~bblais
Jan 12 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.