Commit Graph

185 Commits

Author SHA1 Message Date
Fred Drake 1cd6e4dc38 fix various descriptions of "ctime"
(closes SF patch #870287)
2004-05-12 03:51:40 +00:00
Fred Drake 0ed663443e really scream out that people should use the file objects instead of
file descriptor operations for normal applications
2004-04-16 15:20:01 +00:00
Raymond Hettinger 9b4dab4da1 SF patch #859286: documentation bool change fix
(Contributed by George Yoshida.)
2003-12-31 18:37:28 +00:00
Martin v. Löwis 75aa4db04b Mention that getsid is new in 2.4. 2003-11-10 06:46:15 +00:00
Martin v. Löwis 49ee14dac5 Patch #839038: Add getsid(2). 2003-11-10 06:35:36 +00:00
Raymond Hettinger 9756f388c0 Fix typo. 2003-09-10 00:11:28 +00:00
Raymond Hettinger b67449d31d Fix spacing markup and other sundries. 2003-09-08 18:52:18 +00:00
Raymond Hettinger 0a6aa28681 SF patch #797157: Bug 794658: os.chmod docs, stat constants
(Contributed by Christos Georgiou.)

Reference the symbol definitions in the stat module.
2003-08-31 05:09:52 +00:00
Fred Drake 15eac1f95c Fix markup nits. 2003-05-20 16:21:51 +00:00
Tim Peters dbaf04ead6 Straighten out the docs for os.system(); the Unix and Windows behaviors
really can't be smushed together.

Bugfix candidate.
2003-05-20 16:15:58 +00:00
Guido van Rossum bf1bef820c Add optional 'onerror' argument to os.walk(), to control error
handling.
2003-05-13 18:01:19 +00:00
Raymond Hettinger 52136a8bea Fixed spacing and unbalanced brackets or parenthesis. 2003-05-10 03:35:37 +00:00
Tim Peters a390c6e194 walk() docs: Emphasize that the recursive-delete example is dangerous. 2003-04-28 19:15:10 +00:00
Tim Peters 5501b5e3d7 SF bug 728097: tmpnam problems on windows 2.3b, breaks test.test_os.
tmpnam() appears essentially useless on Windows, and it finally broke
the test for Irmen de Jong.  Read the long new comment in test_tmpnam()
for details.  Since the MS implementation is insane, it might be good
if we supplied a different implementation.

Bugfix candidate.
2003-04-28 03:13:03 +00:00
Tim Peters bf89b3a1f7 walk() docs: Worked "walking" into the description and the text. Added
a brief example where bottom-up walking is essential.
2003-04-28 02:09:43 +00:00
Fred Drake 2194a4eede markup adjustments 2003-04-25 14:50:06 +00:00
Tim Peters c4e0940042 New generator os.walk() does a bit more than os.path.walk() does, and
seems much easier to use.  Code, docs, NEWS, and additions to test_os.py
(testing this sucker is a bitch!).
2003-04-25 07:11:48 +00:00
Tim Peters 2d1c846b73 Clarified new fsync() docs. 2003-04-23 19:47:14 +00:00
Tim Peters 11b2306960 Enable os.fsync() for Windows, mapping it to MS's _commit() there. The
docs here are best-guess:  the MS docs I could find weren't clear, and
some even claimed _commit() has no effect on Win32 systems (which is
easily shown to be false just by trying it).
2003-04-23 02:39:17 +00:00
Fred Drake 5c7b2487cd - explain what a UNC path is in the makedirs() description, since
they're actually mentioned there
- remove some extraneous paragraph separations
- \versionadded --> \versionchanged in one place
2003-03-20 17:39:38 +00:00
Just van Rossum 96b1c903f5 Patch #683592 revisited, after discussions with MvL:
- Implement the behavior as specified in PEP 277, meaning os.listdir()
  will only return unicode strings if it is _called_ with a unicode
  argument.
- And then return only unicode, don't attempt to convert to ASCII.
- Don't switch on Py_FileSystemDefaultEncoding, but simply use the
  default encoding if Py_FileSystemDefaultEncoding is NULL. This means
  os.listdir() can now raise UnicodeDecodeError if the default encoding
  can't represent the directory entry. (This seems better than silcencing
  the error and fall back to a byte string.)
- Attempted to decribe the above in Doc/lib/libos.tex.
- Reworded the Misc/NEWS items to reflect the current situation.

