[erlang-questions] Getting a password from escript / I/O server introduction

Mikhail Sobolev mikhail.sobolev@REDACTED
Thu Nov 24 10:19:06 CET 2011


Hi Raimo,

On 24 November 2011 10:41, Raimo Niskanen <
raimo+erlang-questions@REDACTED> wrote:

> On Thu, Nov 24, 2011 at 10:34:39AM +0200, Mikhail Sobolev wrote:
> > Hi Alex,
> >
> > On 24 November 2011 10:18, Alex Shneyderman <a.shneyderman@REDACTED>
> wrote:
> >
> > > You expect the get_line not to print anything?
>
> Have you tried the simple solution man io suggests; here tried in the
> shell not tried in an escript:
>
> Eshell V5.8.4  (abort with ^G)
> 1> f(V), io:setopts([{echo,false}]), V = io:get_line("Prompt> "),
> io:setopts([{echo,true}]), {got,V}.
> Prompt> {got,"hello\n"}
>
> Nothing is echoed when I type "hello" but the result {got,V}
> is printed by the shell.
>
> Yes, I have.  However this is where the problem appears: io:setopts
returns {error,enotsup} and this seem to be the difference between the
shell and escript.

--
Misha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111124/2495a744/attachment.htm>


More information about the erlang-questions mailing list