On 3/20/07, David Koch <[EMAIL PROTECTED]> wrote: > And by the way - whenever I do a <function>.__doc__ all newline characters > are printed as "\n" in the python console ... how do I change that?
The easiest way to access the doc strings is to type help(<function>) in the python interpreter, or ?<function> in ipython (<ipython.scipy.org>). The reason you are seeing the escaped newlines is that by directly accessing the __doc__ attribute, you are getting the string which the interpreter is kind enough to display in repr form, but you are not explicitly printing it (in str form). Compare: >>> print repr('hello\nworld') 'hello\nworld' >>> print str('hello\nworld') hello world So that if you said print <function>.__doc__, you would not see the escaped newlines. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion