1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\section{\module{os.path} ---
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								         Common pathname manipulations}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\declaremodule{standard}{os.path}
							 | 
						
					
						
							
								
									
										
										
										
											1998-07-23 17:59:49 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\modulesynopsis{Common pathname manipulations.}
							 | 
						
					
						
							
								
									
										
										
										
											1995-03-17 16:07:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								This module implements some useful functions on pathnames.
							 | 
						
					
						
							
								
									
										
										
										
											1998-05-14 15:16:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\index{path!operations}
							 | 
						
					
						
							
								
									
										
										
										
											1995-03-17 16:07:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-10-20 04:24:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\warning{On Windows, many of these functions do not properly
							 | 
						
					
						
							
								
									
										
										
										
											2001-09-28 16:14:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								support UNC pathnames.  \function{splitunc()} and \function{ismount()}
							 | 
						
					
						
							
								
									
										
										
										
											2001-10-20 04:24:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								do handle them correctly.}
							 | 
						
					
						
							
								
									
										
										
										
											2001-09-28 16:14:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{abspath}{path}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Return a normalized absolutized version of the pathname \var{path}.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								On most platforms, this is equivalent to
							 | 
						
					
						
							
								
									
										
										
										
											1999-10-18 14:10:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\code{normpath(join(os.getcwd(), \var{path}))}.
							 | 
						
					
						
							
								
									
										
										
										
											1999-03-17 22:25:11 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionadded{1.5.2}
							 | 
						
					
						
							
								
									
										
										
										
											1999-01-29 18:05:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{basename}{path}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Return the base name of pathname \var{path}.  This is the second half
							 | 
						
					
						
							
								
									
										
										
										
											2000-10-26 21:38:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								of the pair returned by \code{split(\var{path})}.  Note that the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								result of this function is different from the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\UNIX{} \program{basename} program; where \program{basename} for
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\code{'/foo/bar/'} returns \code{'bar'}, the \function{basename()}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								function returns an empty string (\code{''}).
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{commonprefix}{list}
							 | 
						
					
						
							
								
									
										
										
										
											2000-08-23 16:58:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return the longest path prefix (taken character-by-character) that is a
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								prefix of all paths in 
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\var{list}.  If \var{list} is empty, return the empty string
							 | 
						
					
						
							
								
									
										
										
										
											2000-08-23 16:58:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								(\code{''}).  Note that this may return invalid paths because it works a
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								character at a time.
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{dirname}{path}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Return the directory name of pathname \var{path}.  This is the first
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								half of the pair returned by \code{split(\var{path})}.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{exists}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if \var{path} refers to an existing path.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{expanduser}{path}
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Return the argument with an initial component of \samp{\~} or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\samp{\~\var{user}} replaced by that \var{user}'s home directory.  An
							 | 
						
					
						
							
								
									
										
										
										
											1998-05-14 15:16:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								initial \samp{\~{}} is replaced by the environment variable
							 | 
						
					
						
							
								
									
										
										
										
											1998-08-06 15:33:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\envvar{HOME}; an initial \samp{\~\var{user}} is looked up in the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								password directory through the built-in module
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\refmodule{pwd}\refbimodindex{pwd}.  If the expansion fails, or if the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								path does not begin with a tilde, the path is returned unchanged.  On
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								the Macintosh, this always returns \var{path} unchanged.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{expandvars}{path}
							 | 
						
					
						
							
								
									
										
										
										
											1994-04-21 10:32:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return the argument with environment variables expanded.  Substrings
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								of the form \samp{\$\var{name}} or \samp{\$\{\var{name}\}} are
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								replaced by the value of environment variable \var{name}.  Malformed
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								variable names and references to non-existing variables are left
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								unchanged.  On the Macintosh, this always returns \var{path}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								unchanged.
							 | 
						
					
						
							
								
									
										
										
										
											1994-04-21 10:32:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-19 17:54:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{getatime}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:38:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return the time of last access of \var{path}.  The return
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:11:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								value is a number giving the number of seconds since the epoch (see the 
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-19 17:54:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\refmodule{time} module).  Raise \exception{os.error} if the file does
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								not exist or is inaccessible.
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionadded{1.5.2}
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:11:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionchanged[If \function{os.stat_float_times()} returns True, the result is a floating point number]{2.3}
							 | 
						
					
						
							
								
									
										
										
										
											1998-07-24 20:49:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{getmtime}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:38:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return the time of last modification of \var{path}.  The return
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:11:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								value is a number giving the number of seconds since the epoch (see the 
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-01 20:20:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\refmodule{time} module).  Raise \exception{os.error} if the file does
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								not exist or is inaccessible.
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionadded{1.5.2}
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:11:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionchanged[If \function{os.stat_float_times()} returns True, the result is a floating point number]{2.3}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{getctime}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:38:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return the time of creation of \var{path}.  The return
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:11:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								value is a number giving the number of seconds since the epoch (see the 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\refmodule{time} module).  Raise \exception{os.error} if the file does
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								not exist or is inaccessible.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\versionadded{2.3}
							 | 
						
					
						
							
								
									
										
										
										
											1998-07-24 20:49:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-19 17:54:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{getsize}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-31 13:38:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return the size, in bytes, of \var{path}.  Raise
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-19 17:54:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\exception{os.error} if the file does not exist or is inaccessible.
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionadded{1.5.2}
							 | 
						
					
						
							
								
									
										
										
										
											1998-07-24 20:49:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{isabs}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if \var{path} is an absolute pathname (begins with a
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								slash).
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{isfile}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if \var{path} is an existing regular file.  This follows
							 | 
						
					
						
							
								
									
										
										
										
											1998-03-11 05:50:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								symbolic links, so both \function{islink()} and \function{isfile()}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								can be true for the same path.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{isdir}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if \var{path} is an existing directory.  This follows
							 | 
						
					
						
							
								
									
										
										
										
											1998-03-11 05:50:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								symbolic links, so both \function{islink()} and \function{isdir()} can
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								be true for the same path.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{islink}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if \var{path} refers to a directory entry that is a
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								symbolic link.  Always \code{False} if symbolic links are not supported.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{ismount}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if pathname \var{path} is a \dfn{mount point}: a point in
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								a file system where a different file system has been mounted.  The
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								function checks whether \var{path}'s parent, \file{\var{path}/..}, is
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								on a different device than \var{path}, or whether \file{\var{path}/..}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								and \var{path} point to the same i-node on the same device --- this
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								should detect mount points for all \UNIX{} and \POSIX{} variants.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{join}{path1\optional{, path2\optional{, ...}}}
							 | 
						
					
						
							
								
									
										
										
										
											1997-02-18 21:53:53 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Joins one or more path components intelligently.  If any component is
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								an absolute path, all previous components are thrown away, and joining
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								continues.  The return value is the concatenation of \var{path1}, and
							 | 
						
					
						
							
								
									
										
										
										
											2002-09-12 18:01:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								optionally \var{path2}, etc., with exactly one directory separator
							 | 
						
					
						
							
								
									
										
										
										
											2002-12-11 12:55:53 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								(\code{os.sep}) inserted between components, unless \var{path2} is
							 | 
						
					
						
							
								
									
										
										
										
											2002-09-12 18:01:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								empty.  Note that on Windows, since there is a current directory for
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								each drive, \function{os.path.join("c:", "foo")} represents a path
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								relative to the current directory on drive \file{C:} (\file{c:foo}), not
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\file{c:\textbackslash\textbackslash foo}.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{normcase}{path}
							 | 
						
					
						
							
								
									
										
										
										
											2001-11-28 07:26:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Normalize the case of a pathname.  On \UNIX, this returns the path
							 | 
						
					
						
							
								
									
										
										
										
											1998-02-18 14:00:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								unchanged; on case-insensitive filesystems, it converts the path to
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								lowercase.  On Windows, it also converts forward slashes to backward
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								slashes.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{normpath}{path}
							 | 
						
					
						
							
								
									
										
										
										
											1998-02-18 14:00:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Normalize a pathname.  This collapses redundant separators and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								up-level references, e.g. \code{A//B}, \code{A/./B} and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\code{A/foo/../B} all become \code{A/B}.  It does not normalize the
							 | 
						
					
						
							
								
									
										
										
										
											2000-04-03 20:13:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								case (use \function{normcase()} for that).  On Windows, it converts
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								forward slashes to backward slashes.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-09-17 15:16:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{realpath}{path}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Return the canonical path of the specified filename, eliminating any
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								symbolic links encountered in the path.
							 | 
						
					
						
							
								
									
										
										
										
											2001-11-28 07:26:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Availability:  \UNIX.
							 | 
						
					
						
							
								
									
										
										
										
											2001-09-17 15:16:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionadded{2.2}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{samefile}{path1, path2}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if both pathname arguments refer to the same file or
							 | 
						
					
						
							
								
									
										
										
										
											1998-03-11 05:50:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								directory (as indicated by device number and i-node number).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Raise an exception if a \function{os.stat()} call on either pathname
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								fails.
							 | 
						
					
						
							
								
									
										
										
										
											2001-11-28 07:26:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Availability:  Macintosh, \UNIX.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 22:31:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{sameopenfile}{fp1, fp2}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if the file objects \var{fp1} and \var{fp2} refer to the
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 22:31:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								same file.  The two file objects may represent different file
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								descriptors.
							 | 
						
					
						
							
								
									
										
										
										
											2001-11-28 07:26:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Availability:  Macintosh, \UNIX.
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 22:31:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{samestat}{stat1, stat2}
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-05 02:21:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Return \code{True} if the stat tuples \var{stat1} and \var{stat2} refer to
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 22:31:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								the same file.  These structures may have been returned by
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\function{fstat()}, \function{lstat()}, or \function{stat()}.  This
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								function implements the underlying comparison used by
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\function{samefile()} and \function{sameopenfile()}.
							 | 
						
					
						
							
								
									
										
										
										
											2001-11-28 07:26:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Availability:  Macintosh, \UNIX.
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 22:31:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{split}{path}
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 22:31:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Split the pathname \var{path} into a pair, \code{(\var{head},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\var{tail})} where \var{tail} is the last pathname component and
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\var{head} is everything leading up to that.  The \var{tail} part will
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								never contain a slash; if \var{path} ends in a slash, \var{tail} will
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								be empty.  If there is no slash in \var{path}, \var{head} will be
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								empty.  If \var{path} is empty, both \var{head} and \var{tail} are
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								empty.  Trailing slashes are stripped from \var{head} unless it is the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								root (one or more slashes only).  In nearly all cases,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\code{join(\var{head}, \var{tail})} equals \var{path} (the only
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								exception being when there were multiple slashes separating \var{head}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								from \var{tail}).
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 19:24:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{splitdrive}{path}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Split the pathname \var{path} into a pair \code{(\var{drive},
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 22:31:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\var{tail})} where \var{drive} is either a drive specification or the
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 19:24:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								empty string.  On systems which do not use drive specifications,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\var{drive} will always be the empty string.  In all cases,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\code{\var{drive} + \var{tail}} will be the same as \var{path}.
							 | 
						
					
						
							
								
									
										
										
										
											2001-05-25 16:21:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\versionadded{1.3}
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 19:24:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{splitext}{path}
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-03 19:24:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Split the pathname \var{path} into a pair \code{(\var{root}, \var{ext})} 
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								such that \code{\var{root} + \var{ext} == \var{path}},
							 | 
						
					
						
							
								
									
										
										
										
											1996-08-19 23:00:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								and \var{ext} is empty or begins with a period and contains
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								at most one period.
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{funcdesc}{walk}{path, visit, arg}
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Calls the function \var{visit} with arguments
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\code{(\var{arg}, \var{dirname}, \var{names})} for each directory in the
							 | 
						
					
						
							
								
									
										
										
										
											1999-02-02 18:58:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								directory tree rooted at \var{path} (including \var{path} itself, if it
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								is a directory).  The argument \var{dirname} specifies the visited
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								directory, the argument \var{names} lists the files in the directory
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								(gotten from \code{os.listdir(\var{dirname})}).
							 | 
						
					
						
							
								
									
										
										
										
											1997-03-25 15:25:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								The \var{visit} function may modify \var{names} to
							 | 
						
					
						
							
								
									
										
										
										
											1995-03-17 16:07:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								influence the set of directories visited below \var{dirname}, e.g., to
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								avoid visiting certain parts of the tree.  (The object referred to by
							 | 
						
					
						
							
								
									
										
										
										
											1998-03-11 05:50:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\var{names} must be modified in place, using \keyword{del} or slice
							 | 
						
					
						
							
								
									
										
										
										
											1995-03-17 16:07:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								assignment.)
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-06 16:07:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-07 12:39:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\begin{notice}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Symbolic links to directories are not treated as subdirectories, and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								that \function{walk()} therefore will not visit them. To visit linked
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								directories you must identify them with
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\code{os.path.islink(\var{file})} and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\code{os.path.isdir(\var{file})}, and invoke \function{walk()} as
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								necessary.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{notice}
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-25 07:11:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2003-04-25 15:12:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								\note{The newer \function{\refmodule{os}.walk()} generator supplies
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      similar functionality and can be easier to use.}
							 | 
						
					
						
							
								
									
										
										
										
											1994-01-02 01:22:07 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{funcdesc}
							 | 
						
					
						
							
								
									
										
										
										
											2003-02-04 19:13:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\begin{datadesc}{supports_unicode_filenames}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								True if arbitrary Unicode strings can be used as file names (within
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								limitations imposed by the file system), and if
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\function{os.listdir()} returns Unicode strings for a Unicode
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								argument.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\versionadded{2.3}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								\end{datadesc}
							 |