Re: Feedback wanted on programming introduction (Python in Windows)



On Fri, 30 Oct 2009 03:26:45 -0000, Alf P. Steinbach <alfps@xxxxxxxx> wrote:

* Rhodri James:
On Thu, 29 Oct 2009 16:53:05 -0000, Alf P. Steinbach <alfps@xxxxxxxx> wrote:
with the best knowledge of the program's environment, is unable to handle (such as delete) files or folders with paths greater than some 260 characters, is unable to handle filenames that differ only in case and are in the same directory, and is unable to e.g. delete a folder called "con" -- although such files & folders can very easily be created.
You may or may not be aware that some of these things are limitations of
the underlying disc format,

Sorry no, it isn't.

Even assuming you meant the more reasonable "file system", no, it isn't.

Actually I should have mentioned the filing system as well as the disc
format (which does matter). I may not be using correct Windows terminology,
since I'm referring to both the bytes on hardware and the software stack
that terminates in the OS API.

Still, colour me surprised. I had assumed that NTFS had some (large)
limit on filenames, and 256 sounded plausible. More to the point, I
was under the impression that path manipulation logic in the filing
system had limited sized buffers, which were the cause of this fault,
and that Exploder's only sin was not programming around the bug. In
fact, the more I think about it, the more sure I am that I've had to
play silly buggers on the command line myself to get around this.

Depending on the file system a program may be unable to create such things as I mentioned. And depending on the program design it may be reasonable to refuse to create them.

But a program should have no trouble deleting the files etc. once they're there.

Your faith is touching, but fundamentally misplaced.

That's why the Windows API handles them just fine, while Windows Explorer does not. You may consider, since you're unfamiliar with the API, that mostly it's no problem doing these things in the command interpreter, which has no special support (rather, the reason it's easy is because it doesn't properly check command arguments). And from that you can deduce that the API support is there.

Having stuffed this up many, many years ago, my recollection is that
it needed a certain deviousness to get around. In the case of the long
path names, my deduction from comparing the behaviours of the command
line and Explorer was that the API limited the path name length, and
Explorer didn't use relative paths to get around it. I find it hard
to call that a bug, when it's only really exposing a limitation of the
underlying FS.

For example, for general tool usage in Windows the student needs to know about levels of environment variable specifications and file associations, which in turn requires knowledge of processes and the Windows registry database and various commands.
Mercifully this is rubbish. For most purposes with most tools even
Windows users don't need to know much if anything about environment
variables and the registry. Needing to know anything about the
registry is usually a sign that Windows has stuffed you up royally.

I deduce that you mainly use IDEs and don't know about the things you're commenting on here (more than you did above). Sorry, but there it is.

You deduce incorrectly. I'd unbend enough to admit that setting
environment variables is frequently very useful to inveterate command-
line users like myself, and that Windows makes that a lot harder than
necessary, but your original statement still reads like scaremongering.

Why am I defending Windows again?

--
Rhodri James *-* Wildebeest Herder to the Masses
.



Relevant Pages

  • Re: Feedback wanted on programming introduction (Python in Windows)
    ... But what's important is that that's also the API level limit. ... Windows Explorer fails to handle them. ... So in what you quoted above I used "should" in the sense of the ideal to strive for, and illustrated the harsh reality that it currently isn't that way, by the concrete Windows Explorer example. ... You may consider, since you're unfamiliar with the API, that mostly it's no problem doing these things in the command interpreter, which has no special support. ...
    (comp.lang.python)
  • Re: Cannot delete file with name ended with a dot.
    ... receive the message "File Not Found" (from command prompt I cannot see the ... The operating system is Windows 2008 server standard x64. ... A little background on undeletable files and folders: ... files to it but use characters in the name that FTP supports (ASCII ...
    (microsoft.public.windows.server.general)
  • Success
    ... secure Windows, IIS, IE, Outlook Express ... >different upload and download folders. ... >Third party FTP software, or OpenSSH, or VPN can be used ... >1) Use a "DOS" Command Prompt for the steps below. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Idiot_self+trojans+administrative privs = Disaster
    ... What I do in cases like this is to get a good command line virus scanner, put it on a flash drive, and boot the machine from a WinPE CD. ... Once the machine is at the command prompt, I empty all the temp folders for all user profiles and in windows, as well as the temporary internet files/content.ie5 folders. ...
    (Security-Basics)
  • Re: Print a list of Folders, Subfolders & Filenames in a specific driv
    ... Add a "Print Directory" Feature for Folders in Windows XP ... You can use the dir command and send the output to a text file. ... Hit your Enter key. ...
    (microsoft.public.windowsxp.general)