<div dir="ltr">Oh, the thing I am distracted from.<br><br><a href="http://webcoursify.github.io/content/0-Preface.html">http://webcoursify.github.io/content/0-Preface.html</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 1, 2015 at 3:32 PM, Carl Karsten <span dir="ltr"><<a href="mailto:carl@personnelware.com" target="_blank">carl@personnelware.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>Yes and no.<br><br>json.dumps is a yes.<br><br></div><div>same with "get from server" response <span>=</span> session.get(url)</div><div><br></div><div>There is code to serve stuff as a web server, but for very limited values of stuff. django helps by making it easier to serve more stuff.<br><br></div><div>And all of these have various parameters to address the various details that have been glossed over, or might be of use to someone else, but not you, but you get to read the docs for them anyway as you try to figure out if they will work for you.<br><br><br></div><div><div class="h5"><div><br></div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 1, 2015 at 1:29 PM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Shouldn't these be functions that are part of JS and Python?<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 8:48 PM, Carl Karsten <span dir="ltr"><<a href="mailto:carl@personnelware.com" target="_blank">carl@personnelware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>We can do better than the bits of code in veyepar. I grabbed it because I had that handy, but it is more complicated than a simple example. <br><br></div>(for those of you wondering, it's some ajaxy login that I tried to keep isolated <a href="https://github.com/CarlFK/veyepar/tree/master/dj/accounts" target="_blank">https://github.com/CarlFK/veyepar/tree/master/dj/accounts</a> )<br><br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 4:11 PM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">veyepar is not forgotten just not yet understood and I am guessing only one side of a solution that needs to be broken out and documented to create a tutorial.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 2:46 PM, Carl Karsten <span dir="ltr"><<a href="mailto:carl@personnelware.com" target="_blank">carl@personnelware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>I think this needs to be broken into parts:<br><br>1. code to serialize data.<br>2. code to parse stuff. (deserialze)<br></div>3. code to get stuff from a web server.<br></div></div>4. code to serve stuff as a web server<br></div>5. code to serve serialize data as a web server. <br><div><br></div><div>6. build the client and server from the above.<br><br></div><div>and just lines of code isn't enough.<br></div><div>#1 could be simply <br></div><div>import json<br>>>> json.dumps(1.0)<br>'1.0'<br><br></div><div>But I think it is worth looking at how cpython implements a float,<br>why can python functions pass those bytes around but you shouldn't chuck those bytes at a http client that is asking for it. <br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 26, 2015 at 2:29 PM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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><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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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><font color="#888888"><div><br></div></font></span><div><span><font color="#888888"><br><div>
<span style="border-collapse:separate;border-spacing: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-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>
<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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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" 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>
</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><span><font color="#888888"><br><br clear="all"><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Carl K<br><br></div></div></div></div></div>
</font></span></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>
</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><br clear="all"><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Carl K<br><br></div></div></div></div></div>
</div>
</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>
</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><br clear="all"><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><div>Carl K<br><br></div></div></div></div></div>
</div></div></div></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>