<filename>self_replicating.py
#!/usr/bin/env python
S="'"; D='"'; E=';'; C=','; B='#!/usr/bin/env python'
G='print B; print "S="+D+S+D+E, "D="+S+D+S+E, "E="+S+E+S+E, "C="+S+C+S+E, "B="+S+B+S; print "G="+S+G+S; print G'
print B; print "S="+D+S+D+E, "D="+S+D+S+E, "E="+S+E+S+E, "C="+S+C+S+E, "B="+S+B+S; print "G="+S+G+S; print G

<filename>self_replicating.py
#!/usr/bin/env python
S="'"; D='"'; E=';'; C=','; B='#!/usr/bin/env python'
G='print B; print "S="+D+S+D+E, "D="+S+D+S+E, "E="+S+E+S+E, "C="+S+C+S+E, "B="+S+B+S; print "G="+S+G+S; print G'
print B; print "S="+D+S+D+E, "D="+S+D+S+E, "E="+S+E+S+E, "C="+S+C+S+E, "B="+S+B+S; print "G="+S+G+S; print G

#!/usr/bin/env python