Positron API for capturing console output #6729
-
I have just startef to write an extension for R package management in Positron to mimic the functionality in RStudio. My initial thought was that if we could execute R code in console and capture the output, it shouldn't be too hard to put this together. While I found in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
We have talked about this quite a number of times, but have always found other ways to work around needing the output itself. Right now the proposal we are most seriously considering is #2622, which is about getting something back from Want to take a look and see if that proposal could fit your use case? |
Beta Was this translation helpful? Give feedback.
-
@juliasilge I noticed that there was a recent update with the executeCode api, but I did not end up using it, for two reasons:
In the end, my solution is to output the information to a temp JSON file, which is to be read by my Positron extension. Currently, the development version is able to read the installed and loaded packages, load/unload them, and jump to the help topic when the names are clicked. I think it might be useful if I add package installation/uninstallation/updates. My current plan is to mimic RStudio behaviour as much as possible. Any suggestions? WeChat_20250404012832.mp4 |
Beta Was this translation helpful? Give feedback.
We have talked about this quite a number of times, but have always found other ways to work around needing the output itself. Right now the proposal we are most seriously considering is #2622, which is about getting something back from
positron.runtime.executeCode
like whether the code finished, whether it errored, whether the runtime restarted, etc.Want to take a look and see if that proposal could fit your use case?