Thanks for the suggestion, but it doesn't appear to work for me. My code is
csv.reader(open('http://myserver/xxx.csv'))
and I have verified that the url is correct, but I get "No such file or
directory: 'http://...'".
It works fine on a cocalc server with the csv file in the project the worksheet
is in, and using just the local file name.
I did find a slightly more cumbersome way to do this using the Pandas data
analyis library--there is a read_csv function that will read from a URL.
-- David
On Tuesday, October 22, 2019 at 12:16:04 PM UTC-7, Nils Bruin wrote:
>
> On Tuesday, October 22, 2019 at 8:52:44 AM UTC-7, david.guichard wrote:
>>
>> I have a cocalc sage worksheet that reads data from a csv file. Is there
>> any way to do this in the single cell server, that is, read data from an
>> external file? I'm guessing not, but it would be handy.
>>
>
> Accessing a file from a single cell server should be possible via the
> normal means. Putting the file in a location where the single cell server
> has access to it is probably a problem. If you put the data at a publicly
> accessible http(s) location, you should be able to refer to the resource by
> its URL and fetch your data that way. Obviously, you should run pretty
> quickly into resource limitations put on sagecell processes. If you don't
> then you'll probably find that that particular sagecell server will be very
> unreliable, because it will be put out of commission by people running very
> resource-hungry processes on it.
>
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/bacd5c05-7282-469c-9616-fe03d97661d2%40googlegroups.com.