Beispiel #1
0
def add_hostname_segment(powerline):
    if powerline.args.shell == 'bash':
        host_prompt = ' \\h '
    elif powerline.args.shell == 'zsh':
        host_prompt = ' %m '
    else:
        host_prompt = ' ' + gethostname().split('.')[0] + ' '

    powerline.append(host_prompt, Color.HOSTNAME_FG, Color.HOSTNAME_BG)
Beispiel #2
0
def gethostname(space):
    """gethostname() -> string

    Return the current host name.
    """
    try:
        res = rsocket.gethostname()
    except SocketError, e:
        raise converted_error(space, e)
Beispiel #3
0
def gethostname(space):
    """gethostname() -> string

    Return the current host name.
    """
    try:
        res = rsocket.gethostname()
    except SocketError, e:
        raise converted_error(space, e)
Beispiel #4
0
def add_hostname_segment(powerline):
  if powerline.args.shell == 'bash':
    host_prompt = ' \\h '
  elif powerline.args.shell == 'zsh':
    host_prompt = ' %m '
  else:
    host_prompt = ' ' + gethostname().split('.')[0] + ' '

  powerline.append(host_prompt, Color.HOSTNAME_FG, Color.HOSTNAME_BG)
Beispiel #5
0
def gethostname(space):
    """gethostname() -> string

    Return the current host name.
    """
    try:
        res = rsocket.gethostname()
    except SocketError as e:
        raise converted_error(space, e)
    return space.fsdecode(space.newbytes(res))
Beispiel #6
0
def gethostname(space):
    """ Gets the host name"""
    n = rsocket.gethostname()
    return space.newstr(n)
def get_hostname(vm):
    _, _ = vm.decode_args()

    return Con_String(vm, rsocket.gethostname())
Beispiel #8
0
def gethostname(space):
    """ Gets the host name"""
    n = rsocket.gethostname()
    return space.newstr(n)
def get_hostname(vm):
    _,_ = vm.decode_args()

    return Con_String(vm, rsocket.gethostname())