#!/usr/bin/python

#  Copyright (C) 2007 Maxim Fedorovsky, University of Fribourg (Switzerland).
#       email : Maxim.Fedorovsky@unifr.ch, mutable@yandex.ru
#
#  This file is part of PyVib2.
#
#  PyVib2 is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  PyVib2 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 General Public License
#  along with PyVib2; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

"""Script which starts PyVib2.

Usage : pyvib2 [file1 file2 ...]

"""
__author__ = 'Maxim Fedorovsky'

import Tkinter
import Pmw
import sys


if '__main__' == __name__ :

  __root__ = Tkinter.Tk()
  Pmw.initialise(__root__)

  try :
    from pyviblib.gui.main import Main
    
  except ImportError :    
    print >> sys.stderr, 'PyVib2 is not properly installed :('
    sys.exit(1)
    
  else :
    Main(__root__, startfiles=sys.argv[1:])
    __root__.mainloop()
