Beispiel #1
0
    import locale
    if sys.platform == 'win32':
        os.environ['LANG'] = locale.getdefaultlocale()[0]

    # Internationalization voodoo
    # https://bugzilla.gnome.org/show_bug.cgi?id=574520#c26
    #locale.setlocale(locale.LC_ALL, '')  #needed?
    print "DEBUG: getlocale():", locale.getlocale()
    print "DEBUG: localepath: ", localepath
    print "DEBUG: localepath_brushlib: ", localepath_brushlib

    # Low-level bindtextdomain, required for GtkBuilder stuff.
    locale.bindtextdomain("mypaint", localepath)
    locale.bindtextdomain("libmypaint", localepath_brushlib)
    locale.textdomain("mypaint")

    # Python gettext module.
    # See http://docs.python.org/release/2.7/library/locale.html
    gettext.bindtextdomain("mypaint", localepath)
    gettext.bindtextdomain("libmypaint", localepath_brushlib)
    gettext.textdomain("mypaint")

    from gui import main
    version = main.MYPAINT_VERSION
    if version.endswith("+git"):
        try:
            version += _MYPAINT_BUILD_GIT_REVISION
        except NameError:
            pass
    main.main(datapath, extradata, old_confpath, version)
Beispiel #2
0
#!/usr/bin/env python

import sys, os
from gui import main

sys.path.insert(0, os.path.dirname(__file__))

main.main()
Beispiel #3
0
    if os.environ.get("MYPAINT_DEBUG", False):
        logging_level = logging.DEBUG
    root_logger = logging.getLogger(None)
    root_logger.addHandler(console_handler)
    root_logger.setLevel(logging_level)
    if logging_level == logging.DEBUG:
        logger.info("Debugging output enabled via MYPAINT_DEBUG")

    # Path determination
    datapath, iconspath, old_confpath, localepath \
        = get_paths()
    logger.debug('datapath: %r', datapath)
    logger.debug('iconspath: %r', iconspath)
    logger.debug('old_confpath: %r', old_confpath)
    logger.debug('localepath: %r', localepath)

    # Locale setting
    init_gettext(localepath)

    # Allow an override version string to be burned in during build.  Comes
    # from an active repository's git information and build timestamp, or
    # the release_info file from a tarball release.
    try:
        version = MYPAINT_VERSION_CEREMONIAL
    except NameError:
        version = None

    # Start the app.
    from gui import main
    main.main(datapath, iconspath, old_confpath, version=version)
Beispiel #4
0
from sessions.client.main import initialize
from gui import main
from sessions.common import DEFAULT_SERVER_INET_ADDR,\
    DEFAULT_SERVER_PORT

# Main method -----------------------------------------------------------------
if __name__ == '__main__':
    # Find the script absolute path, cut the working directory
    a_path = sep.join(abspath(argv[0]).split(sep)[:-1])
    # Append script working directory into PYTHONPATH
    path.append(a_path)

    # Parsing arguments
    parser = ArgumentParser(description=__info(),
                            version = ___VER)
    parser.add_argument('-H', '--host',\
                        help='Server INET address '\
                        'defaults to %s' % DEFAULT_SERVER_INET_ADDR, \
                        default=DEFAULT_SERVER_INET_ADDR)
    parser.add_argument('-p', '--port', type=int,\
                        help='Server UDP port, '\
                        'defaults to %d' % DEFAULT_SERVER_PORT, \
                        default=DEFAULT_SERVER_PORT)
    args = parser.parse_args()

    #Init client variables
    initialize(args)

    # Run Colted GUI
    main.main()
Beispiel #5
0
        logging_level = logging.DEBUG
    root_logger = logging.getLogger(None)
    root_logger.addHandler(console_handler)
    root_logger.setLevel(logging_level)
    if logging_level == logging.DEBUG:
        logger.info("Debugging output enabled via MYPAINT_DEBUG")

    # Path determination
    datapath, iconspath, old_confpath, localepath, localepath_brushlib \
        = get_paths()
    logger.debug('datapath: %r', datapath)
    logger.debug('iconspath: %r', iconspath)
    logger.debug('old_confpath: %r', old_confpath)
    logger.debug('localepath: %r', localepath)
    logger.debug('localepath_brushlib: %r', localepath_brushlib)

    # Locale setting
    init_gettext(localepath, localepath_brushlib)

    # Allow an override version string to be burned in during build.  Comes
    # from an active repository's git information and build timestamp, or
    # the release_info file from a tarball release.
    try:
        version = MYPAINT_VERSION_CEREMONIAL
    except NameError:
        version = None

    # Start the app.
    from gui import main
    main.main(datapath, iconspath, old_confpath, version=version)
