<div dir="ltr"><div>I am talking about Visual CTA Chicago's front end and back end.  I only try to code on it because I have been unable to Tom Sawyer anyone else into doing it.<br><br></div>It really is fun though and a real kick when in a tall building where you can see the trains and buses doing what your code says they are doing.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 12:11 PM, Chris Foresman <span dir="ltr"><<a href="mailto:foresmac@gmail.com" target="_blank">foresmac@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">If you’re talking about your own front end and back end, I’d avoid using XML for data. JSON is really the only data format most web services uses these days—it requires much less processing to encode/decode, and every major language tends to have constructs that map directly to/from JSON. XML was only ever meant for machine reading, true, but I’ve never run into an API that used it unless it was built in Java.<span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888"><br><div>
<span style="border-collapse:separate;border-spacing:0px 0px;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Chris Foresman</div><div><a href="mailto:chris@chrisforesman.com" target="_blank">chris@chrisforesman.com</a></div><div><br></div><br></span>

</div></font></span><div><div class="h5">
<br><div><blockquote type="cite"><div>On Jan 26, 2015, at 12:04 PM, Randy Baxley <<a href="mailto:randy7771026@gmail.com" target="_blank">randy7771026@gmail.com</a>> wrote:</div><br><div><div dir="ltr">You are of course correct.  For buses Harper Reed's server per David Beazley's Pycon talk has been useful during initial development and something like that will be set up when moving to production.  The current problem is much simpler.  Just wish to set up a server and pass information back and forth between frontend and backend.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 11:42 AM, Chris Foresman <span dir="ltr"><<a href="mailto:foresmac@gmail.com" target="_blank">foresmac@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">From my experience working with the CTA’s byzantine API, you’re better off writing your own proxy server that periodically polls data about stop locations from the tracker service and  maintaining your own database of locations. Use that to figure out what stop or stops are applicable and then use a translating shim to request data on buses or trains for that location.<div><br></div><div><br></div><div><div>
<span style="border-collapse:separate;border-spacing:0px;font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Chris Foresman</div><div><a href="mailto:chris@chrisforesman.com" target="_blank">chris@chrisforesman.com</a></div><div><br></div><br></span>

</div>
<br><div><blockquote type="cite"><div>On Jan 25, 2015, at 9:12 AM, Randy Baxley <<a href="mailto:randy7771026@gmail.com" target="_blank">randy7771026@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Sorry, the to should be:<br><br><a href="https://github.com/randy7771026/Visual-CTA-Chicago/blob/master/sbte.py" target="_blank">https://github.com/randy7771026/Visual-CTA-Chicago/blob/master/sbte.py</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 25, 2015 at 9:09 AM, Randy Baxley <span dir="ltr"><<a href="mailto:randy7771026@gmail.com" target="_blank">randy7771026@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Thank you Tanya though not what I am looking for, I think.  If I can ever get anything working in Django it might be an option.<br><br></div>For now things are extremely simple but they will get very complicated as the code grows.<br><br></div>Right now I want to pass the latitude and longitude from:<br><br><a href="https://github.com/randy7771026/Visual-CTA-Chicago/blob/master/index.html" target="_blank">https://github.com/randy7771026/Visual-CTA-Chicago/blob/master/index.html</a><br><br></div>to:<br><br><a href="https://github.com/randy7771026/Visual-CTA-Chicago/blob/master/index.html" target="_blank">https://github.com/randy7771026/Visual-CTA-Chicago/blob/master/index.html</a><br><br></div>replacing lines 48 and 49.  Then my python does things and writes some things that I will want to send back to the web side but then eventually back to python.  CTA still uses XML so for now I am thinking I want to stay with that format but in the future may switch to one of the more modern formats.<br><br></div>I will eventually have to decide if I want to create cookies or keep a database and issue uids and pswrds.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Thu, Jan 22, 2015 at 8:30 AM, Tanya Schlusser <span dir="ltr"><<a href="mailto:tanya@tickel.net" target="_blank">tanya@tickel.net</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div>I cannot make it to Project night, but may I recommend <a href="http://docs.python-tablib.org/" target="_blank">Tablib</a>, another Kenneth Reitz gem, that does just what you asked?</div></div><div><br></div><div><a href="http://docs.python-tablib.org/en/latest/tutorial/" target="_blank">http://docs.python-tablib.org/en/latest/tutorial/</a></div><div><br></div>>> I am wondering if we might be able to build a tutorial that any<div>>> Grey Haired legacy programmer could understand for this process</div><div>>> that addresses the parsing of XML, JSON, XSON and cookies when</div><div>>> designing and implementing a project then include that in the project</div><div>>> night resources.</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/chicago" target="_blank">https://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
_______________________________________________<br>Chicago mailing list<br><a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br><a href="https://mail.python.org/mailman/listinfo/chicago" target="_blank">https://mail.python.org/mailman/listinfo/chicago</a><br></div></blockquote></div><br></div></div><br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/chicago" target="_blank">https://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>Chicago mailing list<br><a href="mailto:Chicago@python.org" target="_blank">Chicago@python.org</a><br><a href="https://mail.python.org/mailman/listinfo/chicago" target="_blank">https://mail.python.org/mailman/listinfo/chicago</a><br></div></blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
Chicago mailing list<br>
<a href="mailto:Chicago@python.org">Chicago@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/chicago" target="_blank">https://mail.python.org/mailman/listinfo/chicago</a><br>
<br></blockquote></div><br></div>