File: filepaths.rst

package info (click to toggle)
pygame 1.9.4.post1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,412 kB
  • sloc: ansic: 54,632; python: 28,791; objc: 334; php: 92; sh: 76; makefile: 36; cpp: 25
file content (22 lines) | stat: -rw-r--r-- 1,053 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
File Path Function Arguments
============================

File Path Function Arguments
----------------------------

   A pygame function or method which takes a file path argument
   will accept either a Unicode or a byte — 8-bit or ASCII character — string.
   Unicode strings are translated to Python's default filesystem encoding,
   as returned by sys.getfilesystemencoding().
   A Unicode code point above U+FFFF — '\uFFFF' — can
   be coded directly with a 32-bit escape
   sequences — '\Uxxxxxxxx' — ,
   even for Python interpreters built with an UCS-2 (16-bit character) Unicode type.
   Byte strings are passed to the operating system unchanged.

   Null characters — '\x00' — 
   are not permitted in the path, raising an exception.
   An exception is also raised if an Unicode file path cannot be encoded.
   How UTF-16 surrogate codes are handled is Python-interpreter-dependent.
   Use UTF-32 code points and 32-bit escape sequences instead.
   The exception types are function-dependent.