canfar/vos — pull request #47 by ijiraq (2014-12-03 19:01:30+00:00)
Title: S1724 - allow pattern-matching in vcp commands.

This story should enable the vcp command to use patterns against the return result from VOSpace.

To implement this the glob module (standard python) was added to the vos.Client class as a set of methods. Those methods used various file-system calls to build the glob list and those calls were mapped to vos.Client methods. Then, vcp was modified to use the Client.glob() method to build a file list. To all image cutout patterns to be on the end of the filenames, those were first stripped from the pattern (before passing to Client.glob).

These sorts of patterns should work:

vcp vos:rootNode/*.txt ./

vcp vos:rootNode/391[0-9]*.fits[1][1:100,1:100] ./

the second one above should match all fits images between 3910.fits and 3919.fits and attempt retrieve extension 1 in the pixel range 1:100,1:100.

NOTE: There are lots of file-format tweaks as I accidentally did a PEP-8 file cleanup command.