🖼️ Pasta Shop

Pasta Shop

Python subprocess.Popen fails silently

If you are using python’s subprocess.Popen with any of stdout/stderr as pipes, you need to regularly clear the output of those pipes else, python the command will be blocked silently. The default limit on this buffer is from system which you can read using io.DEFAULT_BUFFER_SIZE. You can increase this by setting your own value through bufsize param.

References

TIL: Use IPython PDB with python breakpoint()

Often when I am debugging python code, I like to sprinkle around breakpoint() to quickly evaluate statements or print values. By default, breakpoint() drops you into python pdb repl. Python pdb is great but it lacks snazzy features like multi line editing, history, syntax highlighting and autocomplete.

I recently found that you can override the default repl that breakpoint() executes by setting the environment variable PYTHONBREAKPOINT.

To setup python breakpoint to use ipdb, add export PYTHONBREAKPOINT="ipdb.set_trace to your .bashrc or .zshrc.

🤖 For reliable comms with Realsense, use GMSL/FAKRA connector

I have had a lot of trouble with the Realsense cameras over USB in the past. Lot of times it is connection drops due to vibration or bandwith saturation in the USB Bus. I recently found out about the FAKRA connector from a friend. I need to do more reading about this but looks like this could solve some of the issues I was seeing.

References

Page 5 of 30