[Tutor] Just getting started in Python

Phil Harris phil@philh.org
Thu, 15 Jul 1999 16:40:03 +0100


No hoops;

Just go to a command line and type:

assoc .py 'path to your python interpreter'

Simple

HTH
Phil
phil@philh.org

----- Original Message -----
From: Ivan Van Laningham <ivanlan@callware.com>
To: <tutor@python.org>
Sent: Thursday, July 15, 1999 4:15 PM
Subject: Re: [Tutor] Just getting started in Python


> Hi All--
>
> kjhagen@mmm.com wrote:
> >
> > I verified that the interpreter works by doing the following:
> >
> > >>> 12*12
> > 144
> > >>> import string
> > >>> string.split ("hello world")
> > ['hello', 'world']
> > >>>
> >
> > This all works fine in both the python shell and command line windows.
I
> > start working my way though the "Learning Python" book and when asked to
> > run a module file on page 13, I get the following error message at the
NT
> > command prompt line.
> >
> > "The name specified is not recongnized as an internal or external
command,
> > operable program or batch file"
> >
> > I typed my "spam.py" file in as follows, using WordPad.  I saved the
file
> > "spam.py" as a text file.
> >
> > import sys
> > print sys.argv
> >
> > Why am I not able to get this simple progam to run at the "C:\misc\book"
> > prompt in NT4.0?
> >
>
> The short answer is that NT and Windows are stupid.  The slightly longer
> answer is that you must, on Win$, type 'python spam.py' and hit return.
> That will get you by until you find time for one of the longer answers.
>
> The much longer answer is that you have to make NT aware of the
> association between the .py suffix and the python.exe file, and even
> after that you have to jump through some hoops.
>
> Another short answer is to install pythonwin, which will make the file
> associations for you.
>
> <yes-we-have-no-long-long-long-answers-today>-ly y'rs,
> Ivan
> ----------------------------------------------
> Ivan Van Laningham
> Callware Technologies, Inc.
> ivanlan@callware.com
> ivanlan@home.com
> http://www.pauahtun.org
> See also:
> http://www.foretec.com/python/workshops/1998-11/proceedings.html
> Army Signal Corps:  Cu Chi, Class of '70
> ----------------------------------------------
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://www.python.org/mailman/listinfo/tutor