the whole script is quite short and I decided to copy it below. At some point there used to be a separate library (".pyd") but now it all is part of the python API - sysinfo.active_profile().
<title>Risto's phone status info</title>
<link rel="stylesheet" media="screen" type="text/css"
<h1>My phone is in
pname = sysinfo.active_profile()
<dd>I am currently in the office and you can call me now
<dd>I am currently in a quiet place, please do not call me now
<dd>I am currently in a meeting; messaging is preferred over
<dd>I am currently outdoor: on the road, shopping, sport
activities, etc, but I might answer to your call
<dd>I can read your messages but will not answer the phone (I
hardly ever use this one)