PyTuflow: Difference between revisions

Content deleted Content added
No edit summary
Line 48:
|''list'' Channel IDs
|-
|rowspan='1'|<b>[[#format|format]] ()</b>
|rowspan='1'|Returns the result format i.e. '2013' or '2016'
|''str'' Format
Line 407:
for chan in ups_chans:
print(chan)
else:
# did not load correctly, print error message to console
print(message)
</pre>
 
==format==
<b>format ()</b><br>
Returns the result format i.e. '2013' or '2016'<br>
;Parameters:
: -
;Returns:
: ''Format:''' ''str''
:: Format of results e.g. '2016'
'''Example'''
<pre>
import pytuflow as tu
 
# Initialise result class
res = tu.ResData()
 
# load .tpc result file
path = r'C:\TUFLOW\results\M04_5m_001.tpc'
err, message = res.load(path)
 
# check results were loaded successfully before calling function
if not err:
format = res.format()
# print to console
print('Results format: {0}'.format(format)
else:
# did not load correctly, print error message to console