如果是在同一个 module中(也就是同一个py 文件里),直接用就可以如果在不同的module里,例如a.py里有 class A:b.py 里有 class B:如果你要在class B里用class A 需要在 b.py的开头写上 from a import A #mymodel.py import matplotlib.pyplot as pltclass test(object): num = [] def __init__(self, _list): super(test, self
在Shell脚本的执行过程中,Shell脚本支持调用另一个Shell脚本,调用的格式为:程序名 实例:在Shell脚本test1中调用test2. 1.调用test2#test1脚本root@ubuntu:/home/study# vi test1; #!/bin/bash echo "The main name is $0"; ./test2; echo "The first string is $1"; #test2脚本root@ubuntu:/home