2

I want to copy all a folder to the remote machine with fabric, normally I can use the function put, But I just want to copy python files in the folder and not .pyc files, so how can I process? Thanks

nam
  • 3,542
  • 9
  • 46
  • 68

1 Answers1

1

For remote mode you can retrieve only the .py files by putting:

find /some/path -name '*.py'
Voislav Sauca
  • 3,007
  • 2
  • 18
  • 12
  • how do i merge this in a ``copy`` function? And does it create automatically new folder in the remote folder? – nam Jan 30 '13 at 14:24
  • Check this [example](http://stackoverflow.com/questions/5314711/python-how-do-i-copy-a-directory-to-a-remote-machine-using-fabric) – Voislav Sauca Jan 30 '13 at 14:53
  • I've checked the example but could not find anything about file type filter in copy process... – nam Feb 04 '13 at 17:22