User:EMBee/Scrap

From Rosetta Code
Revision as of 06:22, 4 December 2011 by rosettacode>EMBee (saving this here so i can do the talk on another computer)

Python

<lang Python>import os targetfile = "pycon-china" os.rename(os.path.realpath(targetfile), os.path.realpath(targetfile)+".bak") f = open(os.path.realpath(targetfile), "w") f.write("this task was solved during a talk about rosettacode at the PyCon China in 2011") f.close()</lang>