fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] List of files in directory


From: Jeff Forcier
Subject: Re: [Fab-user] List of files in directory
Date: Mon, 11 Jul 2011 10:42:46 -0700

On Mon, Jul 11, 2011 at 8:22 AM, Ricklef Wohlers
<address@hidden> wrote:
> Hi,
>
> Thanks for the answer. I think it would be fair to state that using bash 
> commands aren't the most pythonic way of doing this.

Well, for *this specific* application -- where the use case overlaps
with SFTP functionality -- sure, perhaps. But given that everything
else in this area of work *does* have to be partly shell driven, I
don't think it's unfair to ask users to set aside their Python biases
for a bit ;)

> From what I understand, fabric uses paramiko. Would it make sense to extend 
> fabric.contrib.files with some wrappers for paramiko.sftpclient functions? 
> Alternatively it would make sense to allow access to the sftp functions..
> I was thinking of writing a patch to add the wrapper functions, but would 
> only do so if it would actually have a chance of being added to fabric. Would 
> it have a chance?

That might work, sure. Please make sure you look at the existing SFTP
wrappers used for put/get (see fabric/sftp.py) and build off of that
if possible.

I can't promise an immediate merge (there is a lot of other stuff in
the wings right now) but this sort of addition certainly feels
reasonable to me, provided it fits well with the rest of the API.

Thanks,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

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