\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio.Blast} \PYG{k+kn}{import} \PYG{n}{NCBIXML}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{blast\PYGZus{}records} \PYG{o}{=} \PYG{n}{NCBIXML}\PYG{o}{.}\PYG{n}{parse}\PYG{p}{(}\PYG{n}{result\PYGZus{}handle}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{blast\PYGZus{}record} \PYG{o}{=} \PYG{n+nb}{next}\PYG{p}{(}\PYG{n}{blast\PYGZus{}records}\PYG{p}{)}
\PYG{g+go}{\PYGZsh{} ... do something with blast\PYGZus{}record}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{blast\PYGZus{}record} \PYG{o}{=} \PYG{n+nb}{next}\PYG{p}{(}\PYG{n}{blast\PYGZus{}records}\PYG{p}{)}
\PYG{g+go}{\PYGZsh{} ... do something with blast\PYGZus{}record}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{blast\PYGZus{}record} \PYG{o}{=} \PYG{n+nb}{next}\PYG{p}{(}\PYG{n}{blast\PYGZus{}records}\PYG{p}{)}
\PYG{g+go}{\PYGZsh{} ... do something with blast\PYGZus{}record}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{blast\PYGZus{}record} \PYG{o}{=} \PYG{n+nb}{next}\PYG{p}{(}\PYG{n}{blast\PYGZus{}records}\PYG{p}{)}
\PYG{g+gt}{Traceback (most recent call last):}
  File \PYG{n+nb}{\PYGZdq{}\PYGZlt{}stdin\PYGZgt{}\PYGZdq{}}, line \PYG{l+m}{1}, in \PYG{n}{\PYGZlt{}module\PYGZgt{}}
\PYG{g+gr}{StopIteration}
\PYG{g+go}{\PYGZsh{} No further records}
\end{Verbatim}
