Skip to content

Commit

Permalink
Fix TdmsFile.open example (#191)
Browse files Browse the repository at this point in the history
Add the `with` context manager variable result.
  • Loading branch information
Achilles1515 committed Apr 29, 2020
1 parent 490d333 commit ea07db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ When you are working with large TDMS files or don't need to read all channel dat
you can instead use ``TdmsFile.open``. This is more memory efficient but
accessing data can be slower::

with TdmsFile.open("path_to_file.tdms"):
with TdmsFile.open("path_to_file.tdms") as tdms_file:
group = tdms_file['group name']
channel = group['channel name']
channel_data = channel[:]
Expand Down

0 comments on commit ea07db8

Please sign in to comment.