This checkin also fixes bug #696261, which was due to os.listdir() not
using Py_FileSystemDefaultEncoding, like all file system calls are
supposed to.
2003-03-03 17:32:15 +00:00
Skip Montanaro 117910dc44 Migrate definitions of several platform-dependent path-related variables
into the relevant path modules.  See patch #686397.
2003-02-14 19:35:31 +00:00
Fred Drake 002a5de202 extsep description:
- avoid "e.g." in text
- record version information
(should be backported)
2003-02-14 06:39:37 +00:00
Skip Montanaro 47e46e2347 add missing description of os.extsep 2003-02-14 05:45:31 +00:00
Neal Norwitz 2b09bc4d57 Fix SF bug #675259, os.environ leaks under FreeBSD and Mac OS X
Even with the extra work to cleanup the env, *BSD still leaks.  Add a note.

Will backport.
2003-02-07 02:27:36 +00:00
Andrew M. Kuchling 4b37364fc8 Bug #678077: Suggest alternative to os.getlogin() 2003-02-03 15:36:26 +00:00
Barry Warsaw b6604b3e69 Document EX_OK and friends. 2003-01-07 22:43:25 +00:00
Raymond Hettinger 9f5b07dd92 SF bug #592859: os.chmod is underdocumented
Document constants for permission bits.
2003-01-06 13:31:26 +00:00
Neal Norwitz 6d23b170cf Fix a typo 2003-01-05 22:20:51 +00:00
Martin v. Löwis 33e94437ca Document killpg. 2002-12-27 10:21:19 +00:00
Martin v. Löwis 438b534ad0 Patch #657889: Implement posix.getloadavg. 2002-12-27 10:16:42 +00:00
Fred Drake 08d10f985e Typo: "dead lock" --> "deadlock" 2002-12-06 16:45:05 +00:00
Fred Drake 4b9ed2f346 Clarified documentation of tempnam().
Closes SF bug #635656.
2002-11-12 22:07:11 +00:00
Fred Drake b5f41dedeb Minor markup adjustments. 2002-11-07 17:13:03 +00:00
Thomas Heller 5b470e0a3a Document the changed fdopen behaviour.
(Hope the markup is ok).
2002-11-07 16:33:44 +00:00
Martin v. Löwis f607bdaa77 Add PyStructSequence_UnnamedField. Add stat_float_times.
Use integers in stat tuple, optionally floats in named fields.
2002-10-16 18:27:39 +00:00
Martin v. Löwis 36a4d8c20e Remove mentionings of DOS. 2002-10-10 18:24:54 +00:00
Martin v. Löwis dbe3f76270 Patch #569139: Implementation of major, minor and makedev. 2002-10-10 14:27:30 +00:00
Martin v. Löwis a844f2d165 Document patch #594001. 2002-10-05 09:46:48 +00:00
Martin v. Löwis a32c994129 Always generate floats for stat_result; fix configure test. 2002-09-09 16:17:47 +00:00
Martin v. Löwis 94717ed1d4 Patch #606592: Subsecond timestamps in stat_result. 2002-09-09 14:24:16 +00:00
Raymond Hettinger 3cfdc3402e Documented os.fsync and os.fdatasync. Closes SF bug 584695. 2002-08-07 15:48:17 +00:00
Martin v. Löwis 0cec0ffc78 Patch #573770: Implement lchown. 2002-07-28 16:33:45 +00:00
Jeremy Hylton 403e351dfc Flesh out description of getlogin() and recommend against using it. 2002-07-24 15:32:25 +00:00
Fred Drake 2c22e85ae7 Attempt to clarify removedirs().
Based on SF bug #574773.
2002-07-02 21:03:49 +00:00
Fred Drake 9ea01d415f Add description of the deadlock problem with child processes and pipes, and
hints about how to work around it.
Closes SF bug #530637.
2002-06-18 20:30:37 +00:00
Fred Drake 7f59124693 Clarified documentation for os.access().
Patch contributed by Sean Reifschneider.
Closes SF patch #570618.
2002-06-18 16:15:51 +00:00
Neal Norwitz cc5c6947a6 Add "version added" for getpgid 2002-06-13 21:19:25 +00:00
Martin v. Löwis 606edc1d97 Patch #568235: Add posix.setpgid. 2002-06-13 21:09:11 +00:00
Guido van Rossum db9198a8b5 SF bug 563750 (Alex Martelli): posix_tmpfile():
The file returned by tmpfile() has mode w+b, so use that in the call
to PyFile_FromFile().

Bugfix candidate.
2002-06-10 19:23:22 +00:00
Fred Drake 1f89e2abcc Fix markup error that suppressed space.
Closes SF bug #554257.  Not relevant to older releases.
2002-05-10 12:37:56 +00:00
Fred Drake a65375c3e3 Explain what os.read() returns at end of file.
This closes SF bug #550409.  Applying to release21-maint & release22-maint.
2002-05-01 03:31:42 +00:00
Fred Drake d3e6678713 Slightly expand and clarify the differences between getegid(), getgid(),
getpgrp(), and setpgid().
This closes SF bug #547939.
2002-04-26 20:59:40 +00:00
Fred Drake 106c1a0e7a WCOREDUMP(), WIFCONTINUED(), WCONTINUED, WUNTRACED: New.
isatty(), WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(): Changed to return
    bools instead of ints.
