#Xolotl Studio
#Created by Ymmanuel Flores on 2018
#Copyright 2018 Crowdorchestra SAPI de CV. All rights reserved.
#hhconnect v 1.0.0.4

import hrpyc

resp = hou.ui.readInput("Select connection port:",title="Hedgehog Connect",buttons=('Ok','Cancel'),initial_contents='18811',severity=hou.severityType.Message)

if resp[0] == 0:
    try:
        hrpyc.start_server(port=int(resp[1]))
        print("HHConnect started listening")
    except:
        print("Port already listening")
