How can I exclude certain ports from the firewall notifications?
The dialog is not coming from ipfw but from socketfilterfw, the OS X Application based firewall. That one is not port based, like ipfw but based on processes. If an application/script wants to bind a port the application firewall checks it's ruleset and subsequently asks the user if that should be allowed which is what you already see. If you allow this, the binary in question gets signed and is allowed access in the future without user interaction. If the binary changes, you get asked again.  

The only way to prevent getting asked is to turn off the app firewall which I do not recommend. Alternatively you could start signing each change of your python files which is likely to become annoying.

Sidenote: If you need a port based firewall as well you should be using pf (pf.conf(5), pfctl(8)) on Mountain-Lion as ipfw is deprecated.