2002-04-23 15:58:02 +00:00
Fred Drake e19a5bcc7b Be consistent in presenting the signatures. 2002-04-15 19:46:40 +00:00
Fred Drake 154985587b Add docs for os.fchdir(). 2002-04-15 19:41:27 +00:00
Martin v. Löwis 06a83e90aa Patch #543447: Add posix.mknod. 2002-04-14 10:19:44 +00:00
Fred Drake 4dfb7a81c1 Explain that os.spawn*() return the process handle on Windows.
Clarify that os.waitpid() on Windows takes a process handle, not a process ID.
This closes SF bug #537582.
2002-04-01 23:30:47 +00:00
Tim Peters ab034fab03 Implement os.waitpid() for Windows, in a way that's compatible with Linux
where their capabilities intersect.  Would be nice if people using non-
MSVC compilers (Borland etc) took a whack at doing something similar for
them (this code relies on the MS _cwait function).
2002-02-01 11:27:43 +00:00
Tim Peters c48a3ca161 Add new constants usable with os.popen() on Windows.
NOTE:  this seems a mess wrt which symbols are available on which
platforms.  I can't fix it, but I didn't add to it <wink>, and
included an XXX comment about names claimed to be available on
Windows that aren't.  If anyone can figure out the whole ugly truth,
I'm sure a better organization will suggest itself.
2002-01-30 05:49:46 +00:00
Fred Drake 5c7983113c Add a reference to the signal module to the os.kill() description.
This closes SF bug #495609.
2001-12-21 03:58:47 +00:00
Fred Drake 8c8e871530 Fix the availability statement for the spawn*() functions to reflect the
actual availability on Windows.
This fixes SF bug #495191.
2001-12-20 17:24:11 +00:00
Tim Peters b404145936 s/it/if/ in descriptions of spawn mode argument. 2001-12-06 23:37:17 +00:00
Fred Drake 6995bb61b6 Various cleanups & markup fixes, mostly relating to the stat and statvfs
result object changes.
2001-11-29 20:48:44 +00:00
Fred Drake c37b65ee10 Clean up some markup cruft. A number of the macros that take no
parameters (like \UNIX) are commonly entered using an empty group to
separate the markup from a following inter-word space; this is not
needed when the next character is punctuation, or the markup is the
last thing in the enclosing group.  These cases were marked
inconsistently; the empty group is now *only* used when needed.
2001-11-28 07:26:15 +00:00
Fred Drake db7287c0f5 Straighten out the exec*() function descriptions a bit, and clarify a few
points in the spawn*() description.
2001-10-18 18:58:30 +00:00
Martin v. Löwis c405133fce Elaborate on types and meaning of the setgroups arguments. 2001-10-18 14:07:12 +00:00
Martin v. Löwis 61c5edf6fc Expose setgroups. Fixes feature request #468116. 2001-10-18 04:06:00 +00:00
Fred Drake 938a8d723c Improve the documentation for the os.P_* constants used with the os.spawn*()
functions to include information about how they affect the operation of
those functions when used as the "mode" parameter.
This closes SF bug #468384.

Added warnings to the os.tempnam() and os.tmpnam() functions regarding their
security problem.  These warning mirror the warnings added to the runtime
by Skip Montanaro.
2001-10-09 18:07:04 +00:00
Martin v. Löwis 244edc8985 Add chroot call. Implements feature #459267. 2001-10-04 22:44:26 +00:00
Fred Drake bbf7a407e8 Added note about non-support of UNC paths on Windows.
This fixes SF bug #465447.
2001-09-28 16:14:18 +00:00
Fred Drake 098d7fae39 Document clearly that the only way to retrieve the return code from the
child processes is to use the Popen3 and Popen4 classes.
This fixes SF bug #460512.
2001-09-11 19:56:51 +00:00
Fred Drake 739282da83 Re-write the description of the os.spawn*() functions, and cover the
whole family instead of just two.


This closes SF bug #451630.
2001-08-16 21:21:28 +00:00
Fred Drake 8a2adcf812 Typo: Added missing "if".
This is part of SF patch #442788.
2001-07-23 19:20:56 +00:00
Fred Drake efaef13c81 Update the availability information for os.tempnam(), os.tmpfile(), and
os.tmpnam().
2001-07-17 20:39:18 +00:00
Fred Drake 8ee679f0ce Minor changes to match the style guide. 2001-07-14 02:50:55 +00:00
Fred Drake 907e76b620 Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.
2001-07-06 20:30:11 +00:00
Fred Drake 0b9bc20e66 Add the appropriate availability annotations for the popen*() family of
functions -- these are not available on traditional Mac OS platforms.

