Region: IOError: [Errno 22] invalid mode ('w') or filename
<p>I'm not sure why, but for some reason, whenever I have "region" in the file name of the output file, it give me this error:</p>

<p>IOError: [Errno 22] invalid mode ('w') or filename: 'path\regionlog.txt'</p>

<p>it does this for "region.txt", "logregion.txt", etc.</p>

<pre><code>class writeTo:
    def __init__(self, stdout, name):
       self.stdout = stdout
       self.log = file(name, 'w') #here is where it says the error occurs

output = os.path.abspath('path\regionlog.txt')
writer = writeTo(sys.stdout, output) #and here too
</code></pre>

<p>Why is this? I really would like to name my file "regionlog.txt" but it keeps coming up with that error. Is there a way around it?</p>
