\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio.SwissProt} \PYG{k+kn}{import} \PYG{n}{KeyWList}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{handle} \PYG{o}{=} \PYG{n+nb}{open}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}keywlist.txt\PYGZdq{}}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{records} \PYG{o}{=} \PYG{n}{KeyWList}\PYG{o}{.}\PYG{n}{parse}\PYG{p}{(}\PYG{n}{handle}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{for} \PYG{n}{record} \PYG{o+ow}{in} \PYG{n}{records}\PYG{p}{:}
\PYG{g+gp}{... }    \PYG{k}{print}\PYG{p}{(}\PYG{n}{record}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}ID\PYGZdq{}}\PYG{p}{])}
\PYG{g+gp}{... }    \PYG{k}{print}\PYG{p}{(}\PYG{n}{record}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}DE\PYGZdq{}}\PYG{p}{])}
\end{Verbatim}
