The io commands module.
These commands are used in the following models:
MP5103, SMU2601B, SMU2602B, SMU2604B, SMU2606B, SMU2611B, SMU2612B, SMU2614B, SMU2634B, SMU2635B,
SMU2636B, SMU2651A, SMU2657A, SS3706A
THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.
Please report an issue if one is found.
Attributes and Functions
- io.close()
- io.flush()
- io.input()
- io.open()
- io.output()
- io.read()
- io.type()
- io.write()
Io
Bases: BaseTSPCmd
The io command tree.
Properties and methods
.close(): The io.close() function.
.flush(): The io.flush() function.
.input(): The io.input() function.
.open(): The io.open() function.
.output(): The io.output() function.
.read(): The io.read() function.
.type(): The io.type() function.
.write(): The io.write() function.
close
close(file: str | None = None) -> None
Run the io.close() function.
Description
- This function closes a file.
TSP Syntax
| Parameters: |
-
file
(optional, default:
None
)
–
The descriptor of the file to close.
|
flush
Run the io.flush() function.
Description
- This function saves buffered data to a file.
TSP Syntax
input(newfile: str | None = None) -> str
Run the io.input() function.
Description
- This function assigns a previously opened file, or opens a new file, as the default
input file.
TSP Syntax
| Parameters: |
-
newfile
(optional, default:
None
)
–
A string representing the path of a file to open as the default
input file, or the file descriptor of an open file to use as the default input file.
|
| Returns: |
-
str
–
The result of the function call.
|
open
open(path: str, mode: str | None = None) -> str
Run the io.open() function.
Description
- This function opens a file for later reference.
TSP Syntax
| Parameters: |
-
path
(str)
–
The path of the file to open.
-
mode
(optional, default:
None
)
–
A string representing the intended access mode (‘r’ = read, ‘w’ =
write, and ‘a’ = append).
|
| Returns: |
-
str
–
The result of the function call.
|
output
output(newfile: str | None = None) -> str
Run the io.output() function.
Description
- This function assigns a previously opened file or opens a new file as the default
output file.
TSP Syntax
| Parameters: |
-
newfile
(optional, default:
None
)
–
A file descriptor to assign (or the path of a file to open) as the
default output file.
|
| Returns: |
-
str
–
The result of the function call.
|
read
read(format_: str | None = None) -> str
Run the io.read() function.
Description
- This function reads data from the default input file.
TSP Syntax
| Parameters: |
-
format_
(optional, default:
None
)
–
A string or number indicating the type of data to be read.
|
| Returns: |
-
str
–
The result of the function call.
|
type
Run the io.type() function.
Description
- This function checks whether or not a given object is a file handle.
TSP Syntax
| Returns: |
-
str
–
The result of the function call.
|
write
write(data: str | None = None) -> None
Run the io.write() function.
Description
- This function writes data to the default output file.
TSP Syntax
| Parameters: |
-
data
(optional, default:
None
)
–
|