<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 2, 2014 at 11:31 AM, raj kumar <span dir="ltr"><<a href="mailto:rajkumar84730@gmail.com" target="_blank">rajkumar84730@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello, I am beginner to python and i am writing following code<div><br></div><div>from pytesser import *</div>
<div><br></div><div>and i am getting an error as follow</div><div><br></div><div>Traceback (most recent call last):</div>
<div>  File "<stdin>", line 1, in <module></div><div>  File "C:\Python33\lib\site-packages\pytesser.py", line 61</div><div>    print text</div><div>             ^</div><div>SyntaxError: invalid syntax</div>

<div><br></div><div><br></div><div>How to resolve it ? Give me all steps to resolve it.</div></div>
<br>--<br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/mailman/listinfo/python-list</a><br>
<br></blockquote></div>First, you should give version and os when you ask a question.  However it is clear you are using python 3.3 and Windows.<br><br></div><div class="gmail_extra">Your print statement implies that pytesser.py is written in the 2.x dialect of python.  In version 3.x print became a function and requires parenthesis around the arguments.<br>
<br></div><div class="gmail_extra">So, you need to find a version of pytesser.py that is compatible with python 3, or if you can't do that, and you need pytesser.py, you have to install python 2.7<br><br></div><div class="gmail_extra">
Also, this is usually a bad idea:<br></div><div class="gmail_extra"><br clear="all"><div>            from pytesser import *</div><div><br></div><div>Probably better not to muddle the namespace with a chance of naming collisions and do:<br>
<br></div><div>  import pytesser<br><br><br></div><div>Good luck.  Come back after you've had a go with those ideas<br></div><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br>
</div>
</div></div>