I am a beginner in Python and i am reading Wrox's *"Beginning Python Using Python 2.6 and Python 3.1"*... There is one certain example in chapter 8 about using files and directories that has troubled me a lot... The following function is supposed to create (if it doesn't exist) and write in a text file:

```
def write_to_file():
f=open("C:/Python33/test.txt","w")
f.write("TEST TEST TEST TEST")
f.close()

```

When i run the function nothing happens, no text file is created and no error message is returned...

When i run the code in IDLE, command by command, it works perfectly...

What is wrong with the function???