Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41348
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rodrick.brown@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'subject:code': 0.07; 'subject:How': 0.09; '#print': 0.09; 'subject:skip:a 10': 0.09; 'cc:addr:python-list': 0.10; 'indent': 0.16; 'wrote:': 0.17; 'pfxlen:0': 0.17; 'code.': 0.20; 'email addr:gmail.com>': 0.20; 'python?': 0.20; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'url:mailman': 0.29; 'url:python': 0.32; 'print': 0.32; 'url:listinfo': 0.32; 'hi,': 0.33; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; 'level.': 0.36; 'possible': 0.37; 'level': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'url:mail': 0.40; 'within': 0.64; 'subject:get': 0.81; '2013': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=JamdGeu0C39bEZvliM0S0MYXCKbsCvDyPoLNKRSJPdo=; b=rXgofs3TqHpzogRi+8Igyzkr97Vgr2gj7sf9x8o8HFY7w5grhdb0rmQW6zxw9sm9SF b57VUs0mjTuo40zW/qZvgfGstKOU6xMTBWeeuuAA9wK5iWHwRO8SYzhOHnDVMtmIk748 LmlcV22Z7nM/VGiy+TQg5nMudOJfEdLm6YTXPugvPuU/BWch39hczZJ57GsVEXRCsX7s J2L1a5OY5kPCz99Lgv42uswAKMDJyhQHcGiMzl4ic/2NaG5W0/lS6ePspUR5wGs30jjf o1xaMppwzb+o5B+EDjXzcYVBY4QR8zps3V+H2S0cwb75baTRQ0bSZW9LL9V3Tyx/Syhm HZjA== |
| X-Received | by 10.60.8.40 with SMTP id o8mr5111907oea.112.1363498475585; Sat, 16 Mar 2013 22:34:35 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <CABrM6wkCzrMg7_fU9eY15CuNgB3SVzH3+odD06+DtBpO99+Jng@mail.gmail.com> |
| References | <CABrM6wkCzrMg7_fU9eY15CuNgB3SVzH3+odD06+DtBpO99+Jng@mail.gmail.com> |
| From | Rodrick Brown <rodrick.brown@gmail.com> |
| Date | Sun, 17 Mar 2013 01:34:05 -0400 |
| Subject | Re: How to automatically get the indent level from code? |
| To | Peng Yu <pengyu.ut@gmail.com> |
| Content-Type | multipart/alternative; boundary=e89a8ff1c7ea4a06a104d8183a5c |
| Cc | "python-list@python.org" <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3383.1363498483.2939.python-list@python.org> (permalink) |
| Lines | 52 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1363498483 news.xs4all.nl 6974 [2001:888:2000:d::a6]:43199 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:41348 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
No On Sun, Mar 17, 2013 at 12:52 AM, Peng Yu <pengyu.ut@gmail.com> wrote: > Hi, > > I want to get the indent level within the code. For example, I want to > print 1 within the while loop as the line is indented 1 level. Is it > possible to get it within python? > > while 1: > #print the level of indent, which is 1 here. > > -- > Regards, > Peng > -- > http://mail.python.org/mailman/listinfo/python-list >
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: How to automatically get the indent level from code? Rodrick Brown <rodrick.brown@gmail.com> - 2013-03-17 01:34 -0400
csiph-web