Beispiel #1
0
def main( app_cls, argv ):
    #
    #   set a working STDOUT before loading most modules
    #
    # help debug when stdout goes nowhere useful
    # Mac OS X and Windows are the main problems
    if wb_platform_specific.isMacOs() or wb_platform_specific.isWindows():
        if '--noredirect' not in argv:
            sys.stdout = open( os.environ.get( 'WB_STDOUT_LOG', str(wb_platform_specific.getNullDevice()) ), 'w', 1 )
            sys.stderr = sys.stdout

    # don't pollute any subprocesses with env vars
    # from packaging processing
    for envvar in ['PYTHONPATH', 'PYTHONHOME', 'PYTHONEXECUTABLE']:
        if envvar in os.environ:
            del os.environ[ envvar ]

    # Create the win application and start its message loop
    app = app_cls( argv )

    app.main_window.show()

    rc = app.exec_()

    # force clean up of objects to avoid segv on exit
    del app

    # prevent exit handlers from running as this allows for a segv
    # My guess is that there are some Qt objects that are not owned
    # but I have no way to take them down
    #os._exit( rc )
    return rc
Beispiel #2
0
 Copyright (c) 2003-2015 Barry A Scott.  All rights reserved.

 This software is licensed as described in the file LICENSE.txt,
 which you should have received as part of this distribution.

 ====================================================================

    be_config.py

    Based on code from git WorkBench

'''
import wb_platform_specific

# point size and face need to chosen for platform
if wb_platform_specific.isWindows():
    face = 'Courier New'
    point_size = 8

elif wb_platform_specific.isMacOs():
    face = 'Monaco'
    point_size = 12

else:
    # for unix systems
    face = 'Courier'
    point_size = 12

diff_light_colour_normal = '#000000'
diff_light_colour_header = '#1919c0'
Beispiel #3
0
 Copyright (c) 2003-2015 Barry A Scott.  All rights reserved.

 This software is licensed as described in the file LICENSE.txt,
 which you should have received as part of this distribution.

 ====================================================================

    be_config.py

    Based on code from git WorkBench

'''
import wb_platform_specific

# point size and face need to chosen for platform
if wb_platform_specific.isWindows():
    face = 'Courier New'
    point_size = 8

elif wb_platform_specific.isMacOs():
    face = 'Monaco'
    point_size = 12

else:
    # for unix systems
    face = 'Courier'
    point_size = 12

diff_colour_normal = '#000000'
diff_colour_header = '#1919c0'