BedTool.
introns
Create intron features (requires specific input format).
Given a BED12 or a GFF with exons, create a new BedTool with just introns. The output is a bed6 file with the score column (5) being one of 'intron'/'utr5'/'utr3'
BedTool
pybedtools