Remove a few log.error() lines that I didn't intend to commit.
[fpdb-dooglus.git] / run_fpdb.py
blobfa1bda025eae076691e647a02f6b9a9f9802c5ed
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
4 #Copyright 2008-2011 Carl Gherardi
5 #This program is free software: you can redistribute it and/or modify
6 #it under the terms of the GNU Affero General Public License as published by
7 #the Free Software Foundation, version 3 of the License.
9 #This program is distributed in the hope that it will be useful,
10 #but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 #GNU General Public License for more details.
14 #You should have received a copy of the GNU Affero General Public License
15 #along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #In the "official" distribution you can find the license in agpl-3.0.txt.
18 import os
19 import sys
21 # sys.path[0] holds the directory run_fpdb.py is in
22 sys.path[0] = sys.path[0]+os.sep+"pyfpdb"
23 # cd to pyfpdb subdir
24 os.chdir(sys.path[0])
25 #print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd()
27 if os.name=='nt':
28 os.execvpe('pythonw.exe', list(('pythonw.exe', 'fpdb_prerun.py'))+sys.argv[1:], os.environ)
29 else:
30 os.execvpe('python', list(('python', 'fpdb_prerun.py'))+sys.argv[1:], os.environ)
31 # first arg is ignored (name of program being run)