Exemple #1
0
def main():
    import os, sys

    import matplotlib
    matplotlib.use('Qt4Agg')

    sys.path.insert(0, os.path.abspath(os.path.join('..')))
    from nexpy.gui.consoleapp import main
    main()
Exemple #2
0
def main():

    # MUST define the QT_API before importing matplotlib
    import os, sys
    os.environ['QT_API'] = 'pyside'
    
    import matplotlib
    matplotlib.use('Qt4Agg')

    sys.path.insert(0, os.path.abspath(os.path.join('..')))
    from nexpy.gui.consoleapp import main
    main()
Exemple #3
0
def main():

    import argparse, os, sys, nexpy

    parser = argparse.ArgumentParser(description="Launch NeXpy")

    parser.add_argument('filename', nargs='?', 
                        help='NeXus file to open on launch (optional)')
    parser.add_argument('-v', '--version', action='version', 
                        version='%(prog)s v'+nexpy.__version__)
    args = parser.parse_args()
    from nexpy.gui.consoleapp import main
    main(args.filename)
Exemple #4
0
def main():

    import argparse, os, sys, nexpy

    parser = argparse.ArgumentParser(description="Launch NeXpy")

    parser.add_argument('filename',
                        nargs='?',
                        help='NeXus file to open on launch (optional)')
    parser.add_argument('-v',
                        '--version',
                        action='version',
                        version='%(prog)s v' + nexpy.__version__)
    args = parser.parse_args()
    from nexpy.gui.consoleapp import main
    main(args.filename)
Exemple #5
0
def main():

    parser = argparse.ArgumentParser(description="Launch NeXpy")

    parser.add_argument('filenames', nargs='*',
                        help='NeXus file(s) to open on launch (optional)')
    parser.add_argument('-v', '--version', action='version',
                        version='%(prog)s v'+nexpy.__version__)
    parser.add_argument('-r', '--restore', action='store_true',
                        help='open files from previous session')
    parser.add_argument('-f', '--faulthandler', action='store_true',
                        help='enable faulthandler for system crashes')
    args, extra_args = parser.parse_known_args()

    if sys.platform == 'darwin':
        from nexpy.gui.utils import run_pythonw
        run_pythonw(__file__)

    from nexpy.gui.consoleapp import main
    main(args, extra_args)
Exemple #6
0
import argparse
import sys

import nexpy


def main():

    parser = argparse.ArgumentParser(description="Launch NeXpy")

    parser.add_argument('filenames', nargs='*',
                        help='NeXus file(s) to open on launch (optional)')
    parser.add_argument('-v', '--version', action='version',
                        version='%(prog)s v'+nexpy.__version__)
    parser.add_argument('-r', '--restore', action='store_true',
                        help='open files from previous session')
    parser.add_argument('-f', '--faulthandler', action='store_true',
                        help='enable faulthandler for system crashes')
    args, extra_args = parser.parse_known_args()

    if sys.platform == 'darwin':
        from nexpy.gui.utils import run_pythonw
        run_pythonw(__file__)

    from nexpy.gui.consoleapp import main
    main(args, extra_args)


if __name__ == '__main__':
    main()
Exemple #7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

#-----------------------------------------------------------------------------
# Copyright (c) 2013-2014, NeXpy Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING, distributed with this software.
#-----------------------------------------------------------------------------


def main():
    import os, sys

    import matplotlib
    matplotlib.use('Qt4Agg')

    sys.path.insert(0, os.path.abspath(os.path.join('..')))
    from nexpy.gui.consoleapp import main
    main()


if __name__ == '__main__':
    main()
Exemple #8
0
def main():
    import os, sys

    sys.path.insert(0, os.path.abspath(os.path.join('..')))
    from nexpy.gui.consoleapp import main
    main()