TypeError:“ int”对象在合并排序中不可迭代

时间:2018-07-27 18:00:26

标签: mergesort

我正在尝试在python中编写合并排序算法。我保持此错误TypeError:'int'对象不可迭代

#!/bin/bash

$openjava=""
while true
do 
    java -jar uploadv2.jar &
    $openjava="$openjava $!" # List of all java programs running
    # The $! gets the most recently spawned process id 

    for process in $openjava
    do 
        childProc="$childProc `pgrep -P $process`" #get chrome processes spawned by java
    done

    for tab in childProc 
    do
        kill $tab    #kill the child processes (chrome tabs) 
    done
done        

0 个答案:

没有答案