Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: John Ames Newsgroups: comp.unix.shell,comp.unix.programmer,comp.lang.misc Subject: Re: Python (was Re: I did not inhale) Date: Mon, 19 Aug 2024 13:30:05 -0700 Organization: A noiseless patient Spider Lines: 27 Message-ID: <20240819133005.00003757@gmail.com> References: <20240412094809.811@kylheku.com> <87il0mm94y.fsf@tudado.org> <87il0lldf8.fsf@tudado.org> <20240815182717.189@kylheku.com> <87jzgccltj.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Mon, 19 Aug 2024 22:30:11 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8b77fd0b831509694e5900a56f16b867"; logging-data="3165884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18rVXQLSVJCGgm2U9JtDK5w+wffcgp8Wnc=" Cancel-Lock: sha1:wEzCOQUsZY+1vh9DApA+VC25WdE= X-Newsreader: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32) Bytes: 3136 On Mon, 19 Aug 2024 13:14:00 -0700 Keith Thompson wrote: > I happen to be typing this on a Windows laptop (via ssh to another > system). The system drive is called "C:", and I don't know of any > other name by which I can refer to it. If I examine its properties > in Windows Explorer, it appears to have the label "Acer", but that's > not the "messy string with lots of backslashes" you referred to. > > It strikes me that "C:" is the drive's "official" name in any > reasonable sense of the word. > > What API are you referring to, what can I expect it to give me as the > "official" name of my C: drive, and what could I do with that name? NT has its own low-level scheme for identifying devices/representing file paths. If you're curious, someone at the Google compound did a write-up on it some years back: https://googleprojectzero.blogspot.com/2016/02/the-definitive-guide-on-win32-to-nt.html For most practical purposes, users and user-level application software pretty much never see this or have to think about it - but it *is* there, and it does cause strange corner-case behavior sometimes. (I'm pretty sure the underlying reason why cmd.exe sometimes cannot access network shares mapped to a conventional drive letter has to do with this, f'rinstance.)