What is the best way to open a file as reading/write if it exists, or if it does not, then create it and open it as read/write? From what I read, file = open('myfile.dat', 'rw') should do this, right?
It is not working for me (Python 2.6.2) and I'm wondering if it is a version problem, or not supposed to work like that or what.
The bottom line is, I just need a solution to the problem. I am curious about the other stuff, but all I need is a nice way to do the opening part.