A very, very newbie question :)

Sean Blakey sblakey at freei.com
Wed Aug 23 12:37:12 EDT 2000


On Wed, Aug 23, 2000 at 03:56:01PM +0000, The Jazz Singer wrote:
> I've been following through on several online Python tutorials- (I've
> learned most of the MUD languages, HTML, DHTML, Java, JavaScript, and
> some C); and it's really a lot of fun! This is the first real building
> code that I've been doing, and it's going swimmingly.
> I do, however, have a question. You see, I've
> been putting my scripts on notepad, saving them as .py's, and opening
> them, whenever I want to run them as a test. Well, it works fine. But
> when I open it, it speeds through theprogram so fast that I don't even
> get a chance to see it before it
> closes (!)
> Any words of wisdom?
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list

1) Try running scripts from a DOS window.  e.g.:
C:\windows\Desktop> python spam.py

2) If you don't need command-line arguments, you can test python scripts
from within a python shell with the built-in execfile() method.

3) (I don't remember all the details of how to do this, don't have a
Windows box in front of me).  There is a way to create a file
association for Python files so that when you right-click on them, you
can select "test".  "test" will run python with the -i flag, which will
cause the script to run, then dump you into the interactive interpreter.
I'll try to get back to you with more info.

4) Get a better text editor.  Notepad works for writing python code, but
there are better tools out there.
    a) Vim, my personal choice, is a powerful text editor originally
    created on the Amiga and inspired by the earlier Unix text editor,
    vi.  The learning curve is steep, and you probably won't be happy
    with this editor if you're not a Unix junkie.  http://www.vim.org

    b) Idle, included in the Python distribution, is easy to use and has
    a lot of nice features for working with Python programs.
    http://www.python.org

    c) Pythonwin, a win32 add-on for python, comes with a nice Python
    development environment.  
    http://www.python.org/windows/win32all/win32all-132.exe

    d) Emacs, another Unix-derived editor, has also been ported to
    win32.  Again, this editor will probably not have much appeal to you
    if you are not a Unix junkie.  Steep learning curve, more features
    than you will ever use.  The win32 port is at 
    http://www.cs.washington.edu/homes/voelker/ntemacs.html

    e) I have heard good things about UltraEdit, but have never tried
    it.  This program is shareware, but it will at least have more of a
    "windows-ish" feel than Vim or Emacs.  http://www.ultraedit.com

All of these have powerful formatting functions, syntax highlighting,
etc.  UltraEdit is shareware, Emacs is GPL Free Software, I believe
Pythonwin is freeware, Idle is covered under the python license, and Vim
is charityware.  With the exception of idle and Pythonwin, all of these
would be useful for the other languages you work in.
    -Sean
 
-- 
Sean Blakey, sblakey at freei.com
Software Developer, FreeInternet.com
(253)796-6500x1025
"It ain't so much the things we don't know that get us in trouble.  It's the
things we know that ain't so."
-- Artemus Ward aka Charles Farrar Brown




More information about the Python-list mailing list