best way to use external editor for python scripts

I’m using blender 2.49 and want to edit my python script in an external editor then re-run it. Right now I am doing alt-r/enter/alt-p. Is there an easier way? maybe a way to create a button that reloads it, or at least make alt-p reload the file automatically?


Chris Bare

Here is what I do. I use Programmers Notepad2 on Windows.

Open up the script in your external editor.
Open Up Blender and bring up a text Window.
Open up the same text file in the Blender text window.
Now pop back over to your external editor and make a change and save the file (but leave it open as well).
Now click back on Blender and you will notice a little RED icon appears in the Text window header (so make sure the header is visible or you may not see it).
Click the RED icon (square with a circle in the middle of it) and you will be presented with a question to make the script internal or reload from disk.
Choose the option to reload from disk and the icon goes away and your Blender text is now synchronized with your external text editor once again.

Just a note, Programmer’s Notepad 2 has the same detection of a modified file as Blender does. So they work well together. If I change something in Blender and pop back over to PN2, it also asks me if I want to reload from disk.

I’m not sure if this is quicker than ALT-R, but I like the visual feedback so I know if a file is out of synch.