12.5 The os module

os.chdir($x$)
The os.chdir($x$) function changes working directory to $x$, which should be a string.

os.getcwd()
The os.getcwd() function returns the path of the current working directory.

os.getegid()
The os.getegid() function returns the effective group id of the Pyxplot process.

os.geteuid()
The os.geteuid() function returns the effective user id of the Pyxplot process.

os.getgid()
The os.getgid() function returns the group id of the Pyxplot process.

os.gethomedir()
The os.gethomedir() function returns the path of the user’s home directory.

os.gethostname()
The os.gethostname() function returns the system’s host name.

os.getlogin()
The os.getlogin() function returns the system login of the user.

os.getpgrp()
The os.getpgrp() function returns the process group id of the Pyxplot process.

os.getpid()
The os.getpid() function returns the process id of the Pyxplot process.

os.getppid()
The os.getppid() function returns the parent process id of the Pyxplot process.

os.getrealname()
The os.getrealname() function returns the user’s real name.

os.getuid()
The os.getuid() function returns the user id of the Pyxplot process.

os.glob($x$)
The os.glob($x$) function returns a list of files which match the supplied wildcard $x$, which should be a string.

os.popen($x$,[$y$])
The os.popen($x$,[$y$]) function opens a pipe to the command $x$ with string access mode $y$, and returns a file handle object.

os.stat($x$)
The os.stat($x$) function returns a dictionary of information about the file x, which should be a string filename.

os.stderr
The os.stderr function is a file handle for the Pyxplot process’s stderr stream.

os.stdin
The os.stdin function is a file handle for the Pyxplot process’s stdin stream.

os.stdout
The os.stdout function is a file handle for the Pyxplot process’s stdout stream.

os.system($x$)
The os.system($x$) function executes a command in a subshell.

os.tmpfile()
The os.tmpfile() function returns a file handle for a temporary file.

os.uname()
The os.uname() function returns a dictionary of information about the operating system.