specMech outputs data using the following format:
keyword value1 value2...
The keywords and values are described in keywords.py. Note that although this is a standard SDSS keyword dictionary, the data is not output in standard SDSS keyword=value format!
Warn ing: string values are never quoted and often may contain spaces. When a string can contain spaces it is the last value for the keyword. Thus it is crucial that you only divide the reply into as many pieces as you expect. For example:
Failed unknown command h
To parse this in python you could use reply.split(None, 1) since we expect two items (the keyword and one value) for the "failed" keyword, and one split gives two items.
Warn ing: parsing of keyword names should not be case-sensitive. Keywords may not always be output using consistent case.