* 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:
parent
6a5c66aa31
commit
41fef8d7d6
@ -14,6 +14,10 @@
|
|||||||
* src/plugins/StatisticsChart.py: Minor stylistic corrections.
|
* src/plugins/StatisticsChart.py: Minor stylistic corrections.
|
||||||
* src/GenericFilter.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>
|
2005-05-16 Don Allingham <don@gramps-project.org>
|
||||||
* src/FamilyView.py: fix reordering of children in family view
|
* src/FamilyView.py: fix reordering of children in family view
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
import string
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# 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
|
# 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
|
import NameDisplay
|
||||||
|
|
||||||
@ -126,15 +125,15 @@ class SubstKeywords:
|
|||||||
def replace(self,line):
|
def replace(self,line):
|
||||||
"""Returns a new line of text with the substitutions performed."""
|
"""Returns a new line of text with the substitutions performed."""
|
||||||
|
|
||||||
line = string.replace(line,"$n",self.n)
|
line = line.replace("$n",self.n)
|
||||||
line = string.replace(line,"$N",self.N)
|
line = line.replace("$N",self.N)
|
||||||
line = string.replace(line,"$b",self.b)
|
line = line.replace("$b",self.b)
|
||||||
line = string.replace(line,"$B",self.B)
|
line = line.replace("$B",self.B)
|
||||||
line = string.replace(line,"$d",self.d)
|
line = line.replace("$d",self.d)
|
||||||
line = string.replace(line,"$D",self.D)
|
line = line.replace("$D",self.D)
|
||||||
line = string.replace(line,"$i",self.i)
|
line = line.replace("$i",self.i)
|
||||||
line = string.replace(line,"$S",self.S)
|
line = line.replace("$S",self.S)
|
||||||
line = string.replace(line,"$s",self.s)
|
line = line.replace("$s",self.s)
|
||||||
line = string.replace(line,"$m",self.m)
|
line = line.replace("$m",self.m)
|
||||||
line = string.replace(line,"$M",self.M)
|
line = line.replace("$M",self.M)
|
||||||
return string.replace(line,"$$",'$')
|
return line.replace("$$",'$')
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# 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
|
# 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
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
import gzip
|
import gzip
|
||||||
import cStringIO
|
import cStringIO
|
||||||
import string
|
|
||||||
|
|
||||||
_BLKSIZE=512
|
_BLKSIZE=512
|
||||||
nul = '\0'
|
nul = '\0'
|
||||||
@ -109,7 +111,7 @@ class ReadTarFile:
|
|||||||
if filename == None:
|
if filename == None:
|
||||||
return data
|
return data
|
||||||
self.f.read(24) # modes
|
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)
|
length = int(l,8)
|
||||||
self.f.read(12)
|
self.f.read(12)
|
||||||
self.f.read(6)
|
self.f.read(6)
|
||||||
@ -158,4 +160,3 @@ class ReadTarFile:
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.f.close()
|
self.f.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user