2

I have a tag cloud generator that I would like to call from my python program. How can I do it?

I run it in a batch file

java -jar ibm-word-cloud.jar -C configure.txt input.txt output.png

thanks for your help.

2 Answers 2

3

The subprocess module is now preferred over os.system(). A simple example, assuming run_prog.bat contains the command you need:

import subprocess
cmd = "run_prog.bat"
proc = subprocess.Popen(cmd)
Sign up to request clarification or add additional context in comments.

Comments

2

You can use the os module:

import os
os.system('mybatchfile.bat')

or use the subprocess module

Comments

Your Answer

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.