Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-19 Thread Jake Angulo
On Thu, Jul 18, 2013 at 2:36 PM, Aseem Bansal asmbans...@gmail.com wrote:

 I wanted to do a little project for learning Python. I thought a chat
 system will be good as it isn't something that I have ever done.
 ...
 I wanted to know what will I need?
 1 learn network/socket programming


I was actually expecting somebody to mention Twisted :)
(or Tornado)

You'll find it easy to use any of these frameworks to power the back-end
chat engine.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-19 Thread Chris Angelico
On Fri, Jul 19, 2013 at 5:10 PM, Jake Angulo jake.ang...@gmail.com wrote:
 On Thu, Jul 18, 2013 at 2:36 PM, Aseem Bansal asmbans...@gmail.com wrote:

 I wanted to do a little project for learning Python. I thought a chat
 system will be good as it isn't something that I have ever done.
 ...

 I wanted to know what will I need?
 1 learn network/socket programming


 I was actually expecting somebody to mention Twisted :)
 (or Tornado)

 You'll find it easy to use any of these frameworks to power the back-end
 chat engine.

For something this simple, what do they offer above the basic socket
module? I know that sounds critical but it's not meant to be; I've
never looked into either, as I've grown up using the BSD socket APIs
(in C, 80x86 assembly, C++, REXX, Java, Pike, and Python, on DOS (I
think), OS/2, Windows, and Linux... and possibly other
languages/platforms that I've now forgotten), and am comfortable with
them; but for someone who hasn't been in networking for two decades,
is there a noteworthy ease-of-starting difference? Bear in mind that
use of a framework locks you in to that framework and its ecosystem
(so, most likely, language), while grokking sockets themselves gives
you the freedom to move as required.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-19 Thread Jorgen Grahn
On Thu, 2013-07-18, Chris Angelico wrote:
...
 You can certainly do your server-side programming directly in Python;
 in fact, I recommend it for this task. There's no reason to use HTTP,
 much less a web framework (which usually consists of a structured way
 to build HTML pages, plus a bunch of routing and stuff, none of which
 you need). All you need is a simple structure for separating one
 message from another.

 I would recommend either going MUD/TELNET style
 and ending each message with a newline, or prefixing each message with
 its length in octets. Both ways work very nicely; newline-termination
 allows you to use a MUD client for debugging, which I find very
 convenient

It's definitely the way to go.  It's not just MUDs -- a lot of
Internet protocols work that way.  Netcat is one popular client for
talking to/debugging/testing such servers.  No doubt MUD clients too,
but last time I did such stuff was in 1993, and I think I used telnet
...

In fact, I'd design the protocol before starting to write code.  Or
better, steal some existing chat protocol.  Like a subset of IRC.


There's also another question in the original posting that bothers me:
paraphrased do I need to learn database programming to manage users?
No!  Unix does fine with plain-text files.

Managing credentials (understanding cryptography, setting up a support
organization for resetting lost passwords ...) is non-trivial though,
so try to do without such things at first.  It's not obvious that you
should need an account for an experimental chat, anyway.

/Jorgen

-- 
  // Jorgen Grahn grahn@  Oo  o.   . .
\X/ snipabacken.se   O  o   .
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-19 Thread Chris Angelico
On Fri, Jul 19, 2013 at 9:25 PM, Jorgen Grahn grahn+n...@snipabacken.se wrote:
 On Thu, 2013-07-18, Chris Angelico wrote:
 ...
 You can certainly do your server-side programming directly in Python;
 in fact, I recommend it for this task. There's no reason to use HTTP,
 much less a web framework (which usually consists of a structured way
 to build HTML pages, plus a bunch of routing and stuff, none of which
 you need). All you need is a simple structure for separating one
 message from another.

 I would recommend either going MUD/TELNET style
 and ending each message with a newline, or prefixing each message with
 its length in octets. Both ways work very nicely; newline-termination
 allows you to use a MUD client for debugging, which I find very
 convenient

 It's definitely the way to go.  It's not just MUDs -- a lot of
 Internet protocols work that way.  Netcat is one popular client for
 talking to/debugging/testing such servers.  No doubt MUD clients too,
 but last time I did such stuff was in 1993, and I think I used telnet

Yeah. As I mentioned, I'm a MUDder with tens of thousands of online
hours on Threshold RPG[1], and have written several MUD clients; in
fact, I'm right now working on Gypsum (fun fun). The most common
internet protocols all:
* Involve a well-known TCP port and a single socket connection (apart from FTP)
* Begin with a one-line (usually) greeting from the server
* Have a line-based request-and-response system
* Have normal lines divided into command and parameters as per
shell commands
* (Usually) have an easy way to recognize success/failure, even
without understanding the whole response
* Are human-readable to the extreme
* Rely on lower-level protocols for encryption (eg TLS)

The mail trilogy (SMTP, POP, IMAP) are all like this, with the caveat
that IMAP tags commands and responses (so the second word, not the
first, is the command). FTP is almost there, apart from its secondary
data channel. MUDs are definitely right there. And when I started
putting together some networking facilities at work, I naturally
gravitated to this kind of system. Even when it's a purely internal
protocol, I like being able to just telnet/netcat to the service and
operate everything manually. To date, I think I've implemented five or
six such protocols within the suite at work, with only a couple of
systems done differently (one of them uses a PHP client, for
hysterical raisins, so it's done over HTTP).

Plus, it's great to be able to break out the MUD client at work
without getting in trouble for playing games on company time :)

ChrisA

[1] http://www.thresholdrpg.com/ if you'd like to join me! You'll be
made very welcome!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Chris Angelico
On Thu, Jul 18, 2013 at 2:36 PM, Aseem Bansal asmbans...@gmail.com wrote:
 I wanted to do a little project for learning Python. I thought a chat system 
 will be good as it isn't something that I have ever done.

A good thing to start with. Yes, it's been done before, many times...
but if you think about it, it's the fundamental on which pretty much
everything else is derived. The step from a multi-person chat system
to a multiplayer game is very slight.

 I wanted to know what will I need? I think that would require me these
 1 learn network/socket programming
 2 find a free server to host my chat server
 3 GUI development for clients

Learn network programming, definitely. As an adjunct to that, learn
networking security. For instance, do not think in terms of the
client will only ever send X; the server has to be able to cope,
safely, with any stream of bytes coming from the socket. Also, be sure
you understand the difference between bytes (or octets) and Unicode
characters, and know what everything is. Python 3 helps with this.

Finding hosting (I'll use the word server here to mean the program,
and will say hosting when I mean a computer) is optional though; for
your first tests, use your own computer. You can run the server and a
number of clients all on the same computer, and alt-tab between them;
or, if you have a LAN, you can use that. Then when you want to expand
to the full internet and let your friends in on this, you can still
host it on your home internet connection, though you may need to
choose carefully which port you use (some home connections prevent
incoming port 25 and 80 traffic). You won't need to worry about
hosting until (a) you need it to be up 24x7 and don't want to depend
on your home system, and/or (b) you need more bandwidth/processing
than your home connection will do. Neither will be true of your first
experiments.

GUI development, in my opinion, should be left for Phase Two. Start by
making a very simple system that just works with plain text; later on,
make a fancy graphical interface. Keep the text version working, and
keep them compatible. Trust me, you'll appreciate that text one when
you start debugging - it'll be so easy to see what's going on.

 -I wanted to know whether these are all that I would need or are there more 
 things?
 -Will I need to learn a web framework like Django?

Hmm. I would think not; I'd recommend that a chat system work with TCP
sockets directly, for simplicity and performance. Working with a web
framework implies working with HTTP, and unless you're running this in
a web browser, there's no reason to do that.

 -Will I need to learn something for database management like sql for handling 
 people's account names and password?

Optional. Leave that for Phase Two; to start off with, just let people
type in their own names, and don't worry about authentication
initially (this isn't such a crazy idea - IRC largely works this way).
You can add authentication later.

 Any other advice for me(a novice programmer)?

Get to know as many tools as you can, so that when you're faced with a
problem, you can select the right one for the job. You are not Jeremy
Clarkson, your toolchest is not all hammers :)

In this particular instance, you may find that Python is the best
language for the clients, but not for the server. I've written a
number of chat-server-like systems, most notably MUD clients and
derivatives, and I use Pike for the server. Its biggest advantage
(over Python) is that you can tweak the code while it's running; I've
had Pike servers running for over two years on commodity hardware (and
would still have that uptime today if the UPS hadn't died). Still
trying to claw all that back.. up to 25 weeks so far. Pike and Python
are extremely similar in semantics (even down to having a
nearly-identical internal string representation, as of Python 3.3),
but have distinctly different syntax (Pike looks like C), and their
optimizations are quite different, so performance varies somewhat.
They're both high level languages that let you manipulate functions,
dictionaries, etc, as first-class objects, they're both sufficiently
high performance/efficiency to run something like this on 0.00 load
average (my server's load is more usually from Apache serving PHP
pages than it is from either Pike or Python), and both will serve you
well in this project.

One more tip: Don't be afraid to ask for help! I personally *love*
networking, and will gladly help out with any little problems you run
into; the same, I am sure, will be true of a good number of people on
this list. Networking is a complicated world, and there are a lot of
odd concepts to master; but it's also an immensely fun bunch of
technologies. Why play with just one computer when you can play with
half a dozen!

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Aseem Bansal
@vikash agrawal

About GUI I discussed it at 
https://groups.google.com/forum/#!starred/comp.lang.python/M-Dy2pyWRfM and I am 
thinking about using PySide 1.2 for clients of chat system. I think I'll need 
downloadable clients if I want to make something like google talk. Then I'll 
need to implement server side programming also. I think google app engine would 
be suitable for this as it is going to be always online.

In the above scenario I wanted to know whether the database can be stored on 
google app engine itself? Is it possible? Having a chat system with server 
online and DB offline isn't going to be good. Should I consider heroku for this 
or can it be done using google app engine? Is it viable to have the DB on 
google appengine itself?

About using web frameworks, in the above scenario when there isn't an online 
website for chat would I need web frameworks? I am confused about this. Can 
server side programming be done in Python or by using a web framework only?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Chris Angelico
On Thu, Jul 18, 2013 at 4:11 PM, Aseem Bansal asmbans...@gmail.com wrote:
 @vikash agrawal

 About GUI I discussed it at 
 https://groups.google.com/forum/#!starred/comp.lang.python/M-Dy2pyWRfM and I 
 am thinking about using PySide 1.2 for clients of chat system. I think I'll 
 need downloadable clients if I want to make something like google talk. Then 
 I'll need to implement server side programming also. I think google app 
 engine would be suitable for this as it is going to be always online.

Hrm. Rather than pointing people to Google Groups, which a number here
(and not unreasonably) detest, you may want to link to the python-list
archive:

http://mail.python.org/pipermail/python-list/2013-July/thread.html#651359

 About using web frameworks, in the above scenario when there isn't an online 
 website for chat would I need web frameworks? I am confused about this. Can 
 server side programming be done in Python or by using a web framework only?

You can certainly do your server-side programming directly in Python;
in fact, I recommend it for this task. There's no reason to use HTTP,
much less a web framework (which usually consists of a structured way
to build HTML pages, plus a bunch of routing and stuff, none of which
you need). All you need is a simple structure for separating one
message from another. I would recommend either going MUD/TELNET style
and ending each message with a newline, or prefixing each message with
its length in octets. Both ways work very nicely; newline-termination
allows you to use a MUD client for debugging, which I find very
convenient (full disclosure: I am the author of multiple MUD clients,
including one that's zero-dollar and another that's free).

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Aseem Bansal
@Chris Angelico

Thanks. That cleared many doubts and your suggestions would definitely be 
useful. 

I am asking the next paragraph because you said about Python 3 helping with 
things. I am not looking for a debate or anything just a opinion. 

I learnt Python myself and everyone told me that Python 2 is status quo so I 
learned Python 2 and have been working with it. I am just 1.5 months in Python 
programming so should I consider switching to Python 3 if it helps with new 
things or should I stick with Python 2 to get a taste of what is currently out 
there?

About Pike, thanks for the heads up. But for now I'll use Python. I wanted to 
learn Python through this project. I'll leave Pike for later. Maybe Phase 1.5.

Aren't you guys posting in google groups? I thought you were because I can see 
your posts here. How do I post in python mailing list and see its archives 
instead of posting on google groups?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Andrew Berg
On 2013.07.18 01:36, Aseem Bansal wrote:
 I learnt Python myself and everyone told me that Python 2 is status quo so I 
 learned Python 2 and have been working with it. I am just 1.5 months in 
 Python programming so should I consider switching to Python 3 if it helps 
 with new things or should I stick with Python 2 to get a taste of what is 
 currently out there?
Python 2 is what some people are stuck with because their projects depend on 
huge libraries that have not yet made all their code compatible
with Python 3 (or on libraries that are not actively maintained or are being 
replaced by something else). All new code and new Python users
should be using Python 3 unless there is a pressing need for a library that 
requires Python 2.
Most popular libraries at this point have either been made compatible or have 
been replaced by something that supports Python 3. Python 3 is
no longer the shiny new thing to look at in the future - 3.0 was released in 
December 2008.

-- 
CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Chris Angelico
On Thu, Jul 18, 2013 at 4:36 PM, Aseem Bansal asmbans...@gmail.com wrote:
 @Chris Angelico

 Thanks. That cleared many doubts and your suggestions would definitely be 
 useful.

 I am asking the next paragraph because you said about Python 3 helping with 
 things. I am not looking for a debate or anything just a opinion.

 I learnt Python myself and everyone told me that Python 2 is status quo so I 
 learned Python 2 and have been working with it. I am just 1.5 months in 
 Python programming so should I consider switching to Python 3 if it helps 
 with new things or should I stick with Python 2 to get a taste of what is 
 currently out there?

Python 3 is now the current Python. There'll be no more development on
Python 2 (bugfixes/security only, and even that won't be forever), so
I strongly recommend going to Python 3. You're writing new code, so
there's really no reason to use Python 2. All the core libraries
you'll be needing (socket, mainly) are available for Py3, and as I
mentioned earlier, Unicode handling is far superior (especially as of
3.3).

 About Pike, thanks for the heads up. But for now I'll use Python. I wanted to 
 learn Python through this project. I'll leave Pike for later. Maybe Phase 1.5.

Yep. My main point there is: Don't be too stuck on any one tool, learn
'em all. Learn Python now, you may find that you want to use Pike
later. Build your system so you can switch one thing out for another.

 Aren't you guys posting in google groups? I thought you were because I can 
 see your posts here. How do I post in python mailing list and see its 
 archives instead of posting on google groups?

Google Groups is one way (and one of the worse ways) of accessing
comp.lang.python, which is cross-mirrored with the mailing list
python-list@python.org - the easiest way is to simply subscribe to
either the newsgroup or the mailing list, using a newsreader or mail
client. As you see, I'm posting from gmail; there are a couple of
issues with using gmail here (it doesn't have a Reply List option,
for instance), but it's orders of magnitude less annoying than Google
Groups.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Aseem Bansal
@Andrew Berg
@Chris Angelico

Is there a way to have both Python 2 and 3 installed on my computer till I can 
update the little codebase that I have built? Can I make different commands for 
invoking python 2 and Python 3? I am using Windows 7 and use Windows Powershell 
as an alternative to the linux terminal. Any suggestions about how to do that 
instead of breaking all my code at once?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Chris Angelico
On Thu, Jul 18, 2013 at 5:05 PM, Aseem Bansal asmbans...@gmail.com wrote:
 @Andrew Berg
 @Chris Angelico

 Is there a way to have both Python 2 and 3 installed on my computer till I 
 can update the little codebase that I have built? Can I make different 
 commands for invoking python 2 and Python 3? I am using Windows 7 and use 
 Windows Powershell as an alternative to the linux terminal. Any suggestions 
 about how to do that instead of breaking all my code at once?

Yep! And in fact, Python 3.3 includes a launcher that makes it fairly
easy. Just install another version, and then check this out:

http://docs.python.org/3.3/using/windows.html#launcher

You can use a Unix-style shebang to specify which Python version some
script depends on.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Aseem Bansal
@ChrisA

Thanks. That's great. That solved the whole thing easily. I'll install Python 3 
and start updating today.

About reading comp.lang.python can you suggest how to read it and reply? I have 
never read a newsgroup leave alone participated in one. I am used to forums 
like stackoverflow. Any way to read it and reply by one interface? If not, give 
any suggestion. I'll use that.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Chris Angelico
On Thu, Jul 18, 2013 at 5:29 PM, Aseem Bansal asmbans...@gmail.com wrote:
 @ChrisA

 Thanks. That's great. That solved the whole thing easily. I'll install Python 
 3 and start updating today.

 About reading comp.lang.python can you suggest how to read it and reply? I 
 have never read a newsgroup leave alone participated in one. I am used to 
 forums like stackoverflow. Any way to read it and reply by one interface? If 
 not, give any suggestion. I'll use that.

Easiest, if you're not familiar with newsgroups, is to subscribe to
the mailing list.

Subscribe here:

http://mail.python.org/mailman/listinfo/python-list

Then you get an email every time anyone posts. Threading should be
handled by any decent mail client, and you just hit Reply-List (or
Reply and change the address to python-list@python.org) to post a
follow-up.

It's a good system. Works for myriad lists. The software that runs
this one (Mailman) is even written in Python, so you're using Python
to discuss Python :)

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Aseem Bansal
@ChrisA

I subscribed to it. How do I reply to a message that has already been posted 
before my subscription?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Chris Angelico
On Thu, Jul 18, 2013 at 5:48 PM, Aseem Bansal asmbans...@gmail.com wrote:
 @ChrisA

 I subscribed to it. How do I reply to a message that has already been posted 
 before my subscription?

Not easily, far as I know. But you now have this reply, and you can
always just post something with the right subject line and hope that
people pick up that it's part of the same discussion topic. Transition
isn't the cleanest but once it's done it's done.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Aseem Bansal
I tried replying to your message by mail. I used the reply button and send it 
to python-list@python.org? Or do I need to use pytho...@python.org as you 
wrote in your post?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Chris Angelico
On Thu, Jul 18, 2013 at 6:10 PM, Aseem Bansal asmbans...@gmail.com wrote:
 I tried replying to your message by mail. I used the reply button and send it 
 to python-list@python.org? Or do I need to use pytho...@python.org as you 
 wrote in your post?

You replied correctly. The ellipsis was presumably an anti-spam
feature. Send to python-list at python dot org to post.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread aseem bansal

Ok I'll mail by e-mail now. Hope that it reaches the place correctly.-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Grant Edwards
On 2013-07-18, Chris Angelico ros...@gmail.com wrote:
 On Thu, Jul 18, 2013 at 4:11 PM, Aseem Bansal asmbans...@gmail.com wrote:
 @vikash agrawal

 About GUI I discussed it at 
 https://groups.google.com/forum/#!starred/comp.lang.python/M-Dy2pyWRfM and I 
 am thinking about using PySide 1.2 for clients of chat system. I think I'll 
 need downloadable clients if I want to make something like google talk. Then 
 I'll need to implement server side programming also. I think google app 
 engine would be suitable for this as it is going to be always online.

 Hrm. Rather than pointing people to Google Groups, which a number here
 (and not unreasonably) detest, you may want to link to the python-list
 archive:

 http://mail.python.org/pipermail/python-list/2013-July/thread.html#651359

While that's the canonical archive, the UI is awful.  I find gmane's
web UI to be _far_ more friendly and useful than the pipermail archive
UI:

http://thread.gmane.org/gmane.comp.python.general/737271/

 1) The search facility sort-of works (though using google with
site:gmane.org:/gmane.comp.python usually works better).

 2) You can post from the gmane web UI.

 3) It offers both a threaded and a flat, blog-like version.

