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

M

Mark

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
 
S

Stef Mientki

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
 
B

Brian Blais

Mark said:
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
 
M

Mark

Thanks guys. I'll give it a try.
Brian said:
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


--
 

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,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top