Home | Trees | Indices | Help |
---|
|
1 ############################################################################### 2 # 3 # sabx10 - an SABX file manipulation library 4 # Copyright (C) 2009, 2010 Jay Farrimond (jay@sabikerides.com) 5 # 6 # This file is part of sabx10. 7 # 8 # sabx10 is free software: you can redistribute it and/or modify it under the 9 # terms of the GNU General Public License as published by the Free Software 10 # Foundation, either version 3 of the License, or (at your option) any later 11 # version. 12 # 13 # sabx10 is distributed in the hope that it will be useful, but WITHOUT ANY 14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License along with 18 # sabx10. If not, see <http://www.gnu.org/licenses/>. 19 # 20 ############################################################################### 21 """ 22 Miscellaneous utilities for use with templating. 23 """ 2426 """ 27 Make sure a path C{string} doesn't have an ending slash. 28 29 We do this because jinja2 doesn't have os.path.join functionality 30 31 @param path: path C{string} to check 32 @type path: C{string} 33 34 @return: path C{string} with no ending slash 35 @rtype: C{string} 36 """ 37 if path[-1] == '/': 38 path = path[:-1] 39 return path40
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat May 1 23:03:31 2010 | http://epydoc.sourceforge.net |