-- 
Grant Edwards   grant.b.edwardsYow! We just joined the
  at   civil hair patrol!
  gmail.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Terry Reedy

On 7/18/2013 3:29 AM, Aseem Bansal wrote:


About reading comp.lang.python can you suggest how to read it and
reply?


To read this list as a newsgroup use news.gmane.org. The difference 
between the mailing list interface and newsgroup interface is that the 
latter automatically segregates messages by group and only downloads the 
messages you want to read. Gmane is also a better way to search the archive.



I have never read a newsgroup leave alone participated in one.
I am used to forums like stackoverflow. Any way to read it and reply
by one interface? If not, give any suggestion. I'll use that.


I use Thunderbird. There is almost no difference between replying to 
emails and replying to newsgroup posts.


--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Serhiy Storchaka

18.07.13 20:04, Terry Reedy написав(ла):

On 7/18/2013 3:29 AM, Aseem Bansal wrote:

About reading comp.lang.python can you suggest how to read it and
reply?


To read this list as a newsgroup use news.gmane.org. The difference
between the mailing list interface and newsgroup interface is that the
latter automatically segregates messages by group and only downloads the
messages you want to read. Gmane is also a better way to search the
archive.


Also newsgroup interface allow you reply to messages that have already 
been posted before your subscription.



