Thanks!
Banar-Tul
tonyclick at mindspring.com
Fri May 31 07:59:43 EDT 2002
Peter Hansen wrote:
> Banar-Tul wrote:
>>
>> 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 >>>.
>
> That's because you are still in the Python console. The example
> above is expecting to be typed at the _shell prompt_. The "%" prompt
> is an indicator that you should exit Python with Ctrl-D and type
> the Linux command "cat" which simply displays the contents of the
> file named 'threenames.py'.
>
>>>> indicates the Python prompt
> % indicates a Linux prompt
>
> -Peter
Ah! That sound you hear is me repeatedly slapping my forehead. Thanks.
More information about the Python-list
mailing list