pygame / docs / filepaths.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>File Path Function Arguments &mdash; Pygame v1.9.2 documentation</title>
    <link rel="stylesheet" href="_static/pygame.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
        URL_ROOT:    '',
        VERSION:     '1.9.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/pygame.ico"/>
    <link rel="top" title="Pygame v1.9.2 documentation" href="index.html" />
    <link rel="prev" title="pygame.transform" href="ref/transform.html" /> 

    <div class="document">

  <div class="header">
	<td class="logo">
	  <a href="">
	    <img src="_static/pygame_tiny.png"/>
	  <h5>pygame documentation</h5>
	<td class="pagelinks">
	  <p class="top">
	    <a href="">Pygame Home</a> ||
	    <a href="index.html">Help Contents</a> ||
	    <a href="genindex.html">Reference Index</a> ||
	  <p class="bottom">
	    <a href="ref/camera.html">camera</a> || 
	    <a href="ref/cdrom.html">cdrom</a> || 
	    <a href="ref/color.html">Color</a> || 
	    <a href="ref/cursors.html">cursors</a> || 
	    <a href="ref/display.html">display</a> || 
	    <a href="ref/draw.html">draw</a> || 
	    <a href="ref/event.html">event</a> || 
	    <a href="ref/examples.html">examples</a> || 
	    <a href="ref/font.html">font</a> || 
	    <a href="ref/freetype.html">freetype</a> || 
	    <a href="ref/gfxdraw.html">gfxdraw</a> || 
	    <a href="ref/image.html">image</a> || 
	    <a href="ref/joystick.html">joystick</a> || 
	    <a href="ref/key.html">key</a> || 
	    <a href="ref/locals.html">locals</a> || 
	    <a href="ref/mask.html">mask</a> || 
	    <a href="ref/math.html">math</a> || 
	    <a href="ref/midi.html">midi</a> || 
	    <a href="ref/mixer.html">mixer</a> || 
	    <a href="ref/mouse.html">mouse</a> || 
	    <a href="ref/movie.html">movie</a> || 
	    <a href="ref/music.html">music</a> || 
	    <a href="ref/overlay.html">Overlay</a> || 
	    <a href="ref/pixelarray.html">PixelArray</a> || 
	    <a href="ref/pixelcopy.html">pixelcopy</a> || 
	    <a href="ref/pygame.html">pygame</a> || 
	    <a href="ref/rect.html">Rect</a> || 
	    <a href="ref/scrap.html">scrap</a> || 
	    <a href="ref/sndarray.html">sndarray</a> || 
	    <a href="ref/sprite.html">sprite</a> || 
	    <a href="ref/surface.html">Surface</a> || 
	    <a href="ref/surfarray.html">surfarray</a> || 
	    <a href="ref/tests.html">tests</a> || 
	    <a href="ref/time.html">time</a> || 
	    <a href="ref/transform.html">transform</a> || 
	    <a href="ref/pygame.html#module-pygame.version">version</a>

      <div class="documentwrapper">
          <div class="body">
  <div class="sectionwrapper">
<div class="section" id="file-path-function-arguments">
<div class="section" id="id1">
<h2>File Path Function Arguments<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<p>A Pygame function or method which takes a file path argument
will accept either an Unicode or a byte — 8-bit or ASCII character — string.
Unicode strings are translated to Python&#8217;s default file system encoding,
as returned by sys.getfilesystemencoding().
An Unicode code point above U+FFFF — &#8217;uFFFF&#8217; — can
be coded directly with a 32-bit escape
sequences — &#8217;Uxxxxxxxx&#8217; — ,
even for Python interpreters built with an UCS-2 (16-bit character) unicode type.
Byte strings are passed to the operating system unchanged.</p>
<p>Null characters — &#8217;x00&#8217; —
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.</p>

      <div class="clearer"></div>
    <div class="related">
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
        <li class="right" >
          <a href="ref/transform.html" title="pygame.transform"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Pygame v1.9.2 documentation</a> &raquo;</li>
    <script type="text/javascript" src="jquery.plugin.docscomments.js"></script>

    <div class="footer">
        &copy; Copyright 2011, Pygame Developers.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.