--
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Grant Edwards
On 2013-07-18, Serhiy Storchaka storch...@gmail.com wrote:
 18.07.13 20:04, Terry Reedy ??():
 On 7/18/2013 3:29 AM, Aseem Bansal wrote:
 About reading comp.lang.python can you suggest how to read it and
 reply?

 To read this list as a newsgroup use news.gmane.org. The difference
 between the mailing list interface and newsgroup interface is that the
 latter automatically segregates messages by group and only downloads the
 messages you want to read. Gmane is also a better way to search the
 archive.

 Also newsgroup interface allow you reply to messages that have already 
 been posted before your subscription.

Indeed.  I read about 20 mailing lists by pointing a newsreader (I use
slrn) at gmane.org.  I find it to take far less effort than actualling
having all of those messages actually sent to me.  For _some_ of the
gmane groups/lists you will actually have to subscribe to the mailing
list in question if you want to be allowed to post messages -- but in
your account settings for that mailing list server you can turn off
delivery, so that it doesn't actually send you any of the postings.

I really can't recommend gmane.org highly enough.

[I don't actually read the python list using gmane.org, since I've
read it from a Usenet news server via the group comp.lang.python since
long before I discovered gmane.org.]

-- 
Grant Edwards   grant.b.edwardsYow! Not SENSUOUS ... only
  at   FROLICSOME ... and in
  gmail.comneed of DENTAL WORK ... in
   PAIN!!!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Owen Marshall
