Terminal¶
The terminal embedded in Pyto is hterm, the terminal from Chrome OS. It runs a shell that provides access to many UNIX commands from ios_system, which is used in many iOS / iPadOS apps.
These commands are embedded in the app and are executed in the same process and can be executed with os.system()
and subprocess.Popen
.
Commands¶
Type help
in the shell to see a list of available commands.
Scripts installed from PyPI or packages embedded in-app will also be recognized by the shell. These scripts are installed in ~/Documents/bin
for user installed scripts and Pyto.app/site-packages/bin
for bundled packages. If you want to run a module that has no entrypoint specified in setup.py or setup.cfg, you can always run the python interpreter: $ python -m my_module
.
Use xargs
to pass the output of a command as an argument:
Operators¶
The shell supports operator for redirecting output and input.
Write to file:
Append to file:
Pass file as input:
Pass output from a command to another command as input.