#!/usr/bin/env python
# Holy fucking shit I wrote a quine!
# You wouldn't believe how baked I am.
code ="#!/usr/bin/env python\n# Holy fucking shit I wrote a quine!\n# You wouldn't believe how baked I am.\n\ncode =\"__code__\"\n\ndef regurgitate(text):\n \"\"\"Hi, I regurgitate stuff, but escaped.\"\"\"\n text = text.replace(\"\\\\\",\"\\\\\\\\\")\n text = text.replace('\"', \"\\\\\\\"\")\n text = text.replace('\\n',\"\\\\n\")\n return text\n\ndef main():\n \"\"\"I seem to be the entry point, sir.\"\"\"\n print code.replace(\"__code__\", regurgitate(code), 1)\n\nif __name__ == \"__main__\":\n main()\n\n"
def regurgitate(text):
"""Hi, I regurgitate stuff, but escaped."""
text = text.replace("\\","\\\\")
text = text.replace('"', "\\\"")
text = text.replace('\n',"\\n")
return text
def main():
"""I seem to be the entry point, sir."""
print code.replace("__code__", regurgitate(code), 1)
if __name__ == "__main__":
main()