pyGamitSession.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Parallel.GAMIT 作者: demiangomez 项目源码 文件源码
def copy_sestbl_procdef_atx(self):
        # copy process.defaults and sestbl.
        copyfile(self.GamitOpts['process_defaults'], os.path.join(self.pwd_tables, 'process.defaults'))
        copyfile(self.GamitOpts['atx'], os.path.join(self.pwd_tables, 'antmod.dat'))

        # change the scratch directory in the sestbl. file
        #copyfile(self.GamitOpts['sestbl'], os.path.join(self.pwd_tables, 'sestbl.'))

        with open(os.path.join(self.pwd_tables, 'sestbl.'), 'w') as sestbl:
            with open(self.GamitOpts['sestbl']) as orig_sestbl:
                for line in orig_sestbl:
                    if 'Scratch directory' in line:
                        # empty means local directory! LA RE PU...
                        sestbl.write('Scratch directory = \n')
                    else:
                        sestbl.write(line)

        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号