[wingide-users] Need help with something very simple
Wingware Support
support at wingware.com
Fri Dec 4 20:31:40 MST 2009
Douglas Mehling wrote:
>
> I am having trouble getting the IDE set up. I am following the
> instructions in the tutorial. I installed Python after installing the
> IDE, and now I'm trying to point it to the directory where it is
> installed. Everything looks right, but it's apparently not working.
> The tutorial said to enter the following code into the Python shell in
> order to print a triangle:
>
>
>
> for i in range(0, 10):
>
> print ' ' * (10 - i) + '*' * i
>
>
>
> I enter the code, but I get this error message:
>
>
>
> Traceback (most recent call last):
>
> File "<string>", line 2, in <fragment>
>
> Syntax Error: print ' ' * (10 - i) + '*' * i: <string>, line 211
>
>
>
> Any suggestions on what I am doing wrong? I am using version 3.1.1 of
> Python.
In Python 3.0 and later, print is no longer a statement and needs to be
invoked like this:
print('' * (10-i) + '*' * i)
We've already updated the tutorial in our sources and this will be in
the next release
of Wing. The changes just amounted to adding the ()'s on four prints --
two in
example1.py and two in example2.py -- and also two other places in the
tutorial
text where print is mentioned.
--
Stephan Deibel
Wingware | Python IDE
Advancing Software Development
www.wingware.com
More information about the wingide-users
mailing list