fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Add New Feature: expect object


From: Jasper van den Bosch
Subject: Re: [Fab-user] Add New Feature: expect object
Date: Mon, 5 Nov 2012 13:56:28 +0100

I understand the confusion, I failed to explain well in my last email.

Fabric prompt is about asking the operator of the fabric script for some variable. We create the prompt ourselves.

Fexpect is about the fabric script reacting to an existing prompt in a command that we want to run. For instance, if the remote command is `rm -i` it will ask for confirmation. A more common use-case is the installation of upgrades, which sometimes ask for permission to overwrite configuration files.
So in your example;

answer = prompt('Specify favorite dish: ', default='spam & eggs')

'Specify favorite dish' is something the remote command, that we cannot change, asks.

I hope this is more clear now.

Jasper


On 5 November 2012 10:57, Herman Schistad <address@hidden> wrote:
On Mon, Nov 5, 2012 at 10:20 AM, Jasper van den Bosch <address@hidden> wrote:
> The fexpect prompt is remote and automatic, the fabric prompt local and
> answered by the user

In what situation would you like to automatically set the answer to a
prompt? Not really a prompt any longer then, is it?
Could you not just use a variable in that use case?

I'm sure the answer to this is quite obvious when I receive it, but I
can't seem to grasp the need for this functionality at this time.

--
Sincerly,
Herman Schistad

_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user



--
Jasper van den Bosch
ilogue.com/jasper

I'd love to see your attachment, but please use OpenDocument, not a proprietary format like docx. It's an international standard, endorsed by the EU, and implemented in many office suites, such as LibreOffice, and commercial products from Oracle, Sun, IBM and Microsoft (from 2007).


reply via email to

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