Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62983 > unrolled thread

Re: About some problem

Started byMark Lawrence <breamoreboy@yahoo.co.uk>
First post2014-01-02 17:01 +0000
Last post2014-01-02 17:01 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: About some problem Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-02 17:01 +0000

#62983 — Re: About some problem

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-01-02 17:01 +0000
SubjectRe: About some problem
Message-ID<mailman.4792.1388682069.18130.python-list@python.org>
On 02/01/2014 16:53, Joel Goldstick wrote:
>
>
>
> On Thu, Jan 2, 2014 at 11:31 AM, raj kumar <rajkumar84730@gmail.com
> <mailto:rajkumar84730@gmail.com>> wrote:
>
>     Hello, I am beginner to python and i am writing following code
>
>     from pytesser import *
>
>     and i am getting an error as follow
>
>     Traceback (most recent call last):
>        File "<stdin>", line 1, in <module>
>        File "C:\Python33\lib\site-packages\pytesser.py", line 61
>          print text
>                   ^
>     SyntaxError: invalid syntax
>
>
>     How to resolve it ? Give me all steps to resolve it.

"Please" goes a long way.

>
>     --
>     https://mail.python.org/mailman/listinfo/python-list
>
> First, you should give version and os when you ask a question.  However
> it is clear you are using python 3.3 and Windows.
>
> 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.
>
> 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
>

What's wrong with making a compatible version using this command?

2to3 -w pytesser.py

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web