equal
deleted
inserted
replaced
|
1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
|
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
3 # |
|
4 # This file is part of CubicWeb. |
|
5 # |
|
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
|
7 # terms of the GNU Lesser General Public License as published by the Free |
|
8 # Software Foundation, either version 2.1 of the License, or (at your option) |
|
9 # any later version. |
|
10 # |
|
11 # logilab-common is distributed in the hope that it will be useful, but WITHOUT |
|
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
|
14 # details. |
|
15 # |
|
16 # You should have received a copy of the GNU Lesser General Public License along |
|
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
1 """ |
18 """ |
2 >>> from mode_plan import * |
19 >>> from mode_plan import * |
3 >>> ls() |
20 >>> ls() |
4 <list of directory content> |
21 <list of directory content> |
5 >>> ren('A01','A03') |
22 >>> ren('A01','A03') |
6 rename A010-joe.en.txt to A030-joe.en.txt |
23 rename A010-joe.en.txt to A030-joe.en.txt |
7 accept [y/N]? |
24 accept [y/N]? |
8 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
|
9 """ |
25 """ |
10 |
26 |
11 def ren(a,b): |
27 def ren(a,b): |
12 names = glob.glob('%s*'%a) |
28 names = glob.glob('%s*'%a) |
13 for name in names : |
29 for name in names : |