def PackagePublishUI(package,type,visibility):
		linux_lst = {'L': {'selected': False, 'Description': 'All Linux'}}
		windows_lst = {'W': {'selected': False, 'Description': 'All Windows'}}
		for r in clc.v1.Server.GetTemplates():
			r['selected'] = False
			if re.search("Windows",r['Description']):  windows_lst[str(r['OperatingSystem'])] = r
			elif re.search("CentOS|RedHat|Ubuntu",r['Description']):  linux_lst[str(r['OperatingSystem'])] = r
		if os.name=='posix':
			scr = curses.initscr()
			curses.cbreak(); 
		while True:
			if os.name=='posix':  c = Blueprint._DrawPublishPackageUIPosix(scr,linux_lst,windows_lst)
			else:  c = Blueprint._DrawPublishPackageUI(linux_lst,windows_lst)
			if c.lower() == 'q':  break
			elif c.lower() == 'l':  
				for l in linux_lst:  linux_lst[l]['selected'] = not linux_lst[l]['selected']
			elif c.lower() == 'w':  
				for l in windows_lst:  windows_lst[l]['selected'] = not windows_lst[l]['selected']
			elif c in linux_lst:  linux_lst[c]['selected'] = not linux_lst[c]['selected']
			elif c in windows_lst:  windows_lst[c]['selected'] = not windows_lst[c]['selected']
		if os.name=='posix':
			curses.nocbreak(); curses.echo(); curses.endwin()
		ids = []
		for l in dict(linux_lst.items()+windows_lst.items()).values():
			if l['selected'] and 'OperatingSystem' in l:  ids.append(str(l['OperatingSystem']))
		clc.v1.output.Status('SUCCESS',2,'Selected operating system IDs: %s' % (" ".join(ids)))
		return(Blueprint.PackagePublish(package,type,visibility,ids))