Mailing List Archive

DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory)
First of all, please try to follow proper netiquette for posting. Your
lines should be 72 characters or less, and you should put your comments
after the quoted material:

In article <3787FB51.12FE0048@ssec.wisc.edu>,
Nick Bower <nick.bower@ssec.wisc.edu> wrote:
>
>yeah, that's what i originally thought. sure enough there were some
>updates in the os documentation, but not os.chdir. it's something that
>would be really helpfull if anyone linked to the documentation sees
>this.

Ah, I see what the problem is. I went to the index inside the library
reference to make sure os.chdir() was documented, but didn't check to
see *where* it was documented. Sure enough, it's documented inside the
"Process Parameters" section of os (6.1.1), rather than in the "Files
and Directories" section.

Fred, here's the URL that needs to be fixed:
http://www.python.org/doc/current/lib/os-procinfo.html

I think I understand how it happened: os.getcwd() is (probably
rightfully) documented there, so someone thought os.chdir() belonged
there, too. AFAICT, that's the only mistake in that area of the docs,
though I could make a case that os.getcwd() should be moved (or at least
have a pointer in "F&D").
--
--- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
First of all, please try to follow proper netiquette for posting. Your
lines should be 72 characters or less, and you should put your comments
after the quoted material:

In article <3787FB51.12FE0048@ssec.wisc.edu>,
Nick Bower <nick.bower@ssec.wisc.edu> wrote:
>
>yeah, that's what i originally thought. sure enough there were some
>updates in the os documentation, but not os.chdir. it's something that
>would be really helpfull if anyone linked to the documentation sees
>this.

Ah, I see what the problem is. I went to the index inside the library
reference to make sure os.chdir() was documented, but didn't check to
see *where* it was documented. Sure enough, it's documented inside the
"Process Parameters" section of os (6.1.1), rather than in the "Files
and Directories" section.

Fred, here's the URL that needs to be fixed:
http://www.python.org/doc/current/lib/os-procinfo.html

I think I understand how it happened: os.getcwd() is (probably
rightfully) documented there, so someone thought os.chdir() belonged
there, too. AFAICT, that's the only mistake in that area of the docs,
though I could make a case that os.getcwd() should be moved (or at least
have a pointer in "F&D").
--
--- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
Aahz Maruch writes:
> I think I understand how it happened: os.getcwd() is (probably
> rightfully) documented there, so someone thought os.chdir() belonged
> there, too. AFAICT, that's the only mistake in that area of the docs,
> though I could make a case that os.getcwd() should be moved (or at least
> have a pointer in "F&D").

Aahz,
Are you saying that (either of) these are in the wrong place? The
notion of "current directory" is tied only to the entry in the process
table; should it be documented otherwise?
The "Process Parameters" section contains functions with provide any
direct access to the process table entry, both queries and changes, so
I think it really is the right place for these two functions.
I can easily add a textual reference to the right place within the
"Files and Directories" section, but you'll need to explain very
clearly why the descriptions should be moved.


-Fred

--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
[posted & e-mailed]

In article <14217.63931.75257.566266@weyr.cnri.reston.va.us>,
Fred L. Drake <fdrake@acm.org> wrote:
>Aahz Maruch writes:
>>
>> I think I understand how it happened: os.getcwd() is (probably
>> rightfully) documented there, so someone thought os.chdir() belonged
>> there, too. AFAICT, that's the only mistake in that area of the docs,
>> though I could make a case that os.getcwd() should be moved (or at least
>> have a pointer in "F&D").
>
> Are you saying that (either of) these are in the wrong place? The
>notion of "current directory" is tied only to the entry in the process
>table; should it be documented otherwise?
> The "Process Parameters" section contains functions with provide any
>direct access to the process table entry, both queries and changes, so
>I think it really is the right place for these two functions.
> I can easily add a textual reference to the right place within the
>"Files and Directories" section, but you'll need to explain very
>clearly why the descriptions should be moved.

It depends how you define "wrong place". On the one hand, putting
os.chdir() and os.getcwd() in with the process parameters is a
*technically* correct decision, because they are associated with process
information. OTOH, someone who is not familiar with the way processes
work will *NOT* look in that section; zie would expect to find the
information with all the other functions dealing with files and
directories -- after all, on the surface layer, these two functions deal
with directories, not processes.

Given that one of Python's goals is to be accessible to non-CS geeks,
os.chdir() and os.getcwd() *must* be documented in the section dealing
with files and directories. As I said originally, I think a reasonable
compromise is to leave the process parameter docs alone and add a
pointer to that area in the files & directories docs (possibly with an
explanation of why they are documented somewhere else).
--
--- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
[Fred L. Drake]
> Are you saying that (either of) these [chdir, getcwd] are in the
> wrong place? The notion of "current directory" is tied only to the
> entry in the process table; should it be documented otherwise?
> The "Process Parameters" section contains functions with provide any
> direct access to the process table entry, both queries and changes, so
> I think it really is the right place for these two functions.
> I can easily add a textual reference to the right place within the
> "Files and Directories" section,

That would do!

> but you'll need to explain very clearly why the descriptions
> should be moved.

