tag:blogger.com,1999:blog-18508356.post8000945975301087516..comments2026-02-13T11:24:21.556-05:00Comments on Just a little Python: Realtime Web Chat with Socket.io and GeventRick Copelandhttp://www.blogger.com/profile/11612114223288841087noreply@blogger.comBlogger33125tag:blogger.com,1999:blog-18508356.post-54355387981424192392016-12-08T08:14:01.648-05:002016-12-08T08:14:01.648-05:00hi! i can import only Namespace there is no BaseN...hi! <br />i can import only Namespace there is no BaseNamespace <br />like above , are they the same?<br />Anonymoushttps://www.blogger.com/profile/14862515083278259677noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-85522917370950589132016-12-08T08:10:23.419-05:002016-12-08T08:10:23.419-05:00could it be that BaseNamespace has changed to Name...could it be that BaseNamespace has changed to Namespace?<br />Anonymoushttps://www.blogger.com/profile/14862515083278259677noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-77215725671700065382013-08-13T07:59:43.172-04:002013-08-13T07:59:43.172-04:00Hi Default, I don&#39;t really know much about do...Hi Default,<br /><br />I don&#39;t really know much about doing mobile app development, so I&#39;m afraid I can&#39;t help you much. My only idea would be to look into doing an HTML5 app and using something like Phonegap to make it native. In that case, I&#39;d expect that socket.io would work fine for you.<br /><br />Sorry I&#39;m not much more help there. Thanks for the comment!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-20969352052212830922013-08-13T06:30:18.236-04:002013-08-13T06:30:18.236-04:00Hello Rick, I need to create a chat app for andro...Hello Rick,<br />I need to create a chat app for android and iPhone as well. Just want to know that whether socket.io will be sufficient for the purpose and if not , what architecture you would suggest .Default Winnerhttps://www.blogger.com/profile/00264449297449092490noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-14745354169319619602013-08-05T15:39:20.543-04:002013-08-05T15:39:20.543-04:00Hm, the only thing that comes to mind is ensuring ...Hm, the only thing that comes to mind is ensuring that you&#39;re opening test.html as http://localhost:8080/test.html and not file:///test.html or something like that? Otherwise, I&#39;m not sure.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-85594568784091832782013-07-28T08:46:23.855-04:002013-07-28T08:46:23.855-04:00Hi Rick, I cloned sources, installed gevent-sock...Hi Rick,<br /><br />I cloned sources, <br />installed gevent-socketio ($ pip install gevent-socketio==0.3.5-rc2), <br />ran: $python socketio_test.py<br />Open test.html in browser, and get status: discontected.<br />What might I miss?<br /><br />Thanks!ayahttps://www.blogger.com/profile/08709665574074321928noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-18988506497028530762013-07-18T10:52:19.585-04:002013-07-18T10:52:19.585-04:00Thanks for the comment! Glad you liked it!Thanks for the comment! Glad you liked it!Rick Copelandhttps://www.blogger.com/profile/01076166064171435559noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-56242192992653042702013-07-18T10:49:36.425-04:002013-07-18T10:49:36.425-04:00Nice tutorial, Rick. You did a great job tying all...Nice tutorial, Rick. You did a great job tying all the pieces together in a very small package. (And yes, I realize that I am about a year late, but it is still a helpful post.)Meekshttps://www.blogger.com/profile/15861114868585324934noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-77263972246151602012-12-15T11:19:10.776-05:002012-12-15T11:19:10.776-05:00Thanks for the comment. I&#39;m not sure of the de...Thanks for the comment. I&#39;m not sure of the details of how to run this inside django, since I&#39;m not a django programmer, but since django can run as a WSGI app, presumably you could take the &quot;chat&quot; function defined and use it to wrap the django app at the highest level.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-43678890139818865142012-12-15T03:18:49.672-05:002012-12-15T03:18:49.672-05:00Hi Rick This works great. I was wondering if you ...Hi Rick<br />This works great. I was wondering if you could show how to run this example inside a django app. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-48382368576151938922012-12-06T13:28:38.524-05:002012-12-06T13:28:38.524-05:00Hi juin - thanks for the comment! AJAX usually re...Hi juin - thanks for the comment!<br /><br />AJAX usually refers to Javascript making asynchronous requests to the server in the background, so it&#39;s a technique that *can* be used to implement the server &quot;push&quot; tech described here, but WebSockets is another (and Socket.io can use both). In general, AJAX refers to communication initiated by the browser, not by the server.<br /><br />For your app, if everything&#39;s happening in the browser, it&#39;s definitely not considered ajax; ajax only relates to communication between browser and server.<br /><br />Thanks again for the comment!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-75440529773111178922012-12-02T13:19:21.805-05:002012-12-02T13:19:21.805-05:00awesome tut. Thanks for taking the time to do that...awesome tut. Thanks for taking the time to do that. <br />Would this be called ajax based tech? or what, i&#39;m still confides as to what ajax is. I wan to make app that takes use input computes and prints out the result below the input string, king of like ipython notebook, is that still under the ajax umbrella? Anonymoushttps://www.blogger.com/profile/02771954200942939014noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-56153572210260790212012-09-18T16:29:36.049-04:002012-09-18T16:29:36.049-04:00OK, in that case you&#39;ll need to put a special ...OK, in that case you&#39;ll need to put a special case in the serve_file to serve up index.html when you request the directory (as a minimal example). Also keep in mind that this code is intended as a tech demo for real-time server-side notifications, not so much as a production-ready server.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-91723437770720481992012-09-18T16:25:48.255-04:002012-09-18T16:25:48.255-04:00By the way, when trying to access without /index.h...By the way, when trying to access without /index.html, the browser shows &quot;Internal Server Error&quot;Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-92141880839531442242012-09-18T16:24:43.046-04:002012-09-18T16:24:43.046-04:00Sorry for being too brief and simplistic. It is na...Sorry for being too brief and simplistic. It is named index.html. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-4726062978861274202012-09-18T16:20:18.978-04:002012-09-18T16:20:18.978-04:00If you want the static test.html to be served as t...If you want the static test.html to be served as the default, you&#39;ll need to set up a handler for that. You might start off by naming it &#39;index.html&#39; and see if that works for you.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-44200840285225611322012-09-18T16:07:44.427-04:002012-09-18T16:07:44.427-04:00I&#39;m having trouble with having test.html being...I&#39;m having trouble with having test.html being the default webpage for browsers. When I don&#39;t include the /test.html, the error trace shows that public is a folder. So I guess I need to set test.html as default while keeping public in the path (where there&#39;s a folder with the webpage media). I appreciate any help with that.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-47298929223626386422012-09-10T14:06:18.676-04:002012-09-10T14:06:18.676-04:00Great! Glad to hear it helped you out!Great! Glad to hear it helped you out!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-88666274696410764642012-09-08T22:04:43.383-04:002012-09-08T22:04:43.383-04:00Thanks for the code. I had downloaded it, but hadn...Thanks for the code. I had downloaded it, but hadn&#39;t tried it. Was exactly what I needed. Props!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-49601264468587843622012-09-04T12:19:12.770-04:002012-09-04T12:19:12.770-04:00Thanks for the comment! All the code is available ...Thanks for the comment! All the code is available at http://sf.net/u/rick446/pygotham for you to play with/enhance for your own purposes, and it does implement a web-based chat server.Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-206637665289669682012-08-30T13:20:40.647-04:002012-08-30T13:20:40.647-04:00Hi, Do you have any website or demo or similar tha...Hi, Do you have any website or demo or similar that I could see? I&#39;m just learning Python and I&#39;m not sure if your process is what I&#39;m looking for. <br /><br />I have a python script for a chat, that connects to a local server via sockets. I run the script through the terminal. What I want is to replace the terminal with a browser page for eventual remote access for multiple users. <br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-18508356.post-69902310745797505172012-08-22T10:52:33.234-04:002012-08-22T10:52:33.234-04:00Glad you liked it! I&#39;ve commented directly on ...Glad you liked it! I&#39;ve commented directly on your gist with what I believe to be the problem. Let me know if you have any further questions!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-90630854347523162502012-08-21T23:08:49.364-04:002012-08-21T23:08:49.364-04:00Hey thanks for great tutorial, it was really very ...Hey thanks for great tutorial, it was really very educative. But I&#39;m having the little problem with getting it to work. Im getting the IOError: [Errno 21] Is a directory error. Here&#39;s the gist https://gist.github.com/3421900, if you could help me I would be very thankfull.Unknownhttps://www.blogger.com/profile/13620898521756032975noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-4104870224799090722012-08-03T20:28:06.856-04:002012-08-03T20:28:06.856-04:00Thanks for the comment! If you wanted multi-server...Thanks for the comment! If you wanted multi-server chat, you could certainly use something like ZeroMQ to broadcast to all the other servers. I left it out this time because I felt like it complicated the example without providing much value (in this particular example).<br /><br />Thanks again!Rick Copelandhttps://www.blogger.com/profile/11612114223288841087noreply@blogger.comtag:blogger.com,1999:blog-18508356.post-6240885439283892602012-08-03T17:05:15.832-04:002012-08-03T17:05:15.832-04:00Great post! In your last post, a year ago, you in...Great post!<br /><br />In your last post, a year ago, you included ZeroMQ in the mix. With the changes to Socket.IO and Gevent, how would you integrate ZeroMQ between two Socket.io servers to have multi-server chat?Anonymousnoreply@blogger.com