Sending an SMS message using zenoss and python
The one coding standard is
PEP8 and indeed it would
be good if at least names are in common Python spelling, not like
Java.  E.g. it should be join_path (if you really want to rename
it), not joinPath, etc.
The names vs. positional arguments for format are a bit
inconsistent; I'd say that unless you have a lot of arguments you can
usually get by with unnamed positional instead, i.e.
"{} {}".format(...).
I don't like the tendency for stripping out characters in names
unnecessarily:  hdrs and evt aren't exactly much saving compared
to headers and event.
The import for os.path is mentioned twice, that could also be just
one line instead.
'{0}'.format(...) should probably be str(...) if you need the
string conversion.


Now for the structure I see a couple of things.


The try/catch block looks like it's not very much improving on
what the Python interpreter would print by default.
"Declaring" the isInProduction variable is not needed and
considering it's set to True immediately it looks like it's not
needed at all.  Or the indentation is wrong, in which case it should
instead be immediately initialised like
is_in_production = event['prodState'] == 'Production'.
Actually, initialising variables this way like again with
alertContactContent is just not useful in Python.  I'd likely move
reading the file and splitting the content into a function and use
that instead (like
alert_contact_content = read_and_split(ALERT_POINT_PATH) or so).
Again, the body of the innermost for-loop looks like it should be a
function instead, like create_auth_manager() and should only be
created once - unless I'm missing something all of those
password_manager instances are the same, so it makes sense to reuse
them instead.
I don't understand the break.  Or the comment on it.  At all.


Basically reading all of this nested stuff would be much easier if it
was structured, e.g. using functions or so.