> stop the code I'm writing, jump to the top of the file, import re, go back to where I was.
If you're just shitting out a one off script and that's really a problem for you, you can just "import re" where you are, there's nothing other than convention and scope that forces you to import everything at the top. Given thats also a problem with sys and os, importing all the commonly used libraries and carrying that around as a template (from print import pprint, anyone?) also seems reasonable, if that's really a problem for you.
If you're just shitting out a one off script and that's really a problem for you, you can just "import re" where you are, there's nothing other than convention and scope that forces you to import everything at the top. Given thats also a problem with sys and os, importing all the commonly used libraries and carrying that around as a template (from print import pprint, anyone?) also seems reasonable, if that's really a problem for you.