[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] How about including an init command?
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] How about including an init command? |
Date: |
Wed, 14 Oct 2009 19:52:02 -0400 |
Hey Taras,
Can you give an example of "all the imports"? Offhand the only ones
you might want to have in every fabfile would be:
from __future__ import with_statement # on 2.5 only
from fabric.api import * # "bad practices" but useful for us
from fabric.contrib.x import y # pretty situational really
Given that the 3rd line isn't part of the real base package, that's
only 2 lines (and only one line on Python 2.6!) :)
If your concern is to avoid the "from anything import *", then the
issue is that best practice vs code generation (a non-best practice
typically) and honestly I'd say code generation loses that particular
battle ;)
Let me know your particular situation, though.
-Jeff
On Wed, Oct 14, 2009 at 6:53 PM, Taras Mankovski <address@hidden> wrote:
> Hey Jeff,
>
> It would be great to be able to run init and it would generate a
> fabfile.py with all of the imports.
>
> It would save some copy and pasting from other scripts or looking for
> the import statements.
>
> What do you think?
>
> Taras
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>