Python importing modules in functions
If I have code in a function that imports modules inside a function is that bad? Does it reimport it every time the function is run, therefore making the code inefficient?
I have code for a function that tried to import a module only on Windows and if it cannot import it defines a function with the same name that does the same thing in Linux. (This way the function will run in Windows and Linux).
Fedora 16 64 Bit (Fedora 13 install upgraded to 14 with preupgrade, then 15 using --distro-sync) - KDE 4.6.5 HDD Reporting SMART erorrs, using SSD with Fedora 20, XFCE install with yum install @kde-desktop