What we did at UBZ
Jan Nieuwenhuizen
janneke at gnu.org
Fri Nov 18 16:23:19 GMT 2005
John A. Meinel writes:
> for f in os.listdir('.'):
> if not (f.startswith('test') and f.endswith('.py')):
> continue
> if f.startswith('test_'):
> g = f[5:]
> else:
> g = f[4:]
> bzr mv f g
>
Can't you do something like
import glob, re
for i in glob.glob ('test_*py'):
print 'mv %s %s' % (i, re.sub ('^test_*', '', i))
in ipython? Or just do
rename 'test_*' '' test_*.py
FTM?
Jan.
--
Jan Nieuwenhuizen <janneke at gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org
More information about the bazaar
mailing list