本文整理汇总了Python中numpy.distutils.misc_util.make_temp_file函数的典型用法代码示例。如果您正苦于以下问题:Python make_temp_file函数的具体用法?Python make_temp_file怎么用?Python make_temp_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了make_temp_file函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: get_flags_linker_so
def get_flags_linker_so(self):
opt = []
if sys.platform=='darwin':
opt.append('-Wl,-bundle,-flat_namespace,-undefined,suppress')
else:
opt.append('-bshared')
version = self.get_version(ok_status=[0,40])
if version is not None:
if sys.platform.startswith('aix'):
xlf_cfg = '/etc/xlf.cfg'
else:
xlf_cfg = '/etc/opt/ibmcmp/xlf/%s/xlf.cfg' % version
fo, new_cfg = make_temp_file(suffix='_xlf.cfg')
log.info('Creating '+new_cfg)
fi = open(xlf_cfg,'r')
crt1_match = re.compile(r'\s*crt\s*[=]\s*(?P<path>.*)/crt1.o').match
for line in fi:
m = crt1_match(line)
if m:
fo.write('crt = %s/bundle1.o\n' % (m.group('path')))
else:
fo.write(line)
fi.close()
fo.close()
opt.append('-F'+new_cfg)
return opt
开发者ID:glimmercn,项目名称:numpy,代码行数:26,代码来源:ibm.py
示例2: temp_file_name
def temp_file_name():
# 2019-01-30, 1.17
warnings.warn('temp_file_name is deprecated since NumPy v1.17, use '
'tempfile.mkstemp instead', DeprecationWarning, stacklevel=1)
fo, name = make_temp_file()
fo.close()
return name
开发者ID:anntzer,项目名称:numpy,代码行数:7,代码来源:exec_command.py
示例3: get_flags_linker_so
def get_flags_linker_so(self):
opt = []
if sys.platform == "darwin":
opt.append("-Wl,-bundle,-flat_namespace,-undefined,suppress")
else:
opt.append("-bshared")
version = self.get_version(ok_status=[0, 40])
if version is not None:
if sys.platform.startswith("aix"):
xlf_cfg = "/etc/xlf.cfg"
else:
xlf_cfg = "/etc/opt/ibmcmp/xlf/%s/xlf.cfg" % version
fo, new_cfg = make_temp_file(suffix="_xlf.cfg")
log.info("Creating " + new_cfg)
fi = open(xlf_cfg, "r")
crt1_match = re.compile(r"\s*crt\s*[=]\s*(?P<path>.*)/crt1.o").match
for line in fi:
m = crt1_match(line)
if m:
fo.write("crt = %s/bundle1.o\n" % (m.group("path")))
else:
fo.write(line)
fi.close()
fo.close()
opt.append("-F" + new_cfg)
return opt
开发者ID:hitej,项目名称:meta-core,代码行数:26,代码来源:ibm.py
示例4: temp_file_name
def temp_file_name():
fo, name = make_temp_file()
fo.close()
return name
开发者ID:dimasad,项目名称:numpy,代码行数:4,代码来源:exec_command.py
示例5: dummy_fortran_file
def dummy_fortran_file():
fo, name = make_temp_file(suffix='.f')
fo.write(" subroutine dummy()\n end\n")
fo.close()
return name[:-2]
开发者ID:blitzmann,项目名称:Pyfa-skel,代码行数:5,代码来源:__init__.py
注:本文中的numpy.distutils.misc_util.make_temp_file函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论