As a side project I've been working on a TypeScript implementation of the PythonShell to publish as its own npm package, which can be found here, because I wanted to keep working on it as a module even after this project is done. At this point I feel like it is a significant improvement over the original in terms of better error handling, better compatibility with Windows, better documentation, more functionality, and more thorough testing. It also uses the 'new' style of asynchronous code that is Promises, rather than the 'old' style of callbacks. So I figured I'd open this PR to give us the opportunity to integrate this version instead of the old one, if we wish to do so.
I've also added some code in quantum-circuit.js which will check if the Python virtual environment has been set up correctly before running any Python code. If it cannot be found, then it will automatically attempt to run the pyvenv.sh script. Execution continues once the virtual environment has been set up, or ends if an error occurred.
Purpose
As a side project I've been working on a TypeScript implementation of the
PythonShell
to publish as its own npm package, which can be found here, because I wanted to keep working on it as a module even after this project is done. At this point I feel like it is a significant improvement over the original in terms of better error handling, better compatibility with Windows, better documentation, more functionality, and more thorough testing. It also uses the 'new' style of asynchronous code that is Promises, rather than the 'old' style of callbacks. So I figured I'd open this PR to give us the opportunity to integrate this version instead of the old one, if we wish to do so.I've also added some code in
quantum-circuit.js
which will check if the Python virtual environment has been set up correctly before running any Python code. If it cannot be found, then it will automatically attempt to run thepyvenv.sh
script. Execution continues once the virtual environment has been set up, or ends if an error occurred.Changes
python-interactive
dependency (21a7ba0bbd2cd28ead6f86a7b3b8cfad759d3da1).PythonShell
implementation and its dependencies (c4d77c5dbb22212dd11c2f621485ae7df65c5282).PythonInteractive
(ca055893b76a3bee5fd6ecd9a6b68bc1dd354944).README.md
(9afee769c40f154c18b335a9cea27a7093cc80fe).New Requirements
npm install
to remove old dependencies and install new ones.