Popular Python recipes tagged "javascript"http://code.activestate.com/recipes/langs/python/tags/javascript/2016-08-07T20:41:12-07:00ActiveState Code RecipesMakes html with javascript to animate a sequence of images (Python) 2016-08-07T20:41:12-07:00Brian Fiedlerhttp://code.activestate.com/recipes/users/4194196/http://code.activestate.com/recipes/580675-makes-html-with-javascript-to-animate-a-sequence-o/ <p style="color: grey"> Python recipe 580675 by <a href="/recipes/users/4194196/">Brian Fiedler</a> (<a href="/recipes/tags/animation/">animation</a>, <a href="/recipes/tags/javascript/">javascript</a>). Revision 2. </p> <p>Given paths to image files, produces the html file with embedded javascript to animate those images as a web page.</p> WebSocket interface (Python) 2012-11-25T16:52:21-08:00Nick Farohttp://code.activestate.com/recipes/users/4184363/http://code.activestate.com/recipes/578348-websocket-interface/ <p style="color: grey"> Python recipe 578348 by <a href="/recipes/users/4184363/">Nick Faro</a> (<a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/socket/">socket</a>, <a href="/recipes/tags/websocket/">websocket</a>). Revision 2. </p> <p>This tries its best to be a replacement for the regular <code>socket</code> module.</p> <p>It supports only sending and receiving but should be useful enough.</p> <p>The only real difference should be that you can't specify the number of bytes is received, instead do</p> <pre class="prettyprint"><code>for message in socket.recv(): print(message) </code></pre> <p>Revision 2: Added proper message receiving. Previously it just requested a ton of data. Now it reads 2 bytes, determines the length, then requests that much.</p>