2 # -*- coding: utf-8 -*-
5 This file is part of Multilist.
7 Multilist is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 Multilist is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Multilist. If not, see <http://www.gnu.org/licenses/>.
20 Copyright (C) 2008 Christoph Würstle
26 if __name__ == "__main__":
31 tmpdir=tempfile.gettempdir()
33 os.mkdir(os.path.join(tmpdir, "multilist_lock"))
35 ## Failed: another instance is running
37 mbox=gtk.MessageDialog(None,gtk.DIALOG_MODAL,gtk.MESSAGE_ERROR,gtk.BUTTONS_YES_NO,"Multilist already runnging.Start anyway? (Could result in db problems!)")
41 if response==gtk.RESPONSE_NO:
46 from multilistclasses import libmultilist
47 #print dir(eggtimerclasses)
48 app = libmultilist.multilistclass()
52 ## Remove the PID file
55 os.rmdir(os.path.join(tmpdir, "multilist_lock"))