Update of /cvsroot/pythoncard/PythonCard/samples/flatfileDatabase
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14211/flatfileDatabase
Modified Files:
flatfileDatabase.py
Log Message:
fixed path issue with config loading
Index: flatfileDatabase.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/flatfileDatabase/flatfileDatabase.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** flatfileDatabase.py 14 Apr 2004 02:38:47 -0000 1.20
--- flatfileDatabase.py 3 Aug 2004 15:57:05 -0000 1.21
***************
*** 23,27 ****
if __name__ == '__main__':
# assume the ini file is in the same directory as the script
! path = os.path.join(os.path.dirname(sys.argv[0]), CONFIG_FILE)
parser = ConfigParser.ConfigParser()
parser.read(path)
--- 23,27 ----
if __name__ == '__main__':
# assume the ini file is in the same directory as the script
! path = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), CONFIG_FILE)
parser = ConfigParser.ConfigParser()
parser.read(path)
|