<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><language>en-us</language><copyright>Copyright 2006</copyright><managingEditor>palrich@gmail.com</managingEditor><webMaster>palrich@gmail.com</webMaster><lastBuildDate>Tue, 07 Sep 2010 14:21:00 +0000</lastBuildDate><pubDate>Tue, 07 Sep 2010 14:21:00 +0000</pubDate><ttl>60</ttl><generator>WeirdLooking.com</generator><link>http://www.weirdlooking.com/</link><description>WeirdLooking.com: Michael Barton's Blog</description><title>WeirdLooking.com: Michael Barton's Blog</title><image><url>http://www.weirdlooking.com/images/feed.png</url><title>WeirdLooking.com: Michael Barton's Blog</title><link>http://www.weirdlooking.com/</link></image><item><title>some sign code</title><dc:creator>Michael Barton</dc:creator><link>http://www.weirdlooking.com/blog/some-sign-code</link><guid>http://www.weirdlooking.com/blog/some-sign-code</guid><pubDate>Fri, 03 Oct 2008 16:54:44 +0000</pubDate><description>So, what I&amp;rsquo;ve got &lt;a href=&quot;http://www.weirdlooking.com/blog/108/protocol.py&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fwww.weirdlooking.com%2Fblog%2F108%2Fprotocol.py) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;here&lt;/a&gt; is my implementation of the favotech sign&amp;rsquo;s protocol in python.&amp;nbsp; As I&amp;rsquo;ve mentioned, it&amp;rsquo;s horrible.&amp;nbsp; From what I can tell, the sign supports basically the same protocol over TCP, UDP, and serial.&amp;nbsp; I&amp;rsquo;ve been using UDP over a &lt;a href=&quot;http://www.flickr.com/photos/24388430@N08/2909395961/&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Fwww.flickr.com%2Fphotos%2F24388430%40N08%2F2909395961%2F) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;crossover cable&lt;/a&gt; from a whitebox with two NICs, and that&amp;rsquo;s worked fine.&lt;br /&gt;&lt;br /&gt;I&amp;rsquo;m using it inside a &lt;a href=&quot;http://twistedmatrix.com/trac/&quot; style=&quot;position: relative; padding-left: 8px; zoom: 1;&quot;&gt;&lt;span style=&quot;position: absolute; top: -5px; left: 0px; width: 16px; height: 16px; background: URL(http://www.weirdlooking.com/exticon?http%3A%2F%2Ftwistedmatrix.com%2Ftrac%2F) no-repeat center center; -moz-opacity: 0.3; opacity: 0.3; filter:alpha(opacity=30);&quot;&gt;&lt;/span&gt;twisted&lt;/a&gt; app, mostly for all the batteries it includes.&amp;nbsp; I have a UDP server class that inherits from this class, but implements its own send_to_sign method.&amp;nbsp; This layout made reusing the code for different connection media a breeze.&amp;nbsp; Basic usage then looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;code style=&quot;display: block;&quot; class=&quot;blockocode&quot;&gt; &amp;nbsp; self.test_reset()&lt;br/&gt; &amp;nbsp; self.pause()&lt;br/&gt; &amp;nbsp; self.time_sync()&lt;br/&gt; &amp;nbsp; self.set_frame_count(&lt;span style=&quot;color: #FF0000&quot;&gt;3&lt;/span&gt;)&lt;br/&gt; &amp;nbsp; self.set_text(&lt;span style=&quot;color: #FF0000&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #00B000&quot;&gt;'{y}OH HAI'&lt;/span&gt;)&lt;br/&gt; &amp;nbsp; self.set_text(&lt;span style=&quot;color: #FF0000&quot;&gt;1&lt;/span&gt;, &lt;span style=&quot;color: #00B000&quot;&gt;'I AM {f}THE{/f} SIGN'&lt;/span&gt;)&lt;br/&gt; &amp;nbsp; self.set_text(&lt;span style=&quot;color: #FF0000&quot;&gt;2&lt;/span&gt;, &lt;span style=&quot;color: #00B000&quot;&gt;'{0}{ma} {dd} &amp;nbsp;{12}'&lt;/span&gt;)&lt;br/&gt; &amp;nbsp; self.resume()&lt;/code&gt;&lt;br /&gt;To dumb down the interface, a frame count of &lt;span style=&quot;font-style: italic;&quot;&gt;n&lt;/span&gt; actually creates a playlist containing &lt;span style=&quot;font-style: italic;&quot;&gt;n&lt;/span&gt; two-letter filenames, &amp;#39;AA&amp;rsquo;&amp;#8230;&amp;rsquo;ZZ&amp;rsquo;.&amp;nbsp; Calling set_text with a frame ID then sets the text of the corresponding file.&amp;nbsp; The set_text method has a dead simple markup language it can use to set text colors and stuff.&lt;br /&gt;&lt;br /&gt;More to come, probably&amp;#8230;</description><category>favotech</category><category>led sign</category><category>python</category><comments>http://www.weirdlooking.com/blog/some-sign-code#comments</comments><wfw:comment>http://www.weirdlooking.com/comments/108</wfw:comment><wfw:commentRss>http://www.weirdlooking.com/rss/comments/108</wfw:commentRss><slash:comments>1</slash:comments></item></channel></rss>