The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Python playing - xAP Display for the Mac



------=_NextPart_000_0006_01C9FFAB.FC895940
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

These are some sample xAP python application I put together as part of my
livebox project:

http://livebox.dbzoo.com/python/



HUB awareness logic has been included.



Brett

_____

From: xap_automation@xxxxxxx [mailto:xap_automation@xxxxxxx]
On Behalf Of James
Sent: 07 July 2009 22:45
To: xap_automation@xxxxxxx
Subject: [xap_automation] Python playing - xAP Display for the Mac








Hi,

There are two things bugging me about my mac. Firstly I have no idea
how to program on it and secondly not much xAP. So i've been getting
my head around Python and made a little app, well script, that listens
for xAP display messages and then pops them up. I'm using Growl to do
the popups so you'll ned that installed as well as the python bindings
that go with it.
The script is here:
http://mi4.biz/ <http://mi4.biz/files/python/xAPDisplay01.txt>
files/python/xAPDisplay01.txt
It's not a true xAP application, it only listens on the hub port and
wont work with a hub yet, but then I couldn't get the hub to compile
so probably not an issue for now! It's more of a test than an app
for now, but as it's already useful I thought I would share.

If anyone has any python experience and could help with why the py2app
fails with the script to build a normal application then it would
really help and I'm sure I'm just missing something simple with paths
to the growl libraries but it causes the .app to fail to run.

Thanks

James




------=_NextPart_000_0006_01C9FFAB.FC895940
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: 7bit





<head>

<style type="text/css">
<!--

/* start of attachment style */
.ygrp-photo-title{
clear: both;
font-size: smaller;
height: 15px;
overflow: hidden;
text-align: center;
width: 75px;
}
div.ygrp-photo{
background-position: center;
background-repeat: no-repeat;
background-color: white;
border: 1px solid black;
height: 62px;
width: 62px;
}

div.photo-title
a,
div.photo-title a:active,
div.photo-title a:hover,
div.photo-title a:visited {
text-decoration: none;
}

div.attach-table div.attach-row {
clear: both;
}

div.attach-table div.attach-row div {
float: left;
/* margin: 2px;*/
}

p {
clear: both;
padding: 15px 0 3px 0;
overflow: hidden;
}

div.ygrp-file {
width: 30px;
valign: middle;
}
div.attach-table div.attach-row div div a {
text-decoration: none;
}

div.attach-table div.attach-row div div span {
font-weight: normal;
}

div.ygrp-file-title {
font-weight: bold;
}
/* end of attachment style */
-->
</style>
</head>
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40";>

<head>
<meta http-equiv=Content-Type content="text/html;
charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered
medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--#YGRP-MLMSG
{*font-size:small;
*font:x-small;}
#YGRP-MLMSG table
{font-size:inherit;}
#YGRP-MLMSG pre
{*font-size:100%;}
code
{*font-size:100%;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-vital a:hover{
text-decoration: underline;
}
#ygrp-sponsor .ad a:hover{
text-decoration: underline;
}
o{font-size: 0; }
div.photo-title a,
div.photo-title a:active,
div.photo-title a:hover,
div.photo-title a:visited {
text-decoration: none;
}
div.file-title a,
div.file-title a:active,
div.file-title a:hover,
div.file-title a:visited {
text-decoration: none;
}
#YGRP-MSG p#ATTACH-COUNT
{overflow:hidden;}

