If your script is "myScript.py" you can compile it by running the script below:-
###############
import myScript
###############
Save the script in the same folder as myScript.py
You may find this Python for Poser of interest.
![](http://www.philc.net/images/thumb/Python_for_Poser_THUMB.jpg)
I would have killed for it when I started writing Python scripts :)