Beispiel #6
0
# -*- coding: utf-8 -*-
#
#    Copyright © 2018 Simon Forman
#
#    This file is part of Joypy.
#
#    Joypy 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 3 of the License, or
#    (at your option) any later version.
#
#    Joypy 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 Joypy.  If not see <http://www.gnu.org/licenses/>.
#
import sys
from gui.main import main

sys.exit(main())
Beispiel #7
0
    root_logger.addHandler(console_handler)
    root_logger.setLevel(logging_level)
    if logging_level == logging.DEBUG:
        logger.info("Debugging output enabled via MYPAINT_DEBUG")

    # Path determination
    datapath, iconspath, old_confpath, localepath = get_paths()
    logger.debug('datapath: %r', datapath)
    logger.debug('iconspath: %r', iconspath)
    logger.debug('old_confpath: %r', old_confpath)
    logger.debug('localepath: %r', localepath)

    # Allow an override version string to be burned in during build.  Comes
    # from an active repository's git information and build timestamp, or
    # the release_info file from a tarball release.
    if 'MYPAINT_VERSION_CEREMONIAL' in globals():
        version = MYPAINT_VERSION_CEREMONIAL
    else:
        version = None

    # Start the app.
    from gui import main
    main.main(
        datapath,
        iconspath,
        localepath,
        old_confpath,
        version=version,
        debug=debug,
    )
Beispiel #8
0
    datapath, extradata, confpath, localepath, localepath_brushlib = get_paths()

    # Locale setting
    # must be done before importing any translated python modules
    # (to get global strings translated, especially brushsettings.py)
    import gettext
    import locale
    if sys.platform == 'win32':
        os.environ['LANG'] = locale.getdefaultlocale()[0]

    # Internationalization voodoo
    # https://bugzilla.gnome.org/show_bug.cgi?id=574520#c26
    #locale.setlocale(locale.LC_ALL, '')  #needed?
    print "DEBUG: getlocale():", locale.getlocale()
    print "DEBUG: localepath: ", localepath
    print "DEBUG: localepath_brushlib: ", localepath_brushlib

    # Low-level bindtextdomain, required for GtkBuilder stuff.
    locale.bindtextdomain("mypaint", localepath)
    locale.bindtextdomain("libmypaint", localepath_brushlib)
    locale.textdomain("mypaint")

    # Python gettext module.
    # See http://docs.python.org/release/2.7/library/locale.html
    gettext.bindtextdomain("mypaint", localepath)
    gettext.bindtextdomain("libmypaint", localepath_brushlib)
    gettext.textdomain("mypaint")

    from gui import main
    main.main(datapath, extradata, confpath)
Beispiel #9
0
    # Low-level bindtextdomain, required for GtkBuilder stuff.
    try:
        locale.bindtextdomain("mypaint", localepath)
        locale.bindtextdomain("libmypaint", localepath_brushlib)
        locale.textdomain("mypaint")
    except AttributeError:
        logger.exception("Attempt to set low-level text domain failed."
                         "Some Windows builds are known do this, "
                         "but this code is OK on POSIX systems.")
        logger.error("TESTERS: This may mean that strings from GtkBuilder "
                     "are untranslated. Please confirm!")

    # Python gettext module.
    # See http://docs.python.org/release/2.7/library/locale.html
    gettext.bindtextdomain("mypaint", localepath)
    gettext.bindtextdomain("libmypaint", localepath_brushlib)
    gettext.textdomain("mypaint")

    # Allow an override version string to be burned in during build.  Comes
    # from an active repository's git information and build timestamp, or
    # the release_info file from a tarball release.
    try:
        version = MYPAINT_VERSION_CEREMONIAL
    except NameError:
        version = None

    # Start the app.
    from gui import main
    main.main(datapath, extradata, old_confpath, version=version)
Beispiel #10
0
#!/usr/bin/env python
# encoding: utf-8

from gevent import monkey; __name__ == '__main__' and monkey.patch_all()
from gui.main import main

main()
import gui.main as gui

gui.main()
Beispiel #12
0
from gui.main import main

if __name__ == '__main__':
    main()
Beispiel #13
0
    try:
        import psyco
        if sys.platform == 'win32':
            if psyco.hexversion >= 0x020000f0 :
                psyco.full()
                print 'Psyco being used'
            else:
                print "Need at least psyco 2.0 to run"
        else:
            psyco.full()
            print 'Psyco being used'
    except ImportError:
        pass

if __name__ == '__main__':
    psyco_opt()

    datapath, confpath, localepath = get_paths()

    # must be done before importing any translated python modules
    # (to get global strings translated, especially brushsettings.py)
    import gettext
    if sys.platform == 'win32':
        import locale
        os.environ['LANG'] = locale.getdefaultlocale()[0]
    gettext.bindtextdomain("mypaint", localepath)
    gettext.textdomain("mypaint")

    from gui import main
    main.main(datapath, confpath)