fpdb/run_fpdb.py

32 lines
1.1 KiB
Python
Raw Normal View History

2010-01-27 19:42:03 +01:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
2010-01-27 19:42:03 +01:00
#Copyright 2008 Carl Gherardi
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, version 3 of the License.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#In the "official" distribution you can find the license in
#agpl-3.0.txt in the docs folder of the package.
import os
import sys
# sys.path[0] holds the directory run_fpdb.py is in
sys.path[0] = sys.path[0]+os.sep+"pyfpdb"
# cd to pyfpdb subdir
2010-01-27 19:42:03 +01:00
os.chdir(sys.path[0])
#print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd()
os.execvpe('python', ('python', 'fpdb.pyw', '-r'), os.environ)
# first arg is ignored (name of program being run)