Start a long-running command and return a process handle.
list()
List running commands and PTY sessions.
send_stdin(pid, data)
Send input to a process.
logs(pid)
Fetch stdout, stderr, and interleaved output.
kill(pid)
Stop a process by PID.
server = machine.commands.run( "python3 -m http.server 8080", shell=True, cwd="/workspace", background=True,)try: print(machine.get_url(8080)) input("Open the URL, then press Enter to stop the server...")finally: server.kill()