On 2013-07-18, Grant Edwards invalid@invalid.invalid wrote:
 On 2013-07-18, Serhiy Storchaka storch...@gmail.com wrote:
 18.07.13 20:04, Terry Reedy ??():
 On 7/18/2013 3:29 AM, Aseem Bansal wrote:
 About reading comp.lang.python can you suggest how to read it and
 reply?

 To read this list as a newsgroup use news.gmane.org. The difference
 between the mailing list interface and newsgroup interface is that the
 latter automatically segregates messages by group and only downloads the
 messages you want to read. Gmane is also a better way to search the
 archive.

 Also newsgroup interface allow you reply to messages that have already
 been posted before your subscription.

 Indeed.  I read about 20 mailing lists by pointing a newsreader (I use
 slrn) at gmane.org.  I find it to take far less effort than actualling
 having all of those messages actually sent to me.  For _some_ of the
 gmane groups/lists you will actually have to subscribe to the mailing
 list in question if you want to be allowed to post messages -- but in
 your account settings for that mailing list server you can turn off
 delivery, so that it doesn't actually send you any of the postings.

 I really can't recommend gmane.org highly enough.

 [I don't actually read the python list using gmane.org, since I've
 read it from a Usenet news server via the group comp.lang.python since
 long before I discovered gmane.org.]


