~/talk

Multiprocessing: how to run Blockly generated code in Python

Talkat PyCon Canada 2017 · 2017-11-18..11-21· [python, concurrency]
links:none on file
slides:none on file

Blockly yields a Python code string for a GoPiGo3 Raspberry Pi robot; solutions explored are exec - quick for short commands, then subprocess - can be interrupted and finally multiprocessing - pass data back and forth by using queues. The shipped approach wraps the string into a generated function, writes it to a tmp RAM file, imports/reloads it, spawns it as a worker process with a Queue for status messages, tracks PIDs to terminate runaway loops and reaps zombies; the robot demo runs and the project moves to Python 3.

AI-written summary · about

  1. 0:00Start
  2. 2:28What Is Block Lee
  3. 3:23Raspberry Pi Based Robot
  4. 5:23For Loop
  5. 5:58Infinite Loop
  6. 8:00Standard Usage
  7. 20:37How Do You Execute a String Variable
  8. 22:47Mars Rover Project
  9. 28:23What's the Difference between Blockly and Scratch Made by Mit
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.