has nothing to do with python. go into your scene and hit 8 for for the environment and effects window(or go Rendering -> Environment) and change the ambient colour to black
As long as there's enough power(350W is probably not enough) and cooling, I think a new GPU is worth trying as the cpu(Q9300) and the ram(8 gb) are nice.