Hi guys!

I'm new to python so please be aware that I'm probably missing the
obvious. Here's my problem...

>>> t = "AUX"
>>> f = open('c:\\' + t + '.csv', 'a')

Traceback (most recent call last):
  File "<pyshell#37>", line 1, in <module>
    f = open('c:\\' + t + '.csv', 'a')
IOError: [Errno 2] No such file or directory: 'c:\\AUX.csv'
>>> t = "A"
>>> f = open('c:\\' + t + '.csv', 'a')
>>>

As you can see python has no problem opening a file when t = "A", but
not when it is "AUX" (no "A.csv" or "AUX.csv" exists on the C:\ folder
prior to when these are run).

Is there any way I can create an "AUX.csv" file without the error?

Thanks,

Ryan

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to