[issue32116] CSV import and export simplified

2017-11-24 Thread Paul Long

Change by Paul Long <p...@paullong.net>:


--
keywords: +patch
pull_requests: +4478
stage:  -> patch review

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32116>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32116] CSV import and export simplified

2017-11-22 Thread Paul Long

Paul Long <p...@paullong.net> added the comment:

Thanks for your advice.  The reason it's not provided as a canned function is 
because different schools can use different programming languages, although the 
vast majority choose to use Python.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32116>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32116] CSV import and export simplified

2017-11-22 Thread Paul Long

Paul Long <p...@paullong.net> added the comment:

I should have added that there are thousands of 15 year old students completing 
GCSE Computer Science who would benefit massively from this.  All the exam 
boards in England require students to be able to read from and write to CSV 
files.  The complicated way of doing it in Python is making this quite 
inaccessible to most students and so although many programmers in general 
wouldn't need this very often, there are literally thousands of students who 
would benefit from this enhancement.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32116>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32116] CSV import and export simplified

2017-11-22 Thread Paul Long

New submission from Paul Long <p...@paullong.net>:

It would be helpful if the CSV module included standard functions that simplify 
the import of CSV files to a list and the export of CSV files to a list.  
Here's an example of what they could be:

def csv2list(file_name): 
list_name=[] 
with open(file_name) as csvfile:
readerfile = reader(csvfile)
for row in readerfile:
list_name.append(row)
return list_name

def list2csv(list_name,file_name):
with open(file_name, 'w', newline='') as csvfile:
writerfile = csv.writer(csvfile)
writerfile.writerows(list_name)

--
components: Library (Lib)
messages: 306746
nosy: paullongnet
priority: normal
severity: normal
status: open
title: CSV import and export simplified
type: enhancement

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32116>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com