[IPython-dev] open() function?
Fernando Perez
fperez.net at gmail.com
Tue Aug 17 20:18:41 EDT 2010
On Tue, Aug 17, 2010 at 8:38 AM, AK <andrei.avk at gmail.com> wrote:
> Hi, why is open() function used in ipython is imported from posix module
> instead of the built-in open()? (Ubuntu 10.04)?
Why do you say that? This is what I see running the IPython in 10.04:
(python-bare)amirbar[virtualenv]> /usr/bin/ipython
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
Type "copyright", "credits" or "license" for more information.
IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: open?
Type: builtin_function_or_method
Base Class: <type 'builtin_function_or_method'>
Namespace: Python builtin
Docstring:
open(name[, mode[, buffering]]) -> file object
Open a file using the file() type, returns a file object. This is the
preferred way to open a file.
I don't find any direct posix imports in the source either:
amirbar[IPython]> grin posix
amirbar[IPython]>
Cheers
f
More information about the IPython-dev
mailing list