2π
β
In Python you can run other programs using module subprocess and read/write from their standard output/input. More complex CLI (command-line) applications can be controlled with pexpect. Of course you can set environment variable CLASSPATH
.
If you want to run other programs in a web app (Django), make sure it will not make your users waiting for the HTML page for too long.
π€Messa
0π
Yeah subprocess is a great module to call commandline scripts. If you are worried that the process will take to long for the user to wait around for html, consider using celery to asynchronously call your external scripts as a background process.
π€rishub
- [Answered ]-Django IntegrityError while deleting objects
- [Answered ]-Tastypie returns 401 unauthorized even when using Authorization class
- [Answered ]-__init__() got an unexpected keyword argument 'user_id'; Classed Based Views
- [Answered ]-How to remove whitespaces in django urls?
- [Answered ]-Use validation to prevent duplicate file _name_ being uploaded
Source:stackexchange.com