Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ pb run demo.py # compile the script, send it, and run it

`pb run` stays with the program: what it prints appears as it prints it, and
what you type goes to the hub, so `input()` works and ++ctrl+c++ interrupts.
Input piped in works too, for driving a program from a script:
`printf 'a\n' | pb run demo.py`. Inside a loop that reads its own input, use
`pb run -n` so the program does not take the rest of it.

Press ++esc++ ++esc++ to stop the program — one key, twice, so it is there
when a robot is heading for the edge of the table. Press ++ctrl+"]"++ ++q++ to
Expand Down
13 changes: 13 additions & 0 deletions packages/pb-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ Notable changes to `pybricks-cli`, the `pb` command. The format is based on

## [Unreleased]

### Added

- `pb run -n` and `pb start -n` leave stdin alone, for use inside a loop that
reads its own input, as with `ssh -n`.

### Changed

- Without a terminal, `pb run` and `pb start --wait` send piped or redirected
stdin to the program, so `input()` works in a script:
`printf 'a\n' | pb run prog.py`. Line endings become `\r`. A program used to
wait in `input()` for ever. A `pb run` inside a loop that reads its own input
now takes the rest of it; use `-n` there.

## [1.0.0b2] - 2026-11-23

### Changed
Expand Down
Loading
Loading