Advertisement

09.16.2007 at 02:40AM PDT, ID: 22831582
[x]
Attachment Details

looping over a little lookup table

Asked by Gertone in MS DOS

Tags: lookup, table, python, file

I have a batch file containg the following

echo %time%
echo downloading five
C:\Python25\python download.py five xml
echo %time%
echo downloading bitt
C:\Python25\python download.py bitt xml
echo downloading stats
C:\Python25\python download.py stats html
echo %time%

This is part of a long list of similar commands

I would like to have some sort of a list (pseudocode)
sites = (five, bitt, stats)
ext = (xml, xml, html)

so I could do something like this
for i,j in sites, ext
do
   echo %time%
   echo downloading %i%
   C:\Python25\python download.py %i% %j%
end

whatever the syntax would be

Can this be done?

Thanks

GeertStart Free Trial
[+][-]09.16.2007 at 09:30PM PDT, ID: 19902922

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS DOS
Tags: lookup, table, python, file
Sign Up Now!
Solution Provided By: SteveGTR
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.17.2007 at 01:34AM PDT, ID: 19903522

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628