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.
21 # sys.path[0] holds the directory run_fpdb.py is in
22 sys
.path
[0] = sys
.path
[0]+os
.sep
+"pyfpdb"
25 #print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd()
28 os
.execvpe('pythonw.exe', list(('pythonw.exe', 'fpdb_prerun.py'))+sys
.argv
[1:], os
.environ
)
30 os
.execvpe('python', list(('python', 'fpdb_prerun.py'))+sys
.argv
[1:], os
.environ
)
31 # first arg is ignored (name of program being run)