On Dec 16, 2007 2:51 PM, Lyndon <[EMAIL PROTECTED]> wrote:
>
> Thanks for that.  One more (well hopefully only one) dumb question.
>
> Do I need to put the files to attach and open into a particular
> folder?  I keep getting a "no such file or directory" message when I
> use attach or reader.csv (I have tried the full path names and
> different folders/drives).  I'm using a windows machine but can only
> find help for unix based systems.

I assume you're using sage-vmware.

Anyways, do the following:
  (1) Open a worksheet
  (2) Select Data --> "Upload or create file..."
  (3) Click Browse and select your file (under Windows).
  (4) Click "Upload file"; wait as your file is loaded into that Sage worksheet.
  (5) If the file is called "foo.data", you can now use it from the
SAGE notebook
       by calling it DATA+'foo.data', e.g., to view it do
        print  open(DATA+'foo.data').read()
  (6) You can view your file by going to Data ... --> foo.data

NOTE -- if you change the file under Windows you have to upload it
again in order for Sage to see the changes.   If you want Sage to
instantly see a file that is under Windows you have to somehow
mount the Windows partition in vmware as explained in the other answer
to your email.   One advantage of what is described above is it will work
in exactly the same  with any  Sage notebook server either on some
remote machine or
on your computer.  Also, it is easy and will "Just work", whereas mounting
windows files is potentially complicated, and possibly even dangerous,
since it means that Sage has access to your windows files (which it
does *not* by default -- a nice security precaution).

FAQ maintainer -- this should be in the faq.

>
> cheers.
>
>
>
> On Dec 15, 10:20 pm, "Carlo Hamalainen" <[EMAIL PROTECTED]>
> wrote:
> > On Dec 14, 2007 1:08 PM, Lyndon <[EMAIL PROTECTED]> wrote:
> >
> > > I have some big datasets in SAS, which can be exported as CSV or text
> > > or whatever.  Is it possible to load these into Sage?  If so, how do
> > > you go about it?
> >
> > Sage uses Python as the underlying language, so you can start by
> > looking at the IO section of the Python 
> > Tutorial:http://docs.python.org/tut/node9.html
> > (also read about pickling/unpickling)
> >
> > To save reinventing the wheel, Python has a module for dealing with CSV 
> > files:http://docs.python.org/lib/module-csv.html
> >
> > Some examples of reading CSV 
> > files:http://docs.python.org/lib/csv-examples.html
> >
> > You can paste those examples into blah.sage and then run the file from
> > a notebook or do
> >
> > sage:attach'blah.sage'
> >
> > at the command line.
> >
> > > Is this the kind of thing that one could code up in Sage?
> >
> > Yep :)
> >
> > --
> > Carlo Hamalainenhttp://carlo-hamalainen.net
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to