strand - Python module providing a strand object API
The strand module provides classes for handling the three most common strand
forms -- positive (+), negative (-), and unknown (.) -- as both string
and integer types.
git clone https://github.com/bredeson/strand.git
cd strand
make install PREFIX=/path/to/install/prefix
After proper installation, there are two ways of getting the complete documentation for the strand API. Read man-like help pages by doing either of the following:
-
On the command line:
$ pydoc strand
-
In the Python REPL:
>>> import strand >>> help(strand)
In the Python REPL:
>>> from strand import Strand
>>> strand = Strand("+")
>>> strand.ispositive()
True
>>> strand.int
1
>>> strand = reversed(strand)
>>> strand.isnegative()
True
>>> strand.int
-1
>>> print(strand) # prints "-"