os

The os commands module.

These commands are used in the following models: MP5103

THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.

Please report an issue if one is found.

Attributes and Functions
- os.clock()
- os.remove()
- os.rename()
- os.time()

Os

Bases: BaseTSPCmd

The os command tree.

Properties and methods
  • .clock(): The os.clock() function.
  • .remove(): The os.remove() function.
  • .rename(): The os.rename() function.
  • .time(): The os.time() function.

clock

clock() -> str

Run the os.clock() function.

Description
  • This function returns the number of seconds the instrument has been powered-on.
TSP Syntax
- os.clock()
Returns:
  • str

    The result of the function call.

Raises:

remove

remove(filename: str) -> str

Run the os.remove() function.

Description
  • This function deletes the file or directory with a given name.
TSP Syntax
- os.remove()
Parameters:
  • filename (str) –

    A string representing the name of the file or directory to delete.

Returns:
  • str

    The result of the function call.

Raises:

rename

rename(oldname: str, newname: str) -> str

Run the os.rename() function.

Description
  • This function renames an existing file or directory.
TSP Syntax
- os.rename()
Parameters:
  • oldname (str) –

    String representing the name of the file or directory to rename.

  • newname (str) –

    String representing the new name of the file or directory.

Returns:
  • str

    The result of the function call.

Raises:

time

time(timespec: str | None = None) -> str

Run the os.time() function.

Description
  • This function generates a time value in UTC time.
TSP Syntax
- os.time()
Parameters:
  • timespec (optional, default: None ) –

    The date and time (year, month, day, hour, minute, and second).

Returns:
  • str

    The result of the function call.

Raises: