Two operations, i.e., rewind and status, are presented. Both of the operations are implemented in three kinds of ways, including cpython extenstion, ctypes and fcntl. The code is intended to show how to do hardware control in Taipei.py (Sep. 2018) and europython 2020.
- Python 3 / Linux
- You will need either a real tape drive or use mhvtl as a simulate tape drive.
- root privilege is necessary to operations of magnetic tape drive
- install the cpython extension
$ cd [project_home]/by_cpython_extension/pymt
$ pip install .
- Run the demo code
$ python demo.py