fab-user
[Top][All Lists]
Advanced

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

[Fab-user] How do I search for files remotely using glob.glob?


From: Yungwei Chen
Subject: [Fab-user] How do I search for files remotely using glob.glob?
Date: Fri, 24 Sep 2010 18:27:52 -0400

Hi,

I am trying to find a file on the remote machine using glob.glob, but it 
doesn't do that on the remote machine. 
Do I need to install python 2.6 on the remote machine?
What am I missing here? Thanks.

Here's the fabfile:

import glob, os, time, sys
env.hosts = ['address@hidden']
....
def copy_latest_model():
    last_mod_file = ""
    for file in glob.glob("/var/lib/mysql-backup/*"):
        if (file > last_mod_file):
            last_mod_file = file
    print last_mod_file,"is the last modified."




reply via email to

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