Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41348 > unrolled thread

Re: How to automatically get the indent level from code?

Started byRodrick Brown <rodrick.brown@gmail.com>
First post2013-03-17 01:34 -0400
Last post2013-03-17 01:34 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to automatically get the indent level from code? Rodrick Brown <rodrick.brown@gmail.com> - 2013-03-17 01:34 -0400

#41348 — Re: How to automatically get the indent level from code?

FromRodrick Brown <rodrick.brown@gmail.com>
Date2013-03-17 01:34 -0400
SubjectRe: How to automatically get the indent level from code?
Message-ID<mailman.3383.1363498483.2939.python-list@python.org>

[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
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web