obspy.clients.fdsn.client.convert_to_string

convert_to_string(value)[source]

Takes any value and converts it to a string compliant with the FDSN webservices.

Will raise a ValueError if the value could not be converted.

>>> print(convert_to_string("abcd"))
abcd
>>> print(convert_to_string(1))
1
>>> print(convert_to_string(1.2))
1.2
>>> print(convert_to_string(               UTCDateTime(2012, 1, 2, 3, 4, 5, 666666)))
2012-01-02T03:04:05.666666
>>> print(convert_to_string(True))
true
>>> print(convert_to_string(False))
false