fab-user
[Top][All Lists]
Advanced

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

[Fab-user] how to hide a method that's not a command, and how to alias a


From: Phlip
Subject: [Fab-user] how to hide a method that's not a command, and how to alias a command
Date: Wed, 10 Feb 2010 15:16:52 -0800

Fabbers:

I am using fab's command system to develop common command lines for our crew.

I put all the common project management code into a shared library,
fab_util.py, that each project's custom fabfile.py can reach. And this
shared library is getting full of support routines. I don't need them
showing up in the fab -l.

I can prefix them with _, such as def _find_changed_tests(), but if I
forgot the prefix (or if Python handed me some overwhelming reason to
not underbar the non-command method), how can I hide the method? Is
there a code @decorator?

Similarly, I wanted to let them integrate (to git, btw) using...

   fab int

...but I can't, because that overloads Python's kernel int() command,
causing mayhem when I, for example, attempt to parse numbers.
(Generally more mayhem than int() _usually_ causes!)

So how could I call the command '_int', and then rename it so its
command line argument is "int"?

-- 
  Phlip
  http://c2.com/cgi/wiki?MoreliaViridis




reply via email to

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