Huh - I (foolishly) didn't realize gmane actually had NNTP, I've always
used it to search mailing lists. If the list dumped to usenet (much like
c.l.python) I'd post through sunsite.dk, which is a very nice usenet
provider. But that still meant several annoying mailing list
subscriptions.

... man, I'm really glad I read your post :-)

--
  -owen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Michael Torrie
On 07/17/2013 11:39 PM, Eric S. Johansson wrote:
 Not discourage you but this is a been there, done that kind of project.  
 You could learn more from reading somebody else is code. What hasn't been  
 done, and this would be very cool, is a chat program that works  
 peer-to-peer with no central server. To do this, you would probably need  
 to know about distributed hash tables and methods of piercing address  
 translation firewalls (think UDP).

University CS curricula across the world would disagree with your
assessment of the usefulness of been there, done that.  Indeed that's
how you learn by doing simple things that have been done many times
before, and discovering the magic of programming and software design.
My uni's CS undergrad degree consists of dozens of contrived projects
that have been done before.  Web crawlers, compilers, expert systems,
chat systems, word counters, etc.

And that's the same way with all fields of endeavor.  Indeed it'd be
silly to tell an enthused hobby builder that building a shed is
pointless as it's been done before.  The shed itself, which would
arguably be useful, is beside the point.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Michael Torrie
On 07/18/2013 12:19 PM, Owen Marshall wrote:
 Huh - I (foolishly) didn't realize gmane actually had NNTP, I've always
 used it to search mailing lists. If the list dumped to usenet (much like
 c.l.python) I'd post through sunsite.dk, which is a very nice usenet
 provider. But that still meant several annoying mailing list
 subscriptions.
 
 ... man, I'm really glad I read your post :-)

