@staticmethod
def get_computer_spec(computer):
    """Get computer attributes from existing computer instance.

        These attributes can be used to create a new ComputerBuilder::

            spec = ComputerBuilder.get_computer_spec(old_computer)
            builder = ComputerBuilder(**spec)
            new_computer = builder.new()"""
    spec = {}
    spec['label'] = computer.label
    spec['description'] = computer.description
    spec['hostname'] = computer.get_hostname()
    spec['scheduler'] = computer.get_scheduler_type()
    spec['transport'] = computer.get_transport_type()
    spec['prepend_text'] = computer.get_prepend_text()
    spec['append_text'] = computer.get_append_text()
    spec['work_dir'] = computer.get_workdir()
    spec['shebang'] = computer.get_shebang()
    spec['mpirun_command'] = ' '.join(computer.get_mpirun_command())
    spec['mpiprocs_per_machine'] = computer.get_default_mpiprocs_per_machine()
    return spec
