How to set glow in text object, with python?
The way you setup the scene, the glow is only noticeable if you have another object. It will not cause the 'air' around the text to glow.

Below is my test render when I run your script with a plane. I this what you want?



If you want the air around the text to glow, approximate ambient occlusion cannot give you that. You'll need to use the compositor.