Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed7.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.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.05; '21,': 0.07; 'subject:code': 0.07; 'works.': 0.07; 'cc:addr :python-list': 0.09; 'python': 0.10; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.16; 'creates': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'trying': 0.22; 'code,': 0.23; 'seems': 0.23; 'header:In-Reply- To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'idea': 0.28; 'indentation': 0.29; "i'm": 0.30; 'subject:/': 0.30; 'code': 0.30; 'tue,': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'lines': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'hundreds': 0.37; 'pdf': 0.37; 'test': 0.39; 'some': 0.40; 'save': 0.60; 'leading': 0.61; 'jul': 0.72; 'sounds': 0.76; 'chrisa': 0.84; 'flaw': 0.84; 'to:none': 0.91; 'trouble.': 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:cc :content-type:content-transfer-encoding; bh=2WFwdffs6jsn47wI3pEbC9cCs6IzO7LIO6SadXsBVxQ=; b=UlwLJCGWZphMX/J8GKIwBcCCJgKNP9royIClzprJ/hx2zPdsnnXwTPgIIXoC0NT087 tBhAP+PMxeSCpyLPMZyH5HQQmoPhyK4lf4mRpUSSrUHujXqIpDONarxILf+vB1JQQsiG wX/W3s8wZ0axouttNRJIkH8+GSgtu2s2Nt2NqpW3y7MGmIsDIACWoPrtE63oOp3t7m96 aPyG+FUORaycAnj3exLa9VhsI/kVLRMH+6QJcuMkUnc+LvGbTbhTiBQWlOKjve4d7IXY u8nS67HgNXJFBFgipUQAWmNCZIMW+XCONzj7LFtPIww/0HZLGR+yUVLMZ20s1W+cfFgR /lfA== MIME-Version: 1.0 X-Received: by 10.50.60.100 with SMTP id g4mr19878114igr.41.1437447309272; Mon, 20 Jul 2015 19:55:09 -0700 (PDT) In-Reply-To: <0f0c6018-50e7-4e95-a798-313d767ce177@googlegroups.com> References: <0f0c6018-50e7-4e95-a798-313d767ce177@googlegroups.com> Date: Tue, 21 Jul 2015 12:55:09 +1000 Subject: Re: Can I copy/paste Python code? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 1437447312 news.xs4all.nl 2889 [2001:888:2000:d::a6]:52307 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94253 On Tue, Jul 21, 2015 at 12:49 PM, ryguy7272 wrote: > I'm trying to copy some Python code from a PDF book that I'm reading. I = want to test out the code, and I can copy it, but when I paste it into the = Shell, everything is all screwed up because of the indentation. Every time = I paste in any kind of code, it seems like everything is immediately left-j= ustified, and then nothing works. > > Any idea how to make this work easily? Without re-typing hundreds of lin= es of code... Sounds like a flaw in the PDF - it creates indentation in some way other than leading spaces/tabs. See if the PDF has a corresponding file of ready-to-go code, that might save you some trouble. ChrisA