[Answered ]-Django and calling cli java application

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

Leave a comment