On Wed, Oct 1, 2008 at 1:05 AM, Simon Cross
<[EMAIL PROTECTED]> wrote:
> On Wed, Oct 1, 2008 at 12:04 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>> Plus, even on Linux Unicode is *usually* what you should be doing,
>> unless you're writing a backup tool.
>
> I still find this line of reasoning
Simon Cross writes:
> a) There is some chance that at least ASCII characters will be
> displayed correctly if getfilesystemencoding() is similar to the
> encoding used and corrupted filenames will display correctly except
> for corrupted characters.
All you're saying is that the cases *you* c
On Wed, Oct 1, 2008 at 12:25 PM, Stephen J. Turnbull <[EMAIL PROTECTED]> wrote:
> Simon Cross writes:
>
> > I still find this line of reasoning a bit worrying. Imagine an end
> > user application like a music player. The user discovers that he can't
> > see some .mp3 or .ogg file from the music
Simon Cross writes:
> I still find this line of reasoning a bit worrying. Imagine an end
> user application like a music player. The user discovers that he can't
> see some .mp3 or .ogg file from the music player that is visibile is
> the file manager. I would expect him to file a bug on the m
On Wed, Oct 1, 2008 at 12:04 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Plus, even on Linux Unicode is *usually* what you should be doing,
> unless you're writing a backup tool.
I still find this line of reasoning a bit worrying. Imagine an end
user application like a music player. The user
On Wed, Oct 1, 2008 at 12:05 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Actually on Windows the syscalls use the encoding that Microsoft uses
> -- when using bytes we use the Windows bytes API and when using str we
> use the Windows wide API. That's the most platform-compatible
> approach.
On Tue, Sep 30, 2008 at 12:07 PM, Simon Cross
<[EMAIL PROTECTED]> wrote:
> On Tue, Sep 30, 2008 at 7:56 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>> (since os.getcwdb() is a Unix-only thing).
>
> I would be happier if all the Unix byte functions existed on Windows
> fell back to something lik
On Tue, Sep 30, 2008 at 11:47 AM, <[EMAIL PROTECTED]> wrote:
>
> On 05:56 pm, [EMAIL PROTECTED] wrote:
>>
>> On Tue, Sep 30, 2008 at 10:59 AM, <[EMAIL PROTECTED]> wrote:
>>>
>>> On 02:32 pm, [EMAIL PROTECTED] wrote:
>
>>> In the absence of a 2.6 getcwdb, perhaps the fixer could just drop the
>>>
On Tue, Sep 30, 2008 at 7:56 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> (since os.getcwdb() is a Unix-only thing).
I would be happier if all the Unix byte functions existed on Windows
fell back to something like encoding the filenames to/from UTF-8. Then
at least it would be possible for pr
On 05:56 pm, [EMAIL PROTECTED] wrote:
On Tue, Sep 30, 2008 at 10:59 AM, <[EMAIL PROTECTED]> wrote:
On 02:32 pm, [EMAIL PROTECTED] wrote:
In the absence of a 2.6 getcwdb, perhaps the fixer could just drop the
"benefit of the doubt" case? It could always be added to 2.7, and the
parity relea
On Tue, Sep 30, 2008 at 10:59 AM, <[EMAIL PROTECTED]> wrote:
> On 02:32 pm, [EMAIL PROTECTED] wrote:
>> If 2.6 weren't pretty much released already I'd ask to add
>> os.getcwdb() there, as an alias for os.getcwd(), and add a 2to3 fixer
>> that converts os.getcwdu() to os.getcwd(), leaves os.getcwd
On 02:32 pm, [EMAIL PROTECTED] wrote:
On Tue, Sep 30, 2008 at 6:21 AM, <[EMAIL PROTECTED]> wrote:
On 12:47 am, [EMAIL PROTECTED] wrote:
It sounds like maybe there should be some 2to3 fixers in here
somewhere,
too? Not necessarily as part of this patch, but somewhere related? I
don't
know
Victor Stinner <[EMAIL PROTECTED]> wrote:
> - listdir(unicode) -> only unicode, *skip* invalid filenames
>(as asked by Guido)
Is there an option listdir(bytes) which will return *all* filenames (as
byte sequences)? Otherwise, this seems troubling to me; *something*
should be returned for f
On Tue, Sep 30, 2008 at 6:21 AM, <[EMAIL PROTECTED]> wrote:
> On 12:47 am, [EMAIL PROTECTED] wrote:
>
> This is the most sane contribution I've seen so far :).
Thanks. I'll review it later today (after coffee+breakfast :) and will
apply it assuming the code is reasonably sane, otherwise I'll go
a
Hi,
> This is the most sane contribution I've seen so far :).
Oh thanks.
> Do I understand properly that (listdir(bytes) -> bytes)?
Yes, os.listdir(bytes)->bytes. It's already the current behaviour.
But with Python3 trunk, os.listdir(str) -> str ... or bytes (if unicode
conversion fails).
>
On 12:47 am, [EMAIL PROTECTED] wrote:
This is the most sane contribution I've seen so far :).
See attached patch: python3_bytes_filename.patch
Using the patch, you will get:
- open() support bytes
- listdir(unicode) -> only unicode, *skip* invalid filenames
(as asked by Guido)
Forgive me fo
On Mon, Sep 29, 2008 at 5:47 PM, Victor Stinner
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> See attached patch: python3_bytes_filename.patch
>
Patches should go on the tracker, not the mailing list. Otherwise it
will just get lost.
-Brett
___
Python-Dev mailin
Hi,
See attached patch: python3_bytes_filename.patch
Using the patch, you will get:
- open() support bytes
- listdir(unicode) -> only unicode, *skip* invalid filenames
(as asked by Guido)
- remove os.getcwdu()
- create os.getcwdb() -> bytes
- glob.glob() support bytes
- fnmatch.filter()
18 matches
Mail list logo