Thanks, but I think I'll keep my IDLE training wheels on for awhile yet.

ALAN GAULD wrote:
I have 3 windows open.

An editor
A Python shell
An OS console

The editor is used to edit the code
The python shell for interactive experiments and tests
The console for running the program

Thus I save the file in the editor, alt-tab to
the console and type

python myscript.py

to run it. (In practice, apart from the first time,
I hit up-arrow; return, to run it.)

In fact I could run the script from within vim or
Scite since they both have the ability to run
external commands from within the editor, but I
prefer to have a eparate window where I can refer
to the output of previous runs by scrolling back.
 
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/



From: Wayne Watson <sierra_mtnv...@sbcglobal.net>
To: ALAN GAULD <alan.ga...@btinternet.com>
Sent: Tuesday, 10 February, 2009 1:09:13 AM
Subject: Re: [Tutor] IDLE vs PythonWin

You must be up 24/7!
When I open a py file with pythonwin, it brings up the dialog and in its window, there are two windows. One is called interactive window (IW), and the other (script window--SW) contains the program py code. To execute it, I press the little running icon or F5 and two printed lines appear, as they should, in the IW. If I remove the SW, how do I run it in another "editor", vi, vim, emacs, notebook, ... whatever, and see the output in the IW?

ALAN GAULD wrote:
> Yes, but how do you debug the code interactively when you have
> the editor outside pythonwin? Do you copy it into the pythonwin editor?

Do you mean using the Python debugger?
If I need to do that I will either use the command line debugger (pdb)
inside the shell window or close the vim session and start pythonwin
(or Eclipse which has a really good debugger!) But in 10 years of using
Python I've only resorted to the debugger maybe a dozen times in total.
Usually a few print statements and a session with the >>> prompt is
adequate to find any bugs. The best debugging tools are your eyes!

Remember too that you can always import the module into the shell
window if you need to test specific functions in isolation.

Alan G.


ALAN GAULD wrote:
The point wasn't about vim per se - that just
happens to be my favourite editor - but really
about the way of working with 3 separate windows.

Really it was just to show that you don't necessarily
need to use an all-in-one IDE like Pythonwin or IDLE,


--
Signature.html
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
  
The Richard Feynman Problem-Solving Algorithm:
  (1) write down the problem;
  (2) think very hard;
  (3) write down the answer.

                    Web Page: <www.speckledwithstars.net/>

--
Signature.html
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)
            
The Richard Feynman Problem-Solving Algorithm:
  (1) write down the problem;
  (2) think very hard;
  (3) write down the answer.

                    Web Page: <www.speckledwithstars.net/>
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to