Preventing Python code from importing certain modules