# Path: memsql_loader/util/command.py
# class Command(object):
#     def __init__(self, options):
#         self.options = options
#         self.ensure_bootstrapped()
#         self.run()
# 
#     @staticmethod
#     def configure(parser, subparsers):
#         raise NotImplemented('Every command needs a static configure(...) method')
# 
#     def ensure_bootstrapped(self):
#         if not bootstrap.check_bootstrapped():
#             bootstrap.bootstrap()
# 
#     def run():
#         raise NotImplemented('Every command needs a run method, otherwise not much is going to happen')
# 
# Path: memsql_loader/util/servers.py
# def get_pid_file_path():
# def delete_pid_file():
# def write_pid_file():
# def get_server_pid():
# def is_server_running():


import sys
from memsql_loader.util.command import Command
from memsql_loader.util import servers
""" Determines if a MemSQL Loader server is running. """



class Status(Command):
    @staticmethod
    def configure(parser, subparsers):
        subparser = subparsers.add_parser('status', help='Determines if a MemSQL Loader server is running.')
        subparser.set_defaults(command=Status)

    def run(self):

# Path: memsql_loader/util/command.py
# class Command(object):
#     def __init__(self, options):
#         self.options = options
#         self.ensure_bootstrapped()
#         self.run()
# 
#     @staticmethod
#     def configure(parser, subparsers):
#         raise NotImplemented('Every command needs a static configure(...) method')
# 
#     def ensure_bootstrapped(self):
#         if not bootstrap.check_bootstrapped():
#             bootstrap.bootstrap()
# 
#     def run():
#         raise NotImplemented('Every command needs a run method, otherwise not much is going to happen')
# 
# Path: memsql_loader/util/servers.py
# def get_pid_file_path():
# def delete_pid_file():
# def write_pid_file():
# def get_server_pid():
# def is_server_running():


# Path: memsql_loader/cli/status.py
import sys
from memsql_loader.util.command import Command
from memsql_loader.util import servers

""" Determines if a MemSQL Loader server is running. """



class Status(Command):
    @staticmethod
    def configure(parser, subparsers):
        subparser = subparsers.add_parser('status', help='Determines if a MemSQL Loader server is running.')
        subparser.set_defaults(command=Status)

    def run(self):

        if servers.is_server_running():