On Wed, Oct 29, 2008 at 9:33 PM, Justin C. Walker <[EMAIL PROTECTED]> wrote:
>
>
> On Oct 27, 2008, at 23:32 , William Stein wrote:
>
>>
>> On Mon, Oct 27, 2008 at 7:26 PM, Jason Grout
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Justin C. Walker wrote:
> [snip]
>>> I believe that it will be uploaded/downloaded to the $DATA
>>> directory, so
>>> it could be attached with:
>>>
>>> attach $DATA/filename.sage
>>>
>>> I haven't tried, it, though.
>>
>> You can upload a file just like an image into a given worksheet,
>> and it appears in the data directory.  Then I think you can do
>>
>>   attach filename.sage
>>
>> (without the $DATA).  I'm pretty sure that works in
>> recent versions of Sage.
>
> I did a little more poking today, based on helpful comments from
> William, Jason, and Timothy.  Part of my problem is I can't read
> Japanese so well, so the going is slow :-}
>
> After a little probing, I think I understand the way it works.  I have
> a couple of questions to clarify a few points:
>
>  - I use the "Data" popup to get the file in question
>    from the client (windows system) to the server
>    (VMWare/Linux virtual system).  The resulting webpage
>    says that I can refer to the newly "uploaded" file by
>    "DATA+foo", "foo" being the name of the file.
>    When I subsequently did an "attach" from the notebook,
>    I just typed "attach foo" and it worked.

Yep, because I added some code recently so that would
"just work".  Doing attach DATA+"foo" won't, since attach
isn't smart enough to evaluate it's arguments.

>    Question: When do I use "DATA+"?

If you attached e.g., a big table of numbers foo.dat, and
in your python code wanted to do

  open('foo.dat').read()

it would fail, since the open command is not run in the
DATA directory.  Instead do
  open(DATA + '/foo.dat').read()

>
>  - To develop sage code (i.e., stuff in ".sage" files),
>    there seems to be two ways to go:
>    1. Get an ssh client and ssh into the VMWare system,
>       and use Linux editors.  The 'attach' will keep
>       reloading the modified file.

True.

>    2. Use a windows editor, and repeatedly upload and
>       save the file.  The 'attach' will keep reloading
>       the modified file.

True.

>    Question: Is this correct?

3. There is also a way to edit a file under Windows and have
it automatically get uploaded via scp into the virtual machine
whenever it is saved.   I think http://winscp.net nicely supports
this.

4. Using VMware workstation's "shared folders" feature, which
makes it so sage under vmware can read/write the files
that you have under windows, then use a standard windows
editor on those windows files.

If you can set it up, I think 4 is the best.

william

>
> Thanks as always.
>
> Justin
>
> --
> Justin C. Walker, Curmudgeon at Large
> Institute for the Absorption of Federal Funds
> -----------
> My wife 'n kids 'n dogs are gone,
> I can't get Jesus on the phone,
> But Ol' Milwaukee's Best is my best friend.
> -----------
>
>
>
> >
>



-- 
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to