On Jun 9, 4:43 am, dbjohn <johndbren...@gmail.com> wrote:
> I published two worksheets: called testpublish1 and testpublish2. I
> haven't managed to successfully load either of them. I tried different
> combinations
> 'http://www.sagenb.org/home/pub/2127/'is the correct url of the
> worksheet.
>
> load('http://www.sagenb.org/home/pub/2127/')
> load('http://www.sagenb.org/home/pub/2127/testpublish1.py')   #with...
> load('http://www.sagenb.org/home/pub/2129/testpublish2.pyx')
> load('http://www.sagenb.org/home/pub/testpublish1.py')
> load('http://www.sagenb.org/home/pub/2127/testpublish1')

As far as I can see, "load" needs a file that contains python or sage
source code -- i.e., a plain text file. A worksheet (also in published
form) is not served in that form. In fact because a worksheet consists
of input, output, graphs and HTML comments, it cannot be served as a
valid ".py" file. You may want to look at the text that is actually
served by the URLs in Jason's example worksheet (his URLs do not point
to a worksheet).

I guess it would be possible to include a modifier to the notebook so
that you get the input as a simple textfile, so that you can do
something like
load("http:/.../home/pub/1234/input_as_python_file")
and perhaps this exists already, but it would require the worksheet to
be particularly constructed so that the result makes sense.

You can already attach data files to a worksheet and once the
worksheet is published, you can refer to those data files:
load('http://www.sagenb.org/home/pub/2127/data/attached_code.py')
See "data -- upload or create file" option on the worksheet for
attaching data files to a worksheet.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to