[SciPy-user] efficiently importing ascii data

Bill Dandreta wjdandreta at att.net
Mon Nov 14 07:10:48 CST 2005


Darren Dale wrote:

>I was wondering if the fromstring function could be expanded to include ascii 
>strings. Right now, I'm considering reading my messy file, creating a neatly 
>formatted string, writing that string back into a temporary file, and then 
>using the fromfile function. It would be so much nicer to just create the 
>array from the string itself.
>
>Darren
>
You might be able to use an 'in memory file' using StringIO from the 
StringIO module.

Bill




More information about the SciPy-user mailing list