What am I doing wrong?

Banar-Tul tonyclick at mindspring.com
Thu May 30 21:19:25 EDT 2002


    I am just starting with Python an I am running into a head stratching 
delima. I am using SuSe 7.3 Pro with Python 2.1.1.  I start Python by 
typing python at the following prompt.

        user at linux:~> python

    From there I can work interactively such as;
   
       >>> print "Hello World"
           Hello World

But I am trying to follow the examples in Learning Python which instructs

           % cat threenames.py
            [example code]

but the only prompt I get is the >>>. If I type % cat threenames.py after 
that prompt I get this,
       File "<stdin>", line 1
         % cat threenames.py
         ^
     SyntaxError: invalid sytax
     >>>

So, what am I missing here? I am pouring other the various Python books I 
have and I can't see what I am doing wrong. I figure it is something 
straight foward, I just don't know what it is. If anyone could help me 
here, I would appreciate it.

  Thanks!



More information about the Python-list mailing list