I'm a bit confused.  This list *is* c.l.python (I happen to read via
e-mail through the mailing list).  So you can reach it from sunsite.dk
can you not?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-18 Thread Owen Marshall
On 2013-07-18, Michael Torrie torr...@gmail.com wrote:
 On 07/18/2013 12:19 PM, Owen Marshall wrote:
 Huh - I (foolishly) didn't realize gmane actually had NNTP, I've always
 used it to search mailing lists. If the list dumped to usenet (much like
 c.l.python) I'd post through sunsite.dk, which is a very nice usenet
 provider. But that still meant several annoying mailing list
 subscriptions.

 ... man, I'm really glad I read your post :-)

 I'm a bit confused.  This list *is* c.l.python (I happen to read via
 e-mail through the mailing list).  So you can reach it from sunsite.dk
 can you not?

Doesn't surprise me, I was confusing ;-)

What I was saying was that my workflow used to be this:

For maliing lists that dump to a newsgroup (c.l.python) I'd post to the
group via usenet (sunsite.dk)

For mailing lists that _do not_ have a direct newsgroup gateway (flask,
etc.) I'd have to subscribe and read them in my mail client.


So I used to think gmane was just a way of reading a bunch of mailing
lists. *But now* I know it is much more - it's an NNTP == mail gateway
that also has a web viewer.

