You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context:
I run a Python script in a browser environment and need advice on how to resubmit it to the Python interpreter after making updates. Here’s how I currently handle it:
Original Script:
print("Hello World!")
whileTrue:
pass
Current Execution Method:
I execute this script in the browser using the following JavaScript code:
awaitpython.terminal(["python","-i","-c",code]);
Issue:
After modifying the script, I need to reload and run the updated version. I was considering using the SIGKILL signal to terminate the existing session and then reinitialize it with the new script. However, I discovered that SIGKILL is not supported—only SIGINT is available.
Current Non-Working Code:
python.kernel.signal(SIGKILL);// SIGKILL is not supportedawaitpython.init();awaitpython.terminal(["python","-i","-c",newCode]);// Intended to resubmit the new version
Questions:
Given that SIGKILL is not supported and only SIGINT is available, how can I effectively terminate the existing Python session and start a new one with the updated script?
Is adding support for SIGKILL a good approach to this problem?
The text was updated successfully, but these errors were encountered:
I was the only person that worked on this project, and I haven't had time to work on it for a while, so it's unlikely you'll get an answer here. Sorry about that.
You're welcome. I hope I can contribute to it again someday. In the meantime, if you figure out anything useful, please feel free to comment here or create a PR (e.g., improving docs, the README, etc.)
Context:
I run a Python script in a browser environment and need advice on how to resubmit it to the Python interpreter after making updates. Here’s how I currently handle it:
Original Script:
Current Execution Method:
I execute this script in the browser using the following JavaScript code:
Issue:
After modifying the script, I need to reload and run the updated version. I was considering using the SIGKILL signal to terminate the existing session and then reinitialize it with the new script. However, I discovered that SIGKILL is not supported—only SIGINT is available.
Current Non-Working Code:
Questions:
The text was updated successfully, but these errors were encountered: