Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ac3d429e
Commit
ac3d429e
authored
Nov 02, 2007
by
Mark Summerfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more file-handling related cross-references.
parent
f7601ee2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
+15
-5
Doc/library/functions.rst
Doc/library/functions.rst
+3
-2
Doc/library/os.rst
Doc/library/os.rst
+6
-1
Doc/library/shutil.rst
Doc/library/shutil.rst
+2
-1
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+4
-1
No files found.
Doc/library/functions.rst
View file @
ac3d429e
...
...
@@ -766,8 +766,9 @@ available. They are listed here in alphabetical order.
Python
enforces
that
the
mode
,
after
stripping
``
'U'
``,
begins
with
``
'r'
``,
``
'w'
``
or
``
'a'
``.
See
also
the
:
mod
:`
fileinput
`
module
,
the
:
mod
:`
os
`
module
,
and
the
:
mod
:`
os
.
path
`
module
.
Python
provides
many
file
handling
modules
including
:
mod
:`
fileinput
`,
:
mod
:`
os
`,
:
mod
:`
os
.
path
`,
:
mod
:`
tempfile
`,
and
:
mod
:`
shutil
`.
..
versionchanged
::
2.5
Restriction
on
first
letter
of
mode
string
introduced
.
...
...
Doc/library/os.rst
View file @
ac3d429e
...
...
@@ -11,7 +11,9 @@ functionality than importing a operating system dependent built-in module like
:mod:`posix` or :mod:`nt`. If you just want to read or write a file see
:func:`open`, if you want to manipulate paths, see the :mod:`os.path`
module, and if you want to read all the lines in all the files on the
command line see the :mod:`fileinput` module.
command line see the :mod:`fileinput` module. For creating temporary
files and directories see the :mod:`tempfile` module, and for high-level
file and directory handling see the :mod:`shutil` module.
This module searches for an operating system dependent built-in module like
:mod:`mac` or :mod:`posix` and exports the same functions and data as found
...
...
@@ -983,6 +985,9 @@ Files and Directories
``0777`` (octal). On some systems, *mode* is ignored. Where it is used, the
current umask value is first masked out. Availability: Macintosh, Unix, Windows.
It is also possible to create temporary directories; see the
:mod:`tempfile` module's :func:`tempfile.mkdtemp` function.
.. function:: makedirs(path[, mode])
...
...
Doc/library/shutil.rst
View file @
ac3d429e
...
...
@@ -15,7 +15,8 @@
The :mod:`shutil` module offers a number of high-level operations on files and
collections of files. In particular, functions are provided which support file
copying and removal.
copying and removal. For operations on individual files, see also the
:mod:`os` module.
.. warning::
...
...
Doc/library/stdtypes.rst
View file @
ac3d429e
...
...
@@ -1846,7 +1846,10 @@ created with the built-in :func:`file` and (more usually) :func:`open`
constructors described in the :ref:`built-in-funcs` section. [#]_ File
objects are also returned by some other built-in functions and methods,
such as :func:`os.popen` and :func:`os.fdopen` and the :meth:`makefile`
method of socket objects.
method of socket objects. Temporary files can be created using the
:mod:`tempfile` module, and high-level file operations such as copying,
moving, and deleting files and directories can be achieved with the
:mod:`shutil` module.
When a file operation fails for an I/O-related reason, the exception
:exc:`IOError` is raised. This includes situations where the operation is not
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment