Open ndrewh opened 2 months ago
Option 2: Somehow build in the ability to launch a process with a p = process(...) line from outside Pyda.
This has an increasing appeal to me. We could proxy every p.* call to the other actual process... but this doesn't really allow for hooks to work (the process literally has a separate Python interpreter!). We could also write some sort of hook-forwarding stub but this is going to be incredibly slow. I guess that is conceptually to how GDB works. So we've just devolved into a debugger at that point...
It would be wild to somehow be able to use this from a jupyter notebook. It's not clear how this would have to work
p = process(...)
line from outside Pyda. This is something I really want to have for a lot of reasons (and which I envisioned for the project from the beginning) but I have no idea how to make it work. The problem is that the entire point of the tool is that your hooks are executed in the same process ("natively" in some sense, without taking an interrupt) -- so how would you use the handle returned byprocess
to install hooks after it has to fork+exec? It just doesn't make any sense. We could make it work outside of a notebook by basically launching pyda normally and passing__file__
as the script and having it call some special entrypoint -- but then all your scripts look weird and unnatural.