/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
code
{font-family:"Courier New";}
pre
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
tt
{font-family:"Courier New";}
p.ad, li.ad, div.ad
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
p.ad1, li.ad1, div.ad1
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
p.ad2, li.ad2, div.ad2
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
p.ad3, li.ad3, div.ad3
{mso-margin-top-alt:auto;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
p.replbq, li.replbq, div.replbq
{margin:3.0pt;
font-size:12.0pt;
font-family:"Times New Roman";}
p.ad4, li.ad4, div.ad4
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
p.ad5, li.ad5, div.ad5
{mso-margin-top-alt:auto;
margin-right:0cm;
margin-bottom:7.5pt;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
p.ad6, li.ad6, div.ad6
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
span.yshortcuts1
{font-family:Verdana;
font-weight:bold;}
span.yshortcuts2
{font-family:Verdana;
font-weight:normal;}
span.EmailStyle34
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:736897029;
mso-list-template-ids:3409324;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-US link=blue vlink=blue>


<!-- **begin egp html banner** -->

<br><br>

<!-- **end egp html banner** -->




<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span
style='font-size:
10.0pt;font-family:Arial;color:navy'>These are some sample xAP python
application I put together as part of my livebox
project:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span
style='font-size:
10.0pt;font-family:Arial;color:navy'><a href="http://livebox.dbzoo.com/python/";>http://livebox.dbzoo.com/python/</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span
style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span
style='font-size:
10.0pt;font-family:Arial;color:navy'>HUB awareness logic has been
included.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span
style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span
style='font-size:
10.0pt;font-family:Arial;color:navy'>Brett<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font
size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
xap_automation@xxxxxxx [mailto:xap_automation@xxxxxxx]
<b><span
style='font-weight:bold'>On Behalf Of
</span></b>James<br>
<b><span style='font-weight:bold'>Sent:</span></b>
07 July 2009 22:45<br>
<b><span style='font-weight:bold'>To:</span></b>
xap_automation@xxxxxxx<br>
<b><span
style='font-weight:bold'>Subject:</span></b>
[xap_automation] Python
playing - xAP Display for the
Mac</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New
Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div id=ygrp-mlmsg>

<div style='float:left;z-index:1' id=ygrp-msg>

<div id=ygrp-text>

<p class=MsoNormal><font size=3 face="Times New
Roman"><span style='font-size:
12.0pt'><br>
<br>
<br>
<o:p></o:p></span></font></p>



<p><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hi,<br>
<br>
There are two things bugging me about my mac. Firstly I have no idea
<br>
how to program on it and secondly not much xAP. So i've been getting
<br>
my head around Python and made a little app, well script, that listens
<br>
for xAP display messages and then pops them up. I'm using Growl to do
<br>
the popups so you'll ned that installed as well as the python bindings
<br>
that go with it.<br>
The script is here:<br>
<a href="http://mi4.biz/files/python/xAPDisplay01.txt";>http://mi4.biz/<wbr>files/python/<wbr>xAPDisplay01.<wbr>txt</a><br>
It's not a true xAP application, it only listens on the hub port and
<br>
wont work with a hub yet, but then I couldn't get the hub to compile
<br>
so probably not an issue for now! It's more of a test than an app
<br>
for now, but as it's already useful I thought I would share.<br>
<br>
If anyone has any python experience and could help with why the py2app
<br>
fails with the script to build a normal application then it would
<br>
really help and I'm sure I'm just missing something simple with paths
<br>
to the growl libraries but it causes the .app to fail to run.<br>
<br>
Thanks<br>
<br>
James<o:p></o:p></span></font></p>

</div>






<!-- **begin egp html banner** -->

<br>



<br>

<!-- **end egp html banner** -->


<div width="1" style="color: white; clear:
both;"/>__._,_.___</div>

<!-- Start Recommendations -->
<!-- End Recommendations -->



<!-- **begin egp html banner** -->

<img src="http://geo.yahoo.com/serv?s=97476590/grpId=9674343/grpspId=1705007709/msgId=4411/stime=1247042055";
width="1" height="1"> <br>

<!-- **end egp html banner** -->


<!-- **begin egp html banner** -->

<br>
<div style="font-family: verdana; font-size: 77%; border-top: 1px
solid #666; padding: 5px 0;" >
Your email settings: Individual EmailTraditional <br>
<a href="http://groups.yahoo.com/group/xap_automation/join;_ylc=X3oDMTJmYWd0Y3FsBF9TAzk3NDc2NTkwBGdycElkAzk2NzQzNDMEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyNDcwNDIwNTU-";>Change
settings via the Web</a> (Yahoo! ID required) <br>
Change settings via email: <a href="mailto:xap_automation-digest@xxxxxxx?subject=Email
Delivery: Digest">Switch delivery to Daily Digest</a>  <a
href = "mailto:xap_automation-fullfeatured@xxxxxxx?subject=Change
Delivery Format: Fully Featured">Switch to Fully Featured</a>
<br>
<a href="http://groups.yahoo.com/group/xap_automation;_ylc=X3oDMTJkZTVqbHJyBF9TAzk3NDc2NTkwBGdycElkAzk2NzQzNDMEZ3Jwc3BJZAMxNzA1MDA3NzA5BHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjQ3MDQyMDU1";>
Visit Your Group
</a>
<a href="http://docs.yahoo.com/info/terms/";>
Yahoo! Groups Terms of Use
</a>
<a href="mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe";>
Unsubscribe
</a>
<br>
</div>
<br>

<!-- **end egp html banner** -->


<div style="color: white; clear:
both;"/>__,_._,___</div>
</body>



</html>
<!--End group email -->
------=_NextPart_000_0006_01C9FFAB.FC895940--


xAP_Automation Main Index | xAP_Automation Thread Index | xAP_Automation Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.