Maybe I'm missing something, but is the following valid?
#!/usr/bin/python2
print open(__file__).read()
# do other stuff as well
That is, why not just print the source file, rather than store the code within itself?