Skip to content

Commit

Permalink
Add info about context handler for #12
Browse files Browse the repository at this point in the history
  • Loading branch information
mdshw5 committed Oct 18, 2017
1 parent 79ef067 commit dad625e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Read the SAM sequence header structure

Write SAM files from `Sam` objects
```python
# Reader and Writer can also use the context handler (with: statement)
>>> out_file = open('test.sam', 'w')
>>> out_sam = Writer(out_file, in_sam.header)
>>> out_sam.write(x)
Expand Down

0 comments on commit dad625e

Please sign in to comment.