python 2.7.12 on Linux behaving differently than on Windows

BartC bc at freeuk.com
Wed Dec 7 09:57:23 EST 2016


On 07/12/2016 12:39, Chris Angelico wrote:
> On Wed, Dec 7, 2016 at 10:54 PM, BartC <bc at freeuk.com> wrote:
>> But if a program existed that took N filename parameters with the purpose of
>> deleting each of them, then it can't tell if they were typed in individually
>> (so indicating a stronger intent), or whether a finger slipped on a single
>> filename and a "*" was added, in which case it could choose to ask for
>> confirmation *if* it saw that this is a wildcard).
>>
>> 'Globbing' (if that means auto expansion) is taking away choice.
>
> And app globbing takes away choice, too. How would you, with the
> Windows 'del' command, remove a single file that has a question mark
> in the name? Or are you depending entirely on the fact that Windows
> doesn't let you do that? Here's some of my music collection:

I don't follow you. "?" is problematical on both systems. I think 
Windows disallows it completely: I get 'Protocol error' if I copy such a 
file from Linux to Windows. Presumably there is an escaping system, but 
I don't know what it is.

But we're talking about Linux. Obviously if a program is developed on 
Linux, can work on multiple files and DEPENDS on on being presented with 
that list of files as though it had been invoked as:

   program file1 file2 file3 file4 file5 file6 file7 .... fileN

then it will have problems if that feature is taken away. I can see how 
it can still be there after all these years!

-- 
Bartc



More information about the Python-list mailing list