User:EMBee/Scrap: Difference between revisions
Content added Content deleted
m (content moved to S-Expressions) |
m (saving this here so i can do the talk on another computer) |
||
Line 1: | Line 1: | ||
=={{header|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> |
Revision as of 06:22, 4 December 2011
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>