Update of /cvsroot/pythoncard/PythonCard/samples/life
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6597
Modified Files:
life.py
Log Message:
lexicon.txt fix
Index: life.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/life/life.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** life.py 28 Sep 2004 05:00:26 -0000 1.45
--- life.py 28 Sep 2004 05:05:08 -0000 1.46
***************
*** 67,72 ****
basePath = self.application.applicationDirectory
self.lexiconPath = os.path.join(self.configPath, 'lexicon.txt')
! if not os.path.exists(self.lexiconPath):
! shutil.copy2(os.path.join(basePath, 'lexicon.txt'), self.lexiconPath)
self.patternsPath = os.path.join(self.configPath, 'patterns')
if not os.path.exists(self.patternsPath):
--- 67,77 ----
basePath = self.application.applicationDirectory
self.lexiconPath = os.path.join(self.configPath, 'lexicon.txt')
! try:
! if not os.path.exists(self.lexiconPath):
! shutil.copy2(os.path.join(basePath, 'lexicon.txt'), self.lexiconPath)
! except:
! # currently lexicon.txt is not part of the distribution
! # but it might be in the future
! pass
self.patternsPath = os.path.join(self.configPath, 'patterns')
if not os.path.exists(self.patternsPath):
|