当前位置: 首页>>代码示例>>Python>>正文


Python BriPy.write_text方法代码示例

本文整理汇总了Python中BriPy.write_text方法的典型用法代码示例。如果您正苦于以下问题:Python BriPy.write_text方法的具体用法?Python BriPy.write_text怎么用?Python BriPy.write_text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BriPy的用法示例。


在下文中一共展示了BriPy.write_text方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_writeout_3

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import write_text [as 别名]
 def test_writeout_3(self):
     """HDF5 & Text output."""
     BriPy.isos2track([922350])
     BriPy.write_hdf5(True)
     BriPy.write_text(True)
     fcc = FCComp(["Mass"], 'fcc')
     fcc.IsosIn  = MassStream({922350: 1.0})
     fcc.IsosOut = MassStream({922350: 0.5})
     fcc.writeout()
     os.remove('fcc.h5')
开发者ID:sylvainvayre,项目名称:bright,代码行数:12,代码来源:test_FCComp.py

示例2: test_write_text

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import write_text [as 别名]
 def test_write_text(self):
     old_write = BriPy.write_text()
     BriPy.write_text(False)
     assert_false(BriPy.write_text())
     BriPy.write_text(1)
     assert_true(BriPy.write_text())
     BriPy.write_text(old_write)
开发者ID:sylvainvayre,项目名称:bright,代码行数:9,代码来源:test_bright.py

示例3: len

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import write_text [as 别名]
import os
import sys
import time
import tables as tb

import BriPy as bp

from facility_info import get_reactor_id_map

# Load isos2track
data_dir = os.getenv("BRIGHT_DATA")
lwr_data = data_dir + "/LWR.h5"
bp.load_isos2track_hdf5(lwr_data)

# We are going to capture the output, so don't write it out automatically.
bp.write_text(False)
bp.write_hdf5(False)

# Generate a used fuel table description
UsedFuel = {
    'assembly_id': tb.StringCol(itemsize=15, pos=0), 
    'discharge_k': tb.Float64Col(pos=1),
    'mass':        tb.Float64Col(pos=2),
    }

nbuf = len(UsedFuel)
i2t = bp.isos2track()

for i in xrange(len(i2t)):
    UsedFuel[bp.isoname.zzaaam_2_LLAAAM(i2t[i])] = tb.Float64Col(pos=nbuf + i)
开发者ID:scopatz,项目名称:FuelLearning,代码行数:32,代码来源:used_fuel.py


注:本文中的BriPy.write_text方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。