On 9 Jan 2006 10:09:19 -0800 in comp.lang.python, "Patrick Allaire" <[EMAIL PROTECTED]> wrote:
>How to create a script that list itself ? Stealing from the old C chestnut: s="s=%c%s%c;print s%%(34,s,34)";print s%(34,s,34) > >I would like to know, where is the script's code is stored once we >start it. I know I can achieve that, using files : Well, in the above, the script (or rather, the information necessary to print the script) is actually stored in a string that is part of the script... Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list