* src/TarFile.py: Indent with spaces, remove string module.

* src/RelImage.py: Remove unused string module.
* src/SubstKeywords.py: Remove string module.


svn: r4604
This commit is contained in:
Alex Roitman 2005-05-17 03:43:36 +00:00
parent 6a5c66aa31
commit 41fef8d7d6
4 changed files with 62 additions and 59 deletions

View File

@ -14,6 +14,10 @@
* src/plugins/StatisticsChart.py: Minor stylistic corrections.
* src/GenericFilter.py: Minor stylistic corrections.
* src/TarFile.py: Indent with spaces, remove string module.
* src/RelImage.py: Remove unused string module.
* src/SubstKeywords.py: Remove string module.
2005-05-16 Don Allingham <don@gramps-project.org>
* src/FamilyView.py: fix reordering of children in family view

View File

@ -24,7 +24,6 @@
#
#-------------------------------------------------------------------------
import os
import string
#-------------------------------------------------------------------------
#

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2004 Donald N. Allingham
# Copyright (C) 2000-2005 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -37,10 +37,9 @@ __version__ = "$Revision$"
#------------------------------------------------------------------------
#
# python classes
# Gramps modules
#
#------------------------------------------------------------------------
import string
import NameDisplay
@ -126,15 +125,15 @@ class SubstKeywords:
def replace(self,line):
"""Returns a new line of text with the substitutions performed."""
line = string.replace(line,"$n",self.n)
line = string.replace(line,"$N",self.N)
line = string.replace(line,"$b",self.b)
line = string.replace(line,"$B",self.B)
line = string.replace(line,"$d",self.d)
line = string.replace(line,"$D",self.D)
line = string.replace(line,"$i",self.i)
line = string.replace(line,"$S",self.S)
line = string.replace(line,"$s",self.s)
line = string.replace(line,"$m",self.m)
line = string.replace(line,"$M",self.M)
return string.replace(line,"$$",'$')
line = line.replace("$n",self.n)
line = line.replace("$N",self.N)
line = line.replace("$b",self.b)
line = line.replace("$B",self.B)
line = line.replace("$d",self.d)
line = line.replace("$D",self.D)
line = line.replace("$i",self.i)
line = line.replace("$S",self.S)
line = line.replace("$s",self.s)
line = line.replace("$m",self.m)
line = line.replace("$M",self.M)
return line.replace("$$",'$')

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
# Copyright (C) 2000-2005 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -17,9 +17,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id$
import gzip
import cStringIO
import string
_BLKSIZE=512
nul = '\0'
@ -109,7 +111,7 @@ class ReadTarFile:
if filename == None:
return data
self.f.read(24) # modes
l = string.replace(self.f.read(12),chr(0),' ')
l = self.f.read(12)(chr(0),' ')
length = int(l,8)
self.f.read(12)
self.f.read(6)
@ -158,4 +160,3 @@ class ReadTarFile:
def close(self):
self.f.close()