[FWTools] Python "batch" processing

Roger André randre at gmail.com
Fri Feb 26 00:46:30 EST 2010


please post the python you have already written. it is not sufficient to
just 'print', you need to pass the statement to the os for execution. look
at doc for 'os.popen()'
--

On Feb 25, 2010 6:39 PM, "nlneilson" <neilnln at hotmail.com> wrote:


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
> Pyt...
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.

_________________________________________...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20100225/694fbd42/attachment.htm 


More information about the FWTools mailing list