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.

asked Oct 2, 2011 at 20:30

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)
answered Oct 5, 2011 at 23:49
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

answered Oct 2, 2011 at 20:35

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.