You should check for programs related with (sequence) Motifs searching.
Biopython has a module for this purpose.
Also you can check the source for LaiaMotifs (here the author) which is directed to peptides but can be easily adapted to DNA.
This is a typical figure you can get with LaiaMotifs:
To answer your question about strategies, LaiaMotifs uses an image for each amino acid. Then it calculates frequencies in each position and resize the images taking into account these values. Each position is a column of letters. Finally you join all columns in the figure. For all this image handling you use the PIL library.