~thomas-deruyter-3/qreator/qreator

« back to all changes in this revision

Viewing changes to qreator/__init__.py

  • Committer: David Planella
  • Date: 2012-01-15 07:02:18 UTC
  • Revision ID: david.planella@ubuntu.com-20120115070218-ce81y8a9icgsom54
Initial project creation with Quickly!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
 
2
### BEGIN LICENSE
 
3
# This file is in the public domain
 
4
### END LICENSE
 
5
 
 
6
import optparse
 
7
 
 
8
import gettext
 
9
from gettext import gettext as _
 
10
gettext.textdomain('qreator')
 
11
 
 
12
from gi.repository import Gtk # pylint: disable=E0611
 
13
 
 
14
from qreator import QreatorWindow
 
15
 
 
16
from qreator_lib import set_up_logging, get_version
 
17
 
 
18
def parse_options():
 
19
    """Support for command line options"""
 
20
    parser = optparse.OptionParser(version="%%prog %s" % get_version())
 
21
    parser.add_option(
 
22
        "-v", "--verbose", action="count", dest="verbose",
 
23
        help=_("Show debug messages (-vv debugs qreator_lib also)"))
 
24
    (options, args) = parser.parse_args()
 
25
 
 
26
    set_up_logging(options)
 
27
 
 
28
def main():
 
29
    'constructor for your class instances'
 
30
    parse_options()
 
31
 
 
32
    # Run the application.    
 
33
    window = QreatorWindow.QreatorWindow()
 
34
    window.show()
 
35
    Gtk.main()