Now I can point my slrn to news.gmane.net and see the flask mailing
list, ruby-talk, ... -- which I much prefer to using email.


Again, perfectly obvious stuff had I actually _read_ the gmane FAQ. But
who has time for that ;-)

--
  -owen
-- 
http://mail.python.org/mailman/listinfo/python-list


What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-17 Thread Aseem Bansal
I wanted to do a little project for learning Python. I thought a chat system 
will be good as it isn't something that I have ever done. 

I wanted to know what will I need? I think that would require me these
1 learn network/socket programming
2 find a free server to host my chat server
3 GUI development for clients

-I wanted to know whether these are all that I would need or are there more 
things? 
-Will I need to learn a web framework like Django? 
-Will I need to learn something for database management like sql for handling 
people's account names and password? 

Is google appengine good for hosting the website or should I look up at django 
hosting websites?

Any other advice for me(a novice programmer)?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-17 Thread vikash agrawal
Hi Aseem,

First of all great thought and all the best for the learning!


On Thu, Jul 18, 2013 at 10:06 AM, Aseem Bansal asmbans...@gmail.com wrote:

 I wanted to do a little project for learning Python. I thought a chat
 system will be good as it isn't something that I have ever done.

 I wanted to know what will I need? I think that would require me these
 1 learn network/socket programming


