[Tutor] get columns from txt file

Dave Angel d at davea.name
Sat Jul 14 13:21:23 CEST 2012


On 07/13/2012 05:09 AM, susana moreno colomer wrote:
> 
> 
> Hi!
> I am sorry, but still I don't get it!

1) please don't top-post.  Put your new comments AFTER the part you're
quoting.  Or don't bother quoting, if you think your stuff stands alone.

2) please do a Reply-all, or equivalent.  Anyway, make sure the
python-tutor is included in the list of recipients.  Otherwise, you're
just sending private mail.


> I am trying with this (the code is attached)

3) Don't try to send attachments to the list, They don't work
everywhere.  This is a text list, so your messages should be plain text,
not html, and without colors, bold, or attachments.  For example, I
don't see any code.  But it doesn't matter, as more importantly, I don't
see the output of your code.

>  
> csv_out=csv.writer(open('out1.csv', 'wb'), delimiter=' ', quoting=csv.QUOTE_ALL, dialect='excel')
> and 
> csv_out=csv.writer(open('out1.csv', 'wb'), dialect='excel-tab')
>  
> When I open out1 with text editor, I get 6 columns, but when I open it with excel I get one column (6 numbers on each cell, how can I separate it it???)

As Marc requested in another message, please paste the first few lines
of that out1 text file into your reply, so somebody that knows Excel
(better than I) can try to guess why it's not being imported correctly.

>  
> The files from wich I get the columns are txt files.
>  
> Many thanks!!
> 
<SNIP>
-- 

DaveA




More information about the Tutor mailing list