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/2011-January/107567.html below:

[Python-Dev] r88121 - python/branches/py3k/Doc/whatsnew/3.2.rst

[Python-Dev] r88121 - python/branches/py3k/Doc/whatsnew/3.2.rst [Python-Dev] r88121 - python/branches/py3k/Doc/whatsnew/3.2.rstGeorg Brandl g.brandl at gmx.net
Fri Jan 21 08:33:48 CET 2011
Am 20.01.2011 10:04, schrieb raymond.hettinger:

> +os
> +--
> +
> +Different operating systems use various encodings for filenames and environment
> +variables.  The :mod:`os` module provides two new functions,
> +:func:`~os.fsencode` and :func:`~os.fsdecode`, for encoding and decoding
> +filenames:
> +
> +>>> filename = 'словарь'
> +>>> os.fsencode(filename)
> +b'\xd1\x81\xd0\xbb\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x80\xd1\x8c'
> +>>> open(os.fsencode(filename))

Please do not include Cyrillic characters directly in the source -- it breaks
the LaTeX PDF build.  A non-ascii name from the latin-1 range should be fine.

Georg

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