Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

reply to putting a list to file

  • To: mathgroup at
  • Subject: [mg5898] reply to putting a list to file
  • From: lthompso at (Laura Thompson)
  • Date: Sun, 2 Feb 1997 01:33:51 -0500
  • Organization: University of Illinois at Urbana
  • Sender: owner-wri-mathgroup at

Clemens asked me to post this answer:

Hi Laura !
I try to answer your question about putting a list
into a file. So take a list, e.g.


and open a file for writing by assinging a stream to 'str'

 OUT[2]=OutputStream[c:\testdir\test.dat, 17]

(the use of \\ is neccessary under Win311. Perhaps you have
to specify paths in a different way...)
One of the Options of this stream now is

 OUT[3]={FormatType -> InputForm} 

which is not what we actually need, because we want to 
output something. So we have to set this option to


Now we can write the following 


After closing the stream


we can look at the file test.dat :

1   2

3   4

5   6

which is what we desired (hopefully :-))
I hope this helped -
I would appreciate you sending this to the newsgroup
'cause I currently cannot do this ...

(-: clemens.frey at :-)


Laura Thompson wrote:
> I would like to put the output of Print[TableForm[mylist]] to a file which
> will _not_ be used by mathematica...
> I have tried Put, >>, opening a stream, Write, and I get either Null, if I
> include the command Print, or the actual list (in list format) if
> I don't include Print.  I would like it in this case one
> column of data.
> Note: it prints fine to the screen.  I have tried to send % to a file (no
> luck) as well as named output...I get Null.
> thanks,
> Laura

  • Prev by Date: Re: Boundary value problems in Mathematica 3.0
  • Next by Date: Help with Convert to InputForm
  • Previous by thread: Re: Re: Boundary value problems in Mathematica 3.0
  • Next by thread: Help with Convert to InputForm