本文整理汇总了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')
示例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)
示例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)