Open OgreTransporter opened 4 years ago
Already discussed here: https://github.com/texstudio-org/texstudio/issues/815#issuecomment-559609365 TLDR: Once QtScript is dropped completely, it will be replaced by QJsEngine. Python support in TXS has its merits, but compatibility with existing scripts takes priority.
IMHO Python support is nice to have, but it would be best to have it as an additional option besides QtScript/QJsEngine. This means implementing some kind of infrastructure that supports different scripting languages as TXS plugins (and QJsEngine would be just another pluggable language). This way adding Python support would be less intrusive for the current codebase.
scripting is used way too little to merit all the hassle with setting python up (over all supported platforms) So , it is rather unlikely to happen (especially as there is no real benefit in using python instead of javascript in the context of txs scripting)
Python support in TXS has its merits, but compatibility with existing scripts takes priority.
When switching from QtScript to JavaScript, the existing scripts are not compatible either.
Python has the additional advantage that you can include a lot of external data and services. When writing a publication I could read the results directly from my calculations and automatically integrate them into the text and update them if necessary. Machine Learning (e.g. TensorFlow) can also be used in scripts.
scripting is used way too little to merit all the hassle with setting python up (over all supported platforms)
The API is the same on all systems. You can also start with a Python option. Poppler can also be switched off.
QtScript uses WebKit's JavaScript implementation which is compatible with ECMAScript-262. QJsEngine uses Qt's own implementation of ECMAScript7-compatible implementation. So for a script writer it should not make a difference and all scripts written for QtScript should run fine on QJsEngine.
I am not arguing against the merits of Python, but as far as I can see TXS currently does not have the infrastructure to support multiple scripting languages. In order to add support for Python do that it would need the following:
I think that if someone provides these things they will be added to TXS.
Just a thought of mine! How about integrating Python? A Python console as a window (see issue #864) would be easier to implement than wrappers for the many different terminal/shell programs (cmd, ps, bash, sh, zsh, ...) on the different systems. The result of a script is also the same on all systems. Qt Script has also been marked as deprecated for quite some time and will probably disappear at some point. Python could replace this. Qt should also get more and more Python integration in the future.