Bruno,<div><br></div><div>Something on these lines would have to be done:</div><div><br></div><div><span class="Apple-style-span" style="font-weight: bold;">>>> d = obj.__doc__</span></div><div><span class="Apple-style-span" style="font-weight: bold;">>>> d</span></div>
<div><div>'\n This class encapsulates all methods for doing\n whatever you would like to do\n with it\n'<br></div><div><span class="Apple-style-span" style="font-weight: bold;">>>> d2 = d.split('\n')</span></div>
<div><span class="Apple-style-span" style="font-weight: bold;">>>> d2</span></div><div>['',</div><div> ' This class encapsulates all methods for doing',</div><div> ' whatever you would like to do',</div>
<div> ' with it',</div><div> '']</div><div><span class="Apple-style-span" style="font-weight: bold;">>>> import string<br></span></div><div><span class="Apple-style-span" style="font-weight: bold;">>>> d4 = map(string.strip, d2)</span></div>
<div><span class="Apple-style-span" style="font-weight: bold;">>>> d4</span><br></div><div>['',</div><div> 'This class encapsulates all methods for doing',</div><div> 'whatever you would like to do',</div>
<div> 'with it'</div> '']<div><span class="Apple-style-span" style="font-weight: bold;">>>> print '\n'.join(d4)</span></div><div><span class="Apple-style-span" style="font-weight: bold;"><br>
</span></div><div>This class encapsulates all methods for doing</div><div>whatever you would like to do<br></div><div>with it<br></div><div><br></div>Vishal</div><div><br><div class="gmail_quote">On Tue, Mar 31, 2009 at 3:19 PM, Vishal <span dir="ltr"><<a href="mailto:vsapre80@gmail.com">vsapre80@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 Bruno,<div><br></div><div>Thanks for the email. The only reason I had not put a remark on BOUML trackers forum was that I was not using BOUML heavily.</div>
<div><br></div><div>I think while creating code, the indentation should certainly be there.</div>
<div>Usually when ever I introspect about __doc__ from a python class/function, I dont see the indentation in that...but that might be because my IDE takes care of removing </div><div>the indentation. </div><div>So to answer your question, when introspecting code, can you make it such that a query for __doc__ removes indentation (left side space gets trimmed for each line) from the block that is returned?</div>
<div><br></div><div>Thanks and best regards,</div><div>Vishal Sapre<font color="#888888"><br></font><div><br></div><div>p.s: Just wanted to congratulate you on a wonderful piece of software (BOUML) that you have been doing for so long.</div>
<div><br>
</div><div><div><div></div><div class="h5"><br><div class="gmail_quote">On Tue, Mar 31, 2009 at 1:38 PM, bruno pages <span dir="ltr"><<a href="mailto:bouml@free.fr" target="_blank">bouml@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi,<br>
<div><br>
<br>
Vishal-7 wrote:<br>
><br>
> BOUML works wonderfully, except the default indentation of docstrings.<br>
><br>
<br>
</div>I am the author of Bouml, I never receive a remark from you or other Python<br>
user on Bouml forums/trackers about that<br>
<br>
Yes the Python generator doesn't indent docstring because If I do that the<br>
string returned by __doc__ contains these indentations, and I supposed this<br>
is not the expected behavior<br>
<br>
But I am not a Python programmer (sorry), can you confirm the docstring must<br>
be indented even this pollutes __doc__ ?<br>
<br>
Thanks and best regards,<br>
Bruno<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/UML-%3C%3D%3E-Python...and-other-things...-tp22391762p22800277.html" target="_blank">http://www.nabble.com/UML-%3C%3D%3E-Python...and-other-things...-tp22391762p22800277.html</a><br>
Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com.<br>
</font><div><div></div><div><br>
_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org" target="_blank">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div class="im">-- <br>"So say...Day by day, in every way, I am getting better, better and better !!!"<br>"A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it"<br>
"Diamond is another piece of coal that did well under pressure”<br>"Happiness keeps u Sweet, Trials keep u Strong, <br>Sorrow keeps u Human, Failure Keeps u Humble, <br>Success keeps u Glowing, But only God Keeps u Going.....Keep Going....."<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>"So say...Day by day, in every way, I am getting better, better and better !!!"<br>"A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it"<br>
"Diamond is another piece of coal that did well under pressure”<br>"Happiness keeps u Sweet, Trials keep u Strong, <br>Sorrow keeps u Human, Failure Keeps u Humble, <br>Success keeps u Glowing, But only God Keeps u Going.....Keep Going....."<br>
</div>