- Install
- Basic operation
- Basics of programming for electronic work
- Basics of programming for Excel
- Machine learning with scikit-learn
- Visualizing data with matplotlib
- Web programming
- RPA programming
- Miscellaneous programming
- Reference
- "Basic" group
- ”Basic I/O" group
- ”PWM Output" group
- "Servo Motor" group
- ”Motor" group
- ”Display" group
- ”Sensor" group
- "Micro controller" group
- "Excel" group
- "scikit-learn" group
- "matplotlib" group
- "Web" group
- "File" group
- "File System" group
- "File Read/Write" group
- Overview
- Usage of each block
- "Image" group
- "Turtle" group
- "Speech" group
Usage of each block
Open file
![]()
This function opens the specified file in the specified mode.
If the mode is set to "write," any existing file contents will be erased.
If the "update" checkbox is enabled, the existing file can be updated.
If the "binary" checkbox is enabled, the file can be treated as binary.
The function returns the ID of the file object.
This ID should be assigned to a variable and used when manipulating the file.
Close file
![]()
Closes an open file.
Write text to file
![]()
Writes text to the file specified by the file ID.
If you check the "newline" option, a line break character will be added after you type the text.
Read all text from file
![]()
Reads all content from the file specified by the file ID as text.
Read a line of text from file
![]()
Reads one line from the file specified by the file ID as text.
If there is a newline character at the end of the line, the return value will be the string with that newline character included.
Read specified number of characters from File
![]()
Reads the specified number of characters from the file specified by the file ID as text.
Write binary data to file
![]()
Writes binary data to the file specified by the file ID.
The data will be passed as a list of numbers.
Read binary data from File
![]()
Reads the specified number of bytes from the file specified by the file ID as binary data.
The return value will be a list of numbers.
Get current position
![]()
Gets the current file pointer position.
Set current position
![]()
Sets the file pointer position to the specified value.
In text files, you can only specify the position from the beginning of the file.