[FWTools] Python "batch" processing

nlneilson neilnln at hotmail.com
Thu Feb 25 21:13:59 EST 2010


My email shows there were two response Matt Wilkie, Roger André
But this thread is not updated, maybe I am doing something wrong.

What I am trying to do is batch process 100 + files:

pct2rgb "Alaska\Dutch Harbor 42 North.tif"  Work\AK\DutchN.tif
gdal_translate -srcwin 0 360 10950 3700 "Alaska\Dutch Harbor 42 South.tif" 
Work\Ak\DutchSc.tif
pct2rgb Work\Ak\DutchSc.tif Work\AK\DutchS.tif
pct2rgb "Alaska\Fairbanks 85 North.tif"  Work\AK\FairbN.tif

Some need to be clipped with gdal_translate, this set has about 6, another
set has about 75.
Then pct2rgb

I did this several times before one at a time.

I have a Python app and all of the lines print correctly.  Each of the lines
pasted at the fwtools prompt work OK.  When I run the .py app at the prompt
the lines print correctly but it doesn't do anything.

I make a .bat file with these lines and it will run the first line if it's
pct2rgb, it takes about 20 sec.  If the first line is gdal_translate, which
is very fast, then the following pct2rgb line will run.  That's all, no more
lines are processed.

I thought it may be easier to try a time delay in the .py app.

It may be something basic I am doing wrong with the .py or .bat.



nlneilson wrote:
> 
> I did a search for "batch" but did not find a direct answer regarding
> Python.
> 
> Can a Python .py app batch process files the same as with a .bat batch
> file?
> 
> I could have a .py app make a .bat file but I was wondering if a .py app
> could
> do this directly??
> 

-- 
View this message in context: http://old.nabble.com/Python-%22batch%22-processing-tp27714398p27714563.html
Sent from the FWTools mailing list archive at Nabble.com.



More information about the FWTools mailing list