python-hostlist

Python module for hostlist handling
Download

python-hostlist Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Kent Engstr?m
  • Publisher web site:
  • http://www.nsc.liu.se/~kent/

python-hostlist Tags


python-hostlist Description

Python module for hostlist handling python-hostlist is a Python module that knows how to expand and collect hostlist expressions.Example: % python Python 2.5.1 (r251:54863, Jul 10 2008, 17:24:48) on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import hostlist >>> hosts = hostlist.expand_hostlist("n") >>> hosts >>> hostlist.collect_hostlist(hosts) 'n' >>> hostlist.collect_hostlist() 'xy'Bad hostlists or hostnames will result in the hostlist.BadHostlist exception being raised.The 'hostlist' command is provided to expand/collect hostlists and perform set operations on them. Example: % hostlist n n n % hostlist --difference n n n % hostlist --expand --intersection n n n5 n6 n7 n8 n9 n10Install directly by running python setup.py build (as yourself) python setup.py install (as root) or just copy the hostlist.py, hostlist and hostlist.1 files to appropriate places. Requirements: · Python What's New in This Release: · Support Python 3. · Import reduce from functools if possible. · Use Python 2/3 installation trick from .../Demo/distutils/test2to3


python-hostlist Related Software