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
Run the os.clock() function.
Description
- This function returns the number of seconds the instrument has been powered-on.
TSP Syntax
| Returns: |
-
str
–
The result of the function call.
|
remove
Run the os.remove() function.
Description
- This function deletes the file or directory with a given name.
TSP Syntax
| Parameters: |
-
filename
(str)
–
A string representing the name of the file or directory to delete.
|
| Returns: |
-
str
–
The result of the function call.
|
rename
Run the os.rename() function.
Description
- This function renames an existing file or directory.
TSP Syntax
| 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.
|
time
time(timespec: str | None = None) -> str
Run the os.time() function.
Description
- This function generates a time value in UTC time.
TSP Syntax
| Parameters: |
-
timespec
(optional, default:
None
)
–
The date and time (year, month, day, hour, minute, and second).
|
| Returns: |
-
str
–
The result of the function call.
|