Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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; 'interpreter': 0.05; 'sys': 0.05; 'script,': 0.07; 'python': 0.08; 'extension.': 0.09; 'filename': 0.09; 'highlight': 0.09; 'idle,': 0.09; 'shortcut': 0.09; '2.7': 0.13; 'received:209.85.214.174': 0.13; 'cc:addr :python-list': 0.15; '"here': 0.16; '"invalid': 0.16; 'installs': 0.16; 'subject:question': 0.16; 'wrote:': 0.16; "wouldn't": 0.17; 'jan': 0.19; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'changed': 0.23; 'statement': 0.23; 'opens': 0.23; 'command': 0.24; 'traceback': 0.24; 'cc:2**0': 0.25; 'saying': 0.25; 'pm,': 0.26; 'url:mailman': 0.26; 'import': 0.27; 'message- id:@mail.gmail.com': 0.28; 'idle': 0.28; 'installing': 0.28; 'problem': 0.29; 'print': 0.29; 'installed': 0.29; 'cc:addr:python.org': 0.29; 'second': 0.29; 'ran': 0.30; 'url:listinfo': 0.30; 'error': 0.30; 'version': 0.31; 'thu,': 0.32; 'received:209.85.214': 0.32; 'thanks': 0.32; 'there': 0.33; 'showing': 0.34; 'things': 0.35; 'issue': 0.35; 'file': 0.35; 'url:python': 0.36; 'everyone.': 0.36; 'run': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'url:org': 0.39; 'johnson': 0.39; 'help': 0.39; 'received:209': 0.39; 'subject:: ': 0.39; 'type': 0.60; 'happen': 0.61; 'your': 0.61; 'leading': 0.62; 'waiting': 0.62; '26,': 0.67; 'blind': 0.84; 'quotation': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=wxeBVeBTuk7TNnMaaRrYcXeh1+tBj9InNMmwDYZT7Mc=; b=dSyHl83KxRwdMkAvMHKQJgrbMN6NJqixdpStC5c8FNLCA1zVGs5KXpMQ79Ls/8tDtE nu9HxPZ90RqmnvXUzhn7SSoEeJvr4bI7UCqoG8JC5P/u7qirgz65ZuOJhr62yGew5ucw bAkF+M8AiEa8yXYZ6XPGWmMsVfyIVHYfO3lyI= MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 26 Jan 2012 20:51:43 -0500 Subject: Re: Weird newbie question From: Matty Sarro To: Rick Johnson Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 45 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1327629112 news.xs4all.nl 6876 [2001:888:2000:d::a6]:47168 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19514 The issue was a version mismatch. When installing python on windows, it installs a shortcut so when you right click, you can edit things in IDLE. I had installed python 3 after installing 2.7, so it apparently changed the extension. As for not showing tracebacks, I couldn't. When I ran the program from the command line, it ran the version 2.7 python because that's the one I have set in my $PATH. However when I was editing it in IDLE, it would highlight the second set of quotation marks in the statement and simply spit out an error saying "Invalid Syntax." There was no traceback because IDLE wouldn't run the program in the interpreter that opens along side the editor. Re-opening the file in the 2.7 version of IDLE removed any issues. Thanks for your help everyone. On Thu, Jan 26, 2012 at 5:53 PM, Rick Johnson wrote: > On Jan 26, 4:05=C2=A0pm, Matty Sarro wrote: > >> Here's my code: >> >> from sys import argv >> script,filename=3Dargv >> txt=3Dopen(filename) >> print "Here is your file %r:" % filename >> print txt.read() >> print "I'll also ask you to type it again:" >> file_again=3Draw_input("> ") >> txt_again=3Dopen(file_again) >> print txt_again.read() >> >> IDLE is saying that my error is on line 4, at the second set of >> quotation marks. [...] > > Forget about line 4 because line 2 is a problem waiting to happen > (PEP8 formating added for clarity) > > Line2: script, filename =3D argv > > Is this a case of the blind leading the blind? > > -- > http://mail.python.org/mailman/listinfo/python-list