Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'subject:Python': 0.06; '(of': 0.07; 'python': 0.11; 'mostly': 0.14; 'books': 0.15; 'windows': 0.15; '1:13': 0.16; 'agreed,': 0.16; 'blocks': 0.16; 'brackets,': 0.16; 'elsewhere,': 0.16; 'indent': 0.16; 'syntax,': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'wed,': 0.18; 'examples': 0.20; 'seems': 0.21; 'select': 0.22; 'to:name:python-list@python.org': 0.22; 'certainly': 0.24; 'earlier': 0.24; '15,': 0.26; 'header:In-Reply- To:1': 0.27; 'tried': 0.27; 'chris': 0.29; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'controlled': 0.31; 'fault': 0.31; 'time;': 0.31; 'this.': 0.32; 'probably': 0.32; 'text': 0.33; 'up.': 0.33; 'worked': 0.33; 'level.': 0.33; 'plain': 0.33; 'totally': 0.33; 'copying': 0.34; "i'd": 0.34; 'could': 0.34; 'editor': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; '14,': 0.36; 'should': 0.36; 'depends': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; '(from': 0.39; 'extremely': 0.39; 'pdf': 0.39; 'to:addr:python.org': 0.39; 'manually': 0.60; 'simply': 0.61; "you're": 0.61; "you'll": 0.62; 'today': 0.64; 'subject:there': 0.68; 'default': 0.69; '8.1': 0.84; 'pasting': 0.84; 'pdf.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=LQQUz/IHRjg4F/9RDG6e1ceHDlE76rJbBSIH70qC/Ww=; b=k9byjC70kQKIAhqIPZxLAcUW6FXgRnqQVYDBBS3VdNOaD2fmrB4tn+3M/09gGUDKQa xXI1tZmDSOcPzXPB7g6Quqat53L0MKpQZdvtC/yLI3AITo/jSgI1MONEL08hnN0RLXr2 vHX66I1Prx1NlQUUEnxYjabEPdg+dIBsbtr7Y5iQZb/4j8xE1TXKDuTWsEFxzqEZY/Zs gT7IW3DVhmiakAnWE6/4oHDAjqWXyR05C8uNQ7uQ3H/u6owYQhyHVL6eFu8cZp3obROc ++xKZuDsUGGWdnZ7XoromhDwguaHtYnBBX3MGgKOwBIniXePBHEqQFRDLKP05EC+w226 /h9w== X-Received: by 10.60.123.18 with SMTP id lw18mr8151196oeb.7.1413340532412; Tue, 14 Oct 2014 19:35:32 -0700 (PDT) MIME-Version: 1.0 Sender: zachary.ware@gmail.com In-Reply-To: References: <9a0c67be-de3a-4770-bf06-e158783bfff0@googlegroups.com> From: Zachary Ware Date: Tue, 14 Oct 2014 21:35:12 -0500 X-Google-Sender-Auth: hjJPbpzmaWi3EKuY6MQbfhOrjb0 Subject: Re: Is there an easy way to control indents in Python To: "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.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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413340909 news.xs4all.nl 2906 [2001:888:2000:d::a6]:32957 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:79130 On Tue, Oct 14, 2014 at 9:18 PM, Chris Angelico wrote: > On Wed, Oct 15, 2014 at 1:13 PM, ryguy7272 wrote: >> I'm just learning Python. It seems like indents are EXTREMELY important= . I guess, since there are no brackets, everything is controlled by indent= s. Well, I'm reading a couple books on Python now, and in almost all of th= e examples they don't have proper indents, so when I copy/paste the code (f= rom the PDF to the IDE) the indents are totally screwed up. I'm thinking t= hat there should be some control, or setting, for this. I hope. :) >> > > That probably depends on the person who made the PDF. You may simply > have to copy and paste one line at a time; if you're using an editor > that understands Python syntax, it'll do some of your indenting for > you, and you'll just have to manually mark the unindents. > Alternatively, just paste it all in without indentation, then go > through and select blocks of code and hit Tab; in many editors, > that'll indent the selected code by one level. But ultimately, the > fault is almost certainly with the PDF. Agreed, although I'd say the PDF viewer could also be at fault. Earlier today I tried to copy just a paragraph of mostly plain text from the Firefox built-in PDF viewer, but when pasting it elsewhere, it was pasted one character per line. Opening it in the Windows 8.1 default PDF viewer (of all things...), copying and pasting worked like a charm. --=20 Zach