Yes! sockets are the heart and soul of chat sys :-)


 2 find a free server to host my chat server


You can use many, but I would suggest heroku for your free apps.


 3 GUI development for clients


There are many python libraries Tkinter, PyQt, PyGtk, wxPython through
which you have GUI!


 -I wanted to know whether these are all that I would need or are there
 more things?


I think with above you are good to go!


 -Will I need to learn a web framework like Django?


That would really depend upon the type of chat application you are relying
upon. For a command line utility I think you can skip it, but if you wish
to have good-looking web version then yes, give Django a shot! But yes do
see other frameworks as well, just for finding out, learning and knowing
more :)


 -Will I need to learn something for database management like sql for
 handling people's account names and password?


Yes, it will be good decision to use DB to store names and chat histories
(with timestamp) and have your logs ready



 Is google appengine good for hosting the website or should I look up at
 django hosting websites?


Its good too :)



 Any other advice for me(a novice programmer)?


Make mistakes and fail early!

Python is awesome! But do try to learn the best practices. For eg, reverse
a string string[::-1] etc.



 --
 http://mail.python.org/mailman/listinfo/python-list


Regards
~Vikash
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-17 Thread Eric S. Johansson
On Thu, 18 Jul 2013 00:36:17 -0400, Aseem Bansal asmbans...@gmail.com  
wrote:


I wanted to do a little project for learning Python. I thought a chat  
system will be good as it isn't something that I have ever done.


I wanted to know what will I need? I think that would require me these
1 learn network/socket programming
2 find a free server to host my chat server
3 GUI development for clients



Not discourage you but this is a been there, done that kind of project.  
You could learn more from reading somebody else is code. What hasn't been  
done, and this would be very cool, is a chat program that works  
peer-to-peer with no central server. To do this, you would probably need  
to know about distributed hash tables and methods of piercing address  
translation firewalls (think UDP).


First however, I would suggest taking a look at https://jitsi.org/ and see  
how they do things. You can learn a lot from these people. They are very  
smart.


--
http://mail.python.org/mailman/listinfo/python-list


Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

2013-07-17 Thread Aseem Bansal
@Eric S. Johansson

I am a novice who hasn't done any big project in programming. I haven't done 
anything I can even call a moderate project. I haven't touched web frameworks 
ever. I have little or no knowledge of network/socket programming. I have never 
used databases before.

I understand that there are a lot of chat systems out there but I haven't done 
anything like that before. This is for learning purposes.

Reading someone else's code is good but doing it yourself is better.

Thanks for the suggestion but for now I'll stick to this idea. I am excited 
about this and I would need that for a hobby project.
-- 
http://mail.python.org/mailman/listinfo/python-list