Skip to main content

module

os

Implements os methods.

You can import a method from the os package. For example:

from os import listdir

Aliases

  • SEEK_SET = 0: Seek from the beginning of the file.
  • SEEK_CUR = 1: Seek from the current position.
  • SEEK_END = 2: Seek from the end of the file.

Functions

  • listdir: Gets the list of entries contained in the path provided.
  • abort: Calls a target dependent trap instruction if available.
  • remove: Removes the specified file. If the path is a directory or it can not be deleted, an error is raised. Absolute and relative paths are allowed, relative paths are resolved from cwd.
  • unlink: Removes the specified file. If the path is a directory or it can not be deleted, an error is raised. Absolute and relative paths are allowed, relative paths are resolved from cwd.