Esempio n. 1
0
def run_ninja():
    """First obtain the execution args and create the resources folder."""
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    # Change the process name only for linux yet
    if sys.platform != "win32" and sys.platform != "darwin":
        try:
            import ctypes

            libc = ctypes.CDLL("libc.so.6")
            procname = "ninja-ide"
            libc.prctl(15, "%s\0" % procname, 0, 0, 0)
        except:
            print("The process couldn't be renamed'")
    # Set the application name
    (filenames, projects_path, extra_plugins, linenos, log_level, log_file) = cliparser.parse()
    # Create NINJA-IDE user folder structure for plugins, themes, etc
    resources.create_home_dir_structure()
    from ninja_ide.tools.logger import NinjaLogger

    NinjaLogger.argparse(log_level, log_file)

    # Start the UI
    from ninja_ide.gui import ide

    ide.start(filenames, projects_path, extra_plugins, linenos)
Esempio n. 2
0
def run_ninja():
    """First obtain the execution args and create the resources folder."""
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    # Change the process name only for linux yet
    if sys.platform != 'win32' and sys.platform != 'darwin':
        try:
            import ctypes
            libc = ctypes.CDLL('libc.so.6')
            procname = 'ninja-ide'
            libc.prctl(15, '%s\0' % procname, 0, 0, 0)
        except:
            print "The process couldn't be renamed'"
    #Set the application name
    filenames, projects_path, extra_plugins = cliparser.parse()
    # Check if there is another session of ninja-ide opened
    # and in that case send the filenames and projects to that session
    if ipc.is_running() and (filenames or projects_path):
        sended = ipc.send_data(filenames, projects_path)
        if sended:
            sys.exit()
    listener = ipc.SessionListener()
    listener.start()
    # Create NINJA-IDE user folder structure for plugins, themes, etc
    resources.create_home_dir_structure()

    # Start the UI
    from ninja_ide.gui import ide
    try:
        ide.start(listener, filenames, projects_path, extra_plugins)
    finally:
        ipc.close_listener(listener)
Esempio n. 3
0
def run_ninja():
    """First obtain the execution args and create the resources folder."""
    # Change the process name only for linux yet
    if sys.platform != 'win32' and sys.platform != 'darwin':
        try:
            import ctypes
            libc = ctypes.CDLL('libc.so.6')
            procname = 'ninja-ide'
            libc.prctl(15, '%s\0' % procname, 0, 0, 0)
        except:
            print "The process couldn't be renamed'"
    #Set the application name
    filenames, projects_path, extra_plugins = cliparser.parse()
    # Check if there is another session of ninja-ide opened
    # and in that case send the filenames and projects to that session
    if ipc.is_running() and (filenames or projects_path):
        sended = ipc.send_data(filenames, projects_path)
        if sended:
            sys.exit()
    listener = ipc.SessionListener()
    listener.start()
    # Create NINJA-IDE user folder structure for plugins, themes, etc
    resources.create_home_dir_structure()

    # Start the UI
    from ninja_ide.gui import ide
    try:
        ide.start(listener, filenames, projects_path, extra_plugins)
    finally:
        ipc.close_listener(listener)
Esempio n. 4
0
def run_ninja():
    """First obtain the execution args and create the resources folder."""
    filenames, projects_path, extra_plugins = cliparser.parse()
    # Create NINJA-IDE user folder structure for plugins, themes, etc
    resources.create_home_dir_structure()

    # Start the UI
    from ninja_ide.gui import ide
    ide.start(filenames, projects_path, extra_plugins)
Esempio n. 5
0
def run_ninja():
    """First obtain the execution args and create the resources folder."""
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    # Change the process name only for linux yet
    if sys.platform != 'win32' and sys.platform != 'darwin':
        try:
            import ctypes
            libc = ctypes.CDLL('libc.so.6')
            procname = 'ninja-ide'
            libc.prctl(15, '%s\0' % procname, 0, 0, 0)
        except:
            print "The process couldn't be renamed'"
    #Set the application name
    filenames, projects_path, extra_plugins, linenos = cliparser.parse()
    # Create NINJA-IDE user folder structure for plugins, themes, etc
    resources.create_home_dir_structure()

    # Start the UI
    from ninja_ide.gui import ide
    ide.start(filenames, projects_path, extra_plugins, linenos)
Esempio n. 6
0
def run_ninja():
    """First obtain the execution args and create the resources folder."""
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    # Change the process name only for linux yet
    if sys.platform != 'win32' and sys.platform != 'darwin':
        try:
            import ctypes
            libc = ctypes.CDLL('libc.so.6')
            procname = 'ninja-ide'
            libc.prctl(15, '%s\0' % procname, 0, 0, 0)
        except:
            print("The process couldn't be renamed'")
    #Set the application name
    filenames, projects_path, extra_plugins, linenos = cliparser.parse()
    # Create NINJA-IDE user folder structure for plugins, themes, etc
    resources.create_home_dir_structure()

    # Start the UI
    from ninja_ide.gui import ide
    ide.start(filenames, projects_path, extra_plugins, linenos)