They don't have to be moved, provided they're also mentioned where people
first look <wink>. The notion that the current directory is "a process
table thing" is a bit Unix-centric, and e.g. a Windows person is more likely
to think of it as "a directory" first.

currently y'rs - tim
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
"Fred L. Drake" <fdrake@cnri.reston.va.us> writes:
| Aahz Maruch writes:
|> I think I understand how it happened: os.getcwd() is (probably
|> rightfully) documented there, so someone thought os.chdir() belonged
|> there, too. AFAICT, that's the only mistake in that area of the docs,
|> though I could make a case that os.getcwd() should be moved (or at least
|> have a pointer in "F&D").
|
| Aahz,
| Are you saying that (either of) these are in the wrong place? The
| notion of "current directory" is tied only to the entry in the process
| table; should it be documented otherwise?
| The "Process Parameters" section contains functions with provide any
| direct access to the process table entry, both queries and changes, so
| I think it really is the right place for these two functions.
| I can easily add a textual reference to the right place within the
| "Files and Directories" section, but you'll need to explain very
| clearly why the descriptions should be moved.

For what it's worth, me too: current working directory is a process
setting. It's relevant to files and directories, to be sure, but whoever
put chdir() and getcwd() in process parameters knew what he was doing.

Donn Cave, University Computing Services, University of Washington
donn@u.washington.edu
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
Aahz Maruch writes:
> Given that one of Python's goals is to be accessible to non-CS geeks,
> os.chdir() and os.getcwd() *must* be documented in the section dealing
> with files and directories. As I said originally, I think a reasonable
> compromise is to leave the process parameter docs alone and add a
> pointer to that area in the files & directories docs (possibly with an
> explanation of why they are documented somewhere else).

Tim Peters writes:
> They don't have to be moved, provided they're also mentioned where people
> first look <wink>. The notion that the current directory is "a process
> table thing" is a bit Unix-centric, and e.g. a Windows person is more likely
> to think of it as "a directory" first.

Well, after long consideration and a quick check the Guido, it turns
out that Guido thinks they should be moved to the "Files and
Directories" section. Since I disagree, I've contacted several local
bus companies to help in steering the course of future Python
development. Fortunately for Guido, bus drivers don't like those late
night jobs, so....
I'm going to move the descriptions to the "Files and Directories"
and add a link from "Process Parameters" to the actual descriptions.
Now, I'm going to start saving up for a bus of my own. Harumph. ;-)


-Fred

--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
Donn Cave writes:
> For what it's worth, me too: current working directory is a process
> setting. It's relevant to files and directories, to be sure, but whoever
> put chdir() and getcwd() in process parameters knew what he was doing.

I am vindicated!
Does this mean you'll make a contribution to my "Don't Brake for
Dutchmen" campaign? ;)


-Fred

--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
"Fred L. Drake" <fdrake@cnri.reston.va.us> writes:
| I am vindicated!
| Does this mean you'll make a contribution to my "Don't Brake for
| Dutchmen" campaign? ;)

Hm, I'd think twice about that if I were you - isn't "Guido" an Italian name?

Donn Cave, University Computing Services, University of Washington
donn@u.washington.edu
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
>>>>> "FLD" == Fred L Drake <fdrake@cnri.reston.va.us> writes:

FLD> Donn Cave writes:
>> For what it's worth, me too: current working directory is a
>> process setting. It's relevant to files and directories, to be
>> sure, but whoever put chdir() and getcwd() in process parameters
>> knew what he was doing.

FLD> I am vindicated!

By vindicated, I assume you mean that you and Donn are both twisted
old Unix geeks <wink>.

Jeremy
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
Jeremy Hylton writes:
> By vindicated, I assume you mean that you and Donn are both twisted
> old Unix geeks <wink>.

Jeremy,
Works for me! ;-)


-Fred

--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
Fred L. Drake <fdrake@cnri.reston.va.us> wrote:

: Donn Cave writes:
: > For what it's worth, me too: current working directory is a process
: > setting. It's relevant to files and directories, to be sure, but whoever
: > put chdir() and getcwd() in process parameters knew what he was doing.

: I am vindicated!

For what it's worth, I'm with you both.

-Arcege
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
Well, some trains don't care if you don't brake...

--

Emile van Sebille
emile@fenx.com
-------------------
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
In article <wfwi3.2961$VL2.372747@news.direcpc.com>,
Emile van Sebille <emile@fenx.com> wrote:
>
>Well, some trains don't care if you don't brake...

This train don't carry no gamblers, this train....
--
--- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
DOC BUG: os.chdir() (was Re: Simple Qu: Changing directory) [ In reply to ]
[Fred Drake, under process table duress]

> Well, after long consideration and a quick check the Guido, it turns
> out that Guido thinks they should be moved to the "Files and
> Directories" section. Since I disagree, I've contacted several local
> bus companies to help in steering the course of future Python
> development.

Fred, a good whore goes where he's kicked. Welcome to the stable <wink>.

a-python-pimp-won't-even-leave-you-a-dime-to-call-your-momma-ly y'rs - tim