Corrected the version annotations for the spawn*() functions and related
constants; these were added in Python 1.6, not 1.5.2.
2001-06-11 18:25:34 +00:00
Fred Drake 046f4d810d Fixed parameter order for os.popen2(), os.popen3(), and os.popen(4). Added
a reference to these functions and popen() from the "Process Management"
section.

Based on a suggestion from comp.lang.python.
2001-06-11 15:21:48 +00:00
Skip Montanaro b9d973dac5 is -> if in rename description 2001-06-04 15:31:17 +00:00
Fred Drake 81e142b907 Document os.getenv().
This closes SF bug #429059.
2001-05-31 20:27:46 +00:00
Fred Drake dc9e7e42c8 readlink() description: Added note that the return value may be either
absolute or relative.

remove(), rename() descriptions:  Give more information about the cross-
    platform behavior of these functions, so single-platform developers
    can be aware of the potential issues when writing portable code.

This closes SF patch #426598.
2001-05-29 18:13:06 +00:00
Fred Drake 4a152630ca Capitalize first letter of an explanation for a \versionchanged
annotation.
2000-10-19 05:33:46 +00:00
Fred Drake 21c9df7641 For os.stat() & friends, note that the time fields are returned as
floating-point values.
2000-10-14 05:46:11 +00:00
Fred Drake c71c23e392 Added \versionchanged comment to os.popen() noting that it was unreliable
in earlier versions of Python; this is useful information for people
interested in writing code that is portable across Python versions.

Suggested by Peter Funk <pf@artcom-gmbh.de>.
2000-10-04 13:57:27 +00:00
Fred Drake 1319e3ecbc Remove old note that os.popen() on Windows is unreliable; this is no
longer true.
2000-10-03 17:14:27 +00:00
Fred Drake 4ce4f2eedd os.startfile() documentation, based on text from Tim Peters. 2000-09-29 04:15:19 +00:00
Fred Drake 8a9db99760 Updated documentation relating to the various flavors of popen[234]()
for Windows & Unix.
2000-09-28 20:27:51 +00:00
Fred Drake 7be3115860 Added explanation of the use of the first program argument passed to the
exec*() family of functions.
2000-09-23 05:22:07 +00:00
Fred Drake 3ac977e39c O_BINARY: Documented this constant; omission noted by David Ascher.
access():  Corrected availability statement; error pointed out by
           Tim Peters.
2000-08-11 20:19:51 +00:00
Skip Montanaro d372521ec0 added doc for isatty() 2000-07-19 17:30:58 +00:00
Thomas Wouters f8316638af Rob W. W. Hooft's spelling fixes for the Library Reference. I hope
SourceForge doesn't choke on this batch :-)

I'm not entirely sure this is 100% correct. The patch changes an
\index{persistency} to \index{presistence}, and I don't know what \index{}
does. But it seems to do so persi--er, consistently, so I hope it isn't a
problem.
2000-07-16 19:01:10 +00:00
Andrew M. Kuchling 8d2f2b2db2 From Sam Rushing's Medusa, via SF patch #100858: add & document
os.seteuid(), os.setegid(), os.setreuid(), os.setregid().
2000-07-13 01:26:58 +00:00
Fred Drake 30f76ffd00 Update version numbering from 1.6 to 2.0. 2000-06-30 16:06:19 +00:00
Fred Drake c82634c13c Thomas Wouters <thomas@xs4all.net>:
Documentation updates related to the addition of openpty() and forkpty().
2000-06-28 17:27:48 +00:00
Fred Drake e06d025e00 Use \versionchanged to indicate when the second parameter to utime()
was allowed to be None.
2000-05-02 17:29:35 +00:00
Barry Warsaw 93a8eacde5 Document the new additional signature for utime(). In addition to the
previous functionality utime(path, (atime, mtime)), now allowed is
utime(path, None) which sets the file's times to the current time.
2000-05-01 16:18:22 +00:00
Fred Drake 38e5d27cae Merged changes from the 1.5.2p2 release.
(Very rough.)
2000-04-03 20:13:55 +00:00
Fred Drake 15861b2a41 Update portability information for the spawn*() functions and related
constants.  Someone will need to fill in information on the spawn*()
functions that aren't listed.
2000-02-29 05:19:38 +00:00
Fred Drake 88f6ca2ce9 Document getgroups(), getlogin(), fpathconf(), pathconf(),
pathconf_names, confstr(), confstr_names, sysconf(), sysconf_names.
1999-12-15 19:39:04 +00:00