help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: urlread


From: Alexander Barth
Subject: Re: urlread
Date: Tue, 9 Oct 2007 11:33:06 -0400

On 10/9/07, John W. Eaton <address@hidden> wrote:
> On  9-Oct-2007, Alexander Barth wrote:
>
> | GAIL wrote:
> | > The urlread function doesn't do anything for me; it just returns the 
> empty string, as follows:
> | >
> | > octave> urlread ("ftp://ftp.octave.org/pub/octave/README";);
> | > ans =
> | >
> | >
> | > I use octave-2.9.14. What am I doing wrong?
> | >
> | Which
> |
> | Do you have curl (library and in development package) installed?
> | They are named libcurl3 and libcurl3-dev in Ubuntu/Debian and curl and 
> curl-devel in Fedora.
> | The configure script should tell you if curl was found.
> |
> | (You didn't specify the operating system you are using and from where you 
> got octave. I assumed that
> | you compiled from source under Linux).
>
> Perhaps instead of
>
>   #if defined (HAVE_CURL)
>     [...]
>   #else
>     retval(2) = "urlread: not available in this version of Octave";
>     retval(1) = 0;
>     retval(0) = "";
>   #endif
>
> in urlread, we should have
>
>   #if defined (HAVE_CURL)
>     [...]
>   #else
>     error ("urlread: not available in this version of Octave");
>   #endif
>
> I think that would be more consistent with what happens for other
> functions which are not available due to missing libraries or OS
> features.
>

I agree since the error will not be visible unless a third output
argument is used (idem for urlwrite). Since we are at
urlread/urlwrite, would you agree to disable by default the progress
information? If the screen output is redirected to a log file, the
progress informations unnecessarily clutters the log file. Matlab does
not return progress information either.
I can prepare a patch once we agree on the changes to urlwrite.cc.

Thanks
Alex


reply via email to

[Prev in Thread] Current Thread [Next in Thread]