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


Groups > comp.lang.python > #62984

Re: About some problem

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rustompmody@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'syntax': 0.04; 'beginner': 0.05; 'that?': 0.05; 'kumar': 0.09; 'mixed': 0.09; 'namespace': 0.09; 'python': 0.11; 'jan': 0.12; '2.7': 0.14; 'question.': 0.14; 'idea:': 0.16; 'implies': 0.16; 'isnt': 0.16; 'naming': 0.16; 'syntaxerror:': 0.16; 'wrote:': 0.18; 'module': 0.19; 'normally': 0.19; 'properly': 0.19; 'thu,': 0.19; 'written': 0.21; 'import': 0.22; 'print': 0.22; 'install': 0.23; 'error': 0.23; '2.x': 0.24; 'subject:problem': 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; "i'm": 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; 'but': 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; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'that,': 0.38; 'recent': 0.39; 'bad': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'how': 0.40; 'back': 0.62; "you've": 0.63; 'became': 0.64; 'different': 0.65; 'chance': 0.65; 'dont': 0.67; 'invalid': 0.68; '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:from:date:message-id:subject:to :content-type; bh=+nabXP07LbuccL8j8Fz1hAuYp1AG/gnmnT2pjx/4iK8=; b=GsbN6Ipz2gHINpfmWtUPy58oKztYKcVZpFF+MC50upftZZlp/Sq3OPz6iHw6javPDM jaF+rNGeKJWNmMV8pFMapwO/wpj1E8dWOtwcHj1CgFs+1RWiYbZofIgw4BG0drvManbP BdkUYMAZ6bxdweFZPWQRsKhGeZJp2L/73bzd4a5MobKBFOSijZJgdLVpJ4Xbi/5nP44g qeoFFA8IMxxcymOP5gIAxq22utaLwzlw6i6O3NW5pBCwVIAIoOa2N0cSOoXbxDi52i7a rXjSqz72CYk618JeYrqGYNg0O9Xhc2WAJ8OCMsZqsjWou70LmRfjo9GwI+kFn0ckYz1z oqqQ==
X-Received by 10.66.230.233 with SMTP id tb9mr89134597pac.38.1388682346641; Thu, 02 Jan 2014 09:05:46 -0800 (PST)
MIME-Version 1.0
In-Reply-To <CAPM-O+wAZFmde2bVhqqs4==a-jy3AXfv3f9JNQwcNmTJHCak+Q@mail.gmail.com>
References <CAN5p5FV7=RKK0cmE_=n+te07CEt678OX1Wwj+96T9eAuDujpfA@mail.gmail.com> <CAPM-O+wAZFmde2bVhqqs4==a-jy3AXfv3f9JNQwcNmTJHCak+Q@mail.gmail.com>
From Rustom Mody <rustompmody@gmail.com>
Date Thu, 2 Jan 2014 22:35:26 +0530
Subject Re: About some problem
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.4793.1388682356.18130.python-list@python.org> (permalink)
Lines 53
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1388682356 news.xs4all.nl 2881 [2001:888:2000:d::a6]:57531
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62984

Show key headers only | View raw


On Thu, Jan 2, 2014 at 10:23 PM, Joel Goldstick
<joel.goldstick@gmail.com> wrote:
>
>
>
> 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

i'm not sure about this but isnt it normally the case that different
version modules dont get mixed up like that?
IOW if pytesser was a properly packaged 2.7 module would python 3 be
able to get at it ??

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


Thread

Re: About some problem Rustom Mody <rustompmody@gmail.com> - 2014-01-02 22:35 +0530

csiph-web