icp batch converting in silent mode?

   3072   3   1
User Avatar
Member
120 posts
Joined: Feb. 2008
Offline
Hi everyone, I'm on windows here, I"m making a python script to loop through images and convert them to rat using icp.

when I run the script, the dos box for icp continually pops up and steals the window focus.

Is there any way to make it a silent or background operation so the window doesn't keep stealing the focus?

Thanks.
User Avatar
Member
7750 posts
Joined: July 2005
Online
icp is just a regular console program. This sounds like a python problem on Windows with console programs? How are you spawning icp? There's a couple of different ways to do that in Python, try all of them.
User Avatar
Member
120 posts
Joined: Feb. 2008
Offline
yeah, the command to do this would be different in every os. I found out how to do it in unix, but I did not yet find out how to run a program silently with the windows command line.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
josh3light
yeah, the command to do this would be different in every os. I found out how to do it in unix, but I did not yet find out how to run a program silently with the windows command line.

os.system?

if os, check the python module subprocess, which is a successor of various os.popen* commands. Not sure if that's what you want, but the idea is to start icp (or iconvert) as a child process of your script, rather then separate process (what happens in case of os.system()). This way it won't start new cmd, but it will take control over old one.

hth,
skk.
  • Quick Links