Running a script within a loop

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arton
    New Member
    • Jun 2012
    • 1

    Running a script within a loop

    Hello,

    I have a basic question. I would like to make running Arc.py several times with different input (R0.arg)and output (V0.art)
    The idea is to repeat the command like this:

    Arc.py R0.arg V0.art
    Arc.py R1.arg V1.art
    Arc.py R2.arg V2.art
    Arc.py R3.arg V3.art
    Arc.py R4.arg V4.art
    Arc.py R#.arg V#.art
    ...
    ..
    .
    until #=1000.

    Could you help me, please?
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    If you want to run the program from another Python program, see the info on subprocess.call.

    Comment

    Working...