Perl Script在每次运行后关闭Python:如何保持Python Open

时间:2015-03-24 20:59:17

标签: python perl

我正在运行一个perl脚本,它遍历每个目录,在那里运行Python GUI,一旦我在该目录中完成工作,我关闭GUI,然后继续下一个事件。但是,每次我在目录中完成运行时,Python都会关闭。我想知道如何保持python打开,以减少打开python的处理时间。该守则如下:

#!/usr/bin/perl -w
#
#
#
# This scirpt will open AIMBAT automatically so that I don't have
# to change directories every time I open AIMBAT.


# Read in the List of Event Files
open(TABLEA, "eventList");
@tablea = <TABLEA>;
# Change the Home directory to whatever directory events are located.
$homeD = "/Users/grbrenn/antarctica/TAMSEIS/response_removed/";
# Takes each line in the array, tablea/eventList, and runs the script
for ($i = 0; $i < @tablea; $i++) {
    chomp ($tablea[$i]);
    ($event) = (@tablea[$i])[0];
    chdir $event;
    system("ttpick.py *BHZ");
    chdir $homeD;
    print
}

0 个答案:

没有答案