[Tutor] file methods
Dave Kuhlman
dkuhlman at rexx.com
Tue Jul 10 18:08:09 CEST 2007
On Tue, Jul 10, 2007 at 08:24:36AM -0400, bhaaluu wrote:
> Thank you for the clarification.
> One pitfall of experimentation as a Noob is in not knowing enough to
> figure out what or why errors are generated. Thus, this Tutor list is very
> helpful. I really appreciate the feedback.
>
You might consider installing and using IPython instead of the
standard Python interactive prompt.
At the IPython prompt, the question mark operator gives help. For
example, notice the "f.read?", below.
In [25]: f = open('test_lxml.py', 'r')
In [26]: f.read?
Type: builtin_function_or_method
Base Class: <type 'builtin_function_or_method'>
String Form: <built-in method read of file object at 0x83ecf98>
Namespace: Interactive
Docstring:
read([size]) -> read at most size bytes, returned as a string.
If the size argument is negative or omitted, read until EOF is reached.
Notice that when in non-blocking mode, less data than what was requested
may be returned, even if no size parameter was given.
IPython is at: http://ipython.scipy.org/moin/
Dave
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
More information about the Tutor
mailing list