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


Groups > comp.lang.python > #62981

Re: About some problem

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'syntax': 0.04; 'beginner': 0.05; 'kumar': 0.09; 'namespace': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'jan': 0.12; '2.7': 0.14; 'question.': 0.14; 'idea:': 0.16; 'implies': 0.16; 'naming': 0.16; 'syntaxerror:': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'written': 0.21; 'import': 0.22; 'email addr:gmail.com&gt;': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'install': 0.23; 'error': 0.23; '2.x': 0.24; 'subject:problem': 0.24; 'cc:2**0': 0.24; 'first,': 0.26; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'statement': 0.30; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; 'getting': 0.31; 'usually': 0.31; '"",': 0.31; '3.x': 0.31; 'subject:About': 0.31; 'subject:some': 0.31; 'file': 0.32; 'probably': 0.32; 'compatible': 0.32; 'text': 0.33; 'url:python': 0.33; '(most': 0.33; "can't": 0.35; 'received:google.com': 0.35; 'version': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'should': 0.36; 'so,': 0.37; 'clear': 0.37; 'skip:& 10': 0.38; 'that,': 0.38; 'recent': 0.39; 'skip:& 20': 0.39; 'bad': 0.39; 'url:mail': 0.40; 'how': 0.40; 'skip:\xc2 10': 0.60; 'back': 0.62; "you've": 0.63; 'became': 0.64; 'chance': 0.65; 'to:addr:gmail.com': 0.65; 'invalid': 0.68; '8bit%:100': 0.72; 'dialect': 0.84; 'do:': 0.91; 'joel': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TCk0WKCeS4wyQrkb1AXB3Tnqktu3vOpZ6NOee0ikh/w=; b=Vq8IaOuvoLOwUpW2XnXidRTjrk9VSPSMcsiI71sBejf0VxCVnH1N1CjFfq7GiUTdfx T5e+VAHo2VPP4mOM9PWr5jWa6f7t//bp/45iR5X770gDKOE6cuJ3v4fkpsiv96rJhxOP r89MkiT5CZ1BVceAIHuZ3rrhz3DInbHOl6t30Hru+nTeoeTydi2Es5vOg9DjKDYKlpdV AC32+z+6rCOONNuXM799YG9RZxe6hpxpp9k/aP69cPWKTC+T5JmqFf+B80TNT4zRZIWl saRFofwAhEMJbVk6ghaRTk+hAE63m/aL3s+nWBv2ojPc1i+rAq7oafmse9PXdDkcJjc0 8CHA==
MIME-Version 1.0
X-Received by 10.52.27.170 with SMTP id u10mr1902054vdg.74.1388681593666; Thu, 02 Jan 2014 08:53:13 -0800 (PST)
In-Reply-To <CAN5p5FV7=RKK0cmE_=n+te07CEt678OX1Wwj+96T9eAuDujpfA@mail.gmail.com>
References <CAN5p5FV7=RKK0cmE_=n+te07CEt678OX1Wwj+96T9eAuDujpfA@mail.gmail.com>
Date Thu, 2 Jan 2014 11:53:13 -0500
Subject Re: About some problem
From Joel Goldstick <joel.goldstick@gmail.com>
To raj kumar <rajkumar84730@gmail.com>
Content-Type multipart/alternative; boundary=20cf307c9d0018c1c804eeffa107
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4791.1388681602.18130.python-list@python.org> (permalink)
Lines 96
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1388681602 news.xs4all.nl 2885 [2001:888:2000:d::a6]:47913
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62981

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Jan 2, 2014 at 11:31 AM, raj kumar <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.
>
> --
> 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

Also, this is usually a bad idea:

            from pytesser import *

Probably better not to muddle the namespace with a chance of naming
collisions and do:

  import pytesser


Good luck.  Come back after you've had a go with those ideas

-- 
Joel Goldstick
http://joelgoldstick.com

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: About some problem Joel Goldstick <joel.goldstick@gmail.com> - 2014-01-02 11:53 -0500

csiph-web