Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9c43c590
Kaydet (Commit)
9c43c590
authored
Agu 08, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More emphasis on os.environ's calling of putenv; and added hint about
flags for open().
üst
7d6b7d3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
libposix.tex
Doc/lib/libposix.tex
+14
-4
libposix.tex
Doc/libposix.tex
+14
-4
No files found.
Doc/lib/libposix.tex
Dosyayı görüntüle @
9c43c590
...
...
@@ -13,7 +13,9 @@ the \code{posix} interface. On non-\UNIX{} operating systems the
\code
{
posix
}
module is not available, but a subset is always available
through the
\code
{
os
}
interface. Once
\code
{
os
}
is imported, there is
\emph
{
no
}
performance penalty in using it instead of
\code
{
posix
}
.
\code
{
posix
}
. In addition,
\code
{
os
}
provides some additional
functionality, such as automatically calling
\code
{
putenv()
}
when an entry is
\code
{
os.environ
}
is changed.
\stmodindex
{
os
}
The descriptions below are very terse; refer to the
...
...
@@ -35,13 +37,17 @@ For example,
is the pathname of your home directory, equivalent to
\code
{
getenv("HOME")
}
in C.
Modifying this dictionary does not affect the string environment
passed on by
\code
{
execv()
}
,
\code
{
popen()
}
or
\code
{
system()
}
; if you
need to change the environment, pass
\code
{
environ
}
to
\code
{
execve()
}
or add variable assignments and export statements to the command
string for
\code
{
system()
}
or
\code
{
popen()
}
.
%
\footnote
{
The problem with automatically passing on
\code
{
environ
}
is
that there is no portable way of changing the environment.
}
string for
\code
{
system()
}
or
\code
{
popen()
}
.
\emph
{
However:
}
If you are using this module via the
\code
{
os
}
module
(as you should -- see the introduction above),
\code
{
environ
}
is a
a mapping object that behaves almost like a dictionary but invokes
\code
{
putenv()
}
automatically called whenever an item is changed.
\end{datadesc}
\renewcommand
{
\indexsubitem
}{
(exception in module posix)
}
...
...
@@ -238,6 +244,10 @@ The default \var{mode} is 0777 (octal), and the current umask value is
first masked out. Return the file descriptor for the newly opened
file.
For a description of the flag and mode values, see the
\UNIX
{}
or C
run-time documentation; flag constants (like
\code
{
O
_
RDONLY
}
and
\code
{
O
_
WRONLY
}
) are defined in this module too (see below).
Note: this function is intended for low-level I/O. For normal usage,
use the built-in function
\code
{
open
}
, which returns a ``file object''
with
\code
{
read()
}
and
\code
{
write()
}
methods (and many more).
...
...
Doc/libposix.tex
Dosyayı görüntüle @
9c43c590
...
...
@@ -13,7 +13,9 @@ the \code{posix} interface. On non-\UNIX{} operating systems the
\code
{
posix
}
module is not available, but a subset is always available
through the
\code
{
os
}
interface. Once
\code
{
os
}
is imported, there is
\emph
{
no
}
performance penalty in using it instead of
\code
{
posix
}
.
\code
{
posix
}
. In addition,
\code
{
os
}
provides some additional
functionality, such as automatically calling
\code
{
putenv()
}
when an entry is
\code
{
os.environ
}
is changed.
\stmodindex
{
os
}
The descriptions below are very terse; refer to the
...
...
@@ -35,13 +37,17 @@ For example,
is the pathname of your home directory, equivalent to
\code
{
getenv("HOME")
}
in C.
Modifying this dictionary does not affect the string environment
passed on by
\code
{
execv()
}
,
\code
{
popen()
}
or
\code
{
system()
}
; if you
need to change the environment, pass
\code
{
environ
}
to
\code
{
execve()
}
or add variable assignments and export statements to the command
string for
\code
{
system()
}
or
\code
{
popen()
}
.
%
\footnote
{
The problem with automatically passing on
\code
{
environ
}
is
that there is no portable way of changing the environment.
}
string for
\code
{
system()
}
or
\code
{
popen()
}
.
\emph
{
However:
}
If you are using this module via the
\code
{
os
}
module
(as you should -- see the introduction above),
\code
{
environ
}
is a
a mapping object that behaves almost like a dictionary but invokes
\code
{
putenv()
}
automatically called whenever an item is changed.
\end{datadesc}
\renewcommand
{
\indexsubitem
}{
(exception in module posix)
}
...
...
@@ -238,6 +244,10 @@ The default \var{mode} is 0777 (octal), and the current umask value is
first masked out. Return the file descriptor for the newly opened
file.
For a description of the flag and mode values, see the
\UNIX
{}
or C
run-time documentation; flag constants (like
\code
{
O
_
RDONLY
}
and
\code
{
O
_
WRONLY
}
) are defined in this module too (see below).
Note: this function is intended for low-level I/O. For normal usage,
use the built-in function
\code
{
open
}
, which returns a ``file object''
with
\code
{
read()
}
and
\code
{
write()
}
methods (and many more).
...
...
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