Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.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: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.06; 'subject:Question': 0.07; 'subject:code': 0.07; 'function,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'translate': 0.10; 'python': 0.11; 'highlighted': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'written': 0.21; 'print': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'script': 0.25; 'second': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'subject:About': 0.31; 'this.': 0.32; 'but': 0.35; 'to:addr:python-list': 0.38; 'quote': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'charset:windows-1252': 0.65; 'statement,': 0.68; 'sector': 0.72 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Andrew Jaffe Subject: Re: Question About Running Python code Date: Thu, 16 Oct 2014 09:11:06 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: cpc16-acto2-2-0-cust372.4-2.cable.virginm.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413447085 news.xs4all.nl 2871 [2001:888:2000:d::a6]:44078 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79201 On 15/10/2014 23:50, ryguy7272 wrote: > The error that I get is this. > 'invalid syntax' > > The second single quote in this line is highlighted pink. > print 'Downloading data from Yahoo for %s sector' % sector This is a script written for Python 2.*, but you say you are using Python 3.4. In Python 3, "print" is a function, not a statement, so you need to translate this to print('Downloading data from Yahoo for %s sector' % sector)