Esempio n. 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)
Esempio n. 2
0
def gethostname(space):
    """gethostname() -> string

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

    Return the current host name.
    """
    try:
        res = rsocket.gethostname()
    except SocketError, e:
        raise converted_error(space, e)
Esempio n. 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)
Esempio n. 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))
Esempio n. 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())
Esempio n. 8
0
def gethostname(space):
    """ Gets the host name"""
    n = rsocket.gethostname()
    return space.newstr(n)
Esempio n. 9
0
def get_hostname(vm):
    _,_ = vm.decode_args()

    return Con_String(vm, rsocket.gethostname())