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


Groups > comp.lang.python > #101407

Re: Problem with 'print'

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From "D'Arcy J.M. Cain" <darcy@VybeNetworks.com>
Newsgroups comp.lang.python
Subject Re: Problem with 'print'
Date Sat, 9 Jan 2016 10:19:29 -0500
Organization Vybe Networks Inc.
Lines 30
Message-ID <mailman.95.1452353286.2305.python-list@python.org> (permalink)
References <CAOtrjidkbrDPzqkEeMjbmWcgscr0k_vK_Ns=SfjXPHzVGyovNQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de ymh7opemPo3IXSvk3exNXwHWjhDiQQtFqZIletiC3/2w==
Return-Path <darcy@VybeNetworks.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'plenty': 0.07; 'cc:addr:python-list': 0.09; '2to3': 0.09; 'python': 0.10; 'jan': 0.11; 'files.': 0.13; '2016': 0.16; 'imo.': 0.16; 'parentheses': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Problem': 0.16; 'wrote:': 0.16; 'pfxlen:0': 0.18; 'version.': 0.18; 'changes': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'cc:no real name:2**0': 0.22; 'sat,': 0.23; 'downloaded': 0.24; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'install': 0.25; 'command': 0.26; 'error': 0.27; '+0100': 0.27; 'error.': 0.31; 'probably': 0.31; 'run': 0.33; 'file': 0.34; 'easiest': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'subject:: ': 0.37; 'missing': 0.37; 'charset:us- ascii': 0.37; 'anything': 0.38; 'does': 0.39; 'subject:with': 0.40; 'called': 0.40; 'hello,': 0.40; 'your': 0.60; 'bring': 0.62; 'latest': 0.64; 'you.': 0.64; 'between': 0.65; 'differences': 0.66; '2.7.': 0.84; 'pablo': 0.84; 'received:98.158': 0.84; 'choices.': 0.91
In-Reply-To <CAOtrjidkbrDPzqkEeMjbmWcgscr0k_vK_Ns=SfjXPHzVGyovNQ@mail.gmail.com>
X-Mailer Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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>
Xref csiph.com comp.lang.python:101407

Show key headers only | View raw


On Sat, 9 Jan 2016 12:40:16 +0100
pablo gormi <pablogormi822@gmail.com> wrote:
> Hello, recently I downloaded python, but when I try to execute one
> file with the command 'print' it shows me a error. The error is:
> 
> Missing parentheses in call to 'print'

You downloaded Python 3.<something> but your script was written for
Python 2.<something>.  You have a few choices.

Remove Python and install Python 2.7.
Edit your script to bring it up to the latest version.
Run 2to3 on your script or even whole directories.

The first may be the easiest but you will have to do one of the others
eventually so I would discourage it.

There are plenty of sites (GIYF) that explain the differences between 2
and 3.  You can manually edit all of your files.

Current Python comes with a program called 2to3 that does 99% of the
work for you.  You should probably review the changes it makes (capture
the output) to see if anything needs to be tweaked.  This is definitely
the best solution IMO.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:darcy@Vex.Net VoIP: sip:darcy@VybeNetworks.com

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


Thread

Re: Problem with 'print' "D'Arcy J.M. Cain" <darcy@VybeNetworks.com> - 2016-01-09 10:19 -0500

csiph-web