\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{for} \PYG{n}{accession} \PYG{o+ow}{in} \PYG{n}{accessions}\PYG{p}{:}
\PYG{g+gp}{... }    \PYG{n}{handle} \PYG{o}{=} \PYG{n}{ExPASy}\PYG{o}{.}\PYG{n}{get\PYGZus{}sprot\PYGZus{}raw}\PYG{p}{(}\PYG{n}{accession}\PYG{p}{)}
\PYG{g+gp}{... }    \PYG{k}{try}\PYG{p}{:}
\PYG{g+gp}{... }        \PYG{n}{record} \PYG{o}{=} \PYG{n}{SwissProt}\PYG{o}{.}\PYG{n}{read}\PYG{p}{(}\PYG{n}{handle}\PYG{p}{)}
\PYG{g+gp}{... }    \PYG{k}{except} \PYG{n}{ValueException}\PYG{p}{:}
\PYG{g+gp}{... }        \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}WARNING: Accession }\PYG{l+s+si}{\PYGZpc{}s}\PYG{l+s+s2}{ not found\PYGZdq{}} \PYG{o}{\PYGZpc{}} \PYG{n}{accession}\PYG{p}{)}
\PYG{g+gp}{... }    \PYG{n}{records}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{record}\PYG{p}{)}
\end{Verbatim}
