1

I am just trying to gather some information, and whether it is possible to tie in cli java application and set up the class path using python. Also to be able to pass data around and share information between the two applications (web frontend and java application)

I currently I have a java application and looking to see if it is possible interface the two between django and java. Since I am familiar with it, instead of having to learn a new web framework like wicket.

I understand this maybe more python specific than django, any help would be appreciated.

Thanks

asked May 17, 2011 at 21:13

2 Answers 2

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.

answered May 17, 2011 at 22:48
Sign up to request clarification or add additional context in comments.

Comments

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.

answered Nov 29, 2016 at 16:57

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.