A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-April/089099.html below:

[Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces

[Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces [Python-Dev] PEP 383: Non-decodable Bytes in System Character Interfaces"Martin v. Löwis" martin at v.loewis.de
Tue Apr 28 05:50:11 CEST 2009
>> I don't understand what you're saying. py3k filenames are all
>> unicode, even on POSIX systems, 
> 
> 
> How is that possible on POSIX systems where the underlying file system 
> uses bytes for filenames?
> 
> If I write a piece of Python code:
> 
>     filename = 'some path/some name'
> 
> I might call it a filename, I might think of it as a filename, but it 
> *isn't*, it's a string in a Python program. It isn't a filename until 
> it hits the file system, and in POSIX systems that makes it bytes.

Python automatically encodes strings with the file system encoding
before passing them to the POSIX API.

Regards,
Martin

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4