[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-13 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution: works for me -> not a bug

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-13 Thread Stefan Vasilev


Stefan Vasilev  added the comment:

Ah, I see now. What a coincidence :)
Thank you for explaining that!

--
resolution: not a bug -> works for me

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

This is happening because the string "ID" is special to the SYLK format: 
https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-12 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Both CSV and SYLK are text formats used by Excel.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-12 Thread R. David Murray


R. David Murray  added the comment:

It doesn't look like this has anything to do with Python.  This sounds like a 
question more appropriate for an Excel help forum.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-12 Thread Stefan Vasilev


New submission from Stefan Vasilev :

import csv
csv.writer(open('./file.csv', 'a', newline='')).writerow(['ID', 0])

If you try to open file.csv with Excel on Windows 10 it says:
The file format and extension of 'file.csv' don't match. The file could be 
corrupted or unsafe. Unless you trust its source don't open it. Do you want to 
open it anyway.

When you click 'Yes', another msgbox appears saying:
Excel has detected that 'file.csv' is a SYLK file, but cannot load it. Either 
the file has errors or it is not a SYLK fyle format. Click OK to try to open 
the file in a different format.

When you click on 'OK' it opens it as expected.

The strange thing is that if you use the following code, there are no problems 
opening it:
import csv
csv.writer(open('./file.csv', 'a', newline='')).writerow(['Id', 0])

--
components: Windows
messages: 319378
nosy: Stefan Vasilev, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Writing capital letters with csvwriter.writerow changes the csv file 
format
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com