A Trivial Python Error

Rich Shepard <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
   I cannot concatenate a variable holding the file name with the suffix of
'.db' in my application. It _should_ work, but it isn't and I don't see why.

   The calling module has this method:

   def OnNewMod(self, event):
     newName = functions.newFile(self)
     self.tcName.SetValue(config.projname)
     print 'pwd = '+ config.dirname
     print 'project name = '+ config.projname
     print 'dbFileName = '+ config.dbFileName
     # DBtools().OpenDB(config.dbFileName)

the functions module's functions do their job and return two of the three
variables defined in config.py. That module contains:

dirname = ' '
projname = ' '
dbFileName = projname + '.db'

   However, when I run the application the three print statements show:

pwd = /data1/eikos
project name = foobar
dbFileName =  .db

   What simple thing have I missed that the value of config.projname is not
being assigned to config.dbFileName?

Rich

-- 
Richard B. Shepard, Ph.D.               |    The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)    |            Accelerator
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.