<div dir="ltr">No</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Mar 17, 2013 at 12:52 AM, Peng Yu <span dir="ltr"><<a href="mailto:pengyu.ut@gmail.com" target="_blank">pengyu.ut@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I want to get the indent level within the code. For example, I want to<br>
print 1 within the while loop as the line is indented 1 level. Is it<br>
possible to get it within python?<br>
<br>
while 1:<br>
   #print the level of indent, which is 1 here.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Regards,<br>
Peng<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div>