我有3个python代码,我想一个接一个地自动调用,以便它们在单次调用中导致最终结果。 如何将这些代码包装到单个脚本中?代码是model-multiple.py
,align2d.py
,model-single.py
。制作一个包含3个python代码的脚本
model-multiple.py是
from modeller import * # Load standard Modeller classes
from modeller.automodel import * # Load the automodel class
log.verbose() # request verbose output
env = environ() # create a new MODELLER environment to build this model in
env.io.atom_files_directory = ['.', '../atom_files']
a = automodel(env,
alnfile = '3NTD_align.ali', # alignment filename
knowns = ('3NTDA'),
sequence = 'target', # code of the target
assess_methods=(assess.DOPE, assess.GA341,assess.normalized_dope))
a.starting_model= 1 # index of the first model
a.ending_model = 1 # index of the last model
# (determines how many models to calculate)
a.make() # do the actual homology modeling
那些不是“Python代码”,它们是Python(程序)文件。代码是以不明显的方式映射内容和表示的函数。 – phihag 2011-05-07 12:54:46
@海:单词“代码”在英语中有一个以上的含义 – 2011-05-07 13:26:34