[Tutor] Getting Started; Syntax Error; Bad Command or File Name

Frank Peavy fpeavy@pop.net
Wed, 28 Nov 2001 09:34:26 -0800


>On Tue, Nov 27, 2001 at 06:31:24PM -0800, Frank Peavy wrote:
> > Using IDLE
> > Win 98SE installation
> >
> > I keep getting a syntax error when I try to run the "hello world" program
> > listed at the bottom.
> > In looking through the TUTOR archives I noticed a solution related to
> > sys.path that I tried, thinking
> > that the problems may be related(see below). I thought the problem 
> might be
> > related to a PATH problem, but was unsure.
> > ********************************************************
> > >>> python hello1.py

Andrei Kulakov wrote:
>You're making a common mistake here - confusing two separate
>environments - msdos prompt and python shell. Msdos prompt looks like
>this:
>C:>
>Python shell looks like this:
> >>>
>
>To run a python script called hello1.py, you should go to msdos prompt
>(it's in your start menu/programs, at the bottom). Then you go to the
>dir where that file is, and type python hello1.py.
>
> > ********************************************************
> > My py below
> > ********************************************************
> > # File: hello1.py
> >
> > from Tkinter import *
> >
> > root = Tk()
> >
> > w = Label(root, text="Hello, world!")
> > w.pack()
> >
> > root.mainloop()
> >

Andrei,
First of all, I hope I am doing this correctly(by responding in this manner).
This is what I did:
1) Start>Programs>MSDOS prompt
2) in the MSDOS box I cd\ to where the hello1.py is located
3) typed:  python hello1.py

4) response was: BAD COMMAND or FILE NAME

Any suggestions?