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 Chris Angelico
On Thu, Jul 18, 2013 at 4:36 PM, Aseem Bansal 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

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 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 shoul

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
@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 Pyt

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 Chris Angelico
On Thu, Jul 18, 2013 at 4:11 PM, Aseem Bansal 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 wa

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
@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 impleme

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 Chris Angelico
On Thu, Jul 18, 2013 at 2:36 PM, Aseem Bansal 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 th

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

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 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 progr

Re: Need help with network script

2013-07-17 Thread Chris Angelico
On Thu, Jul 18, 2013 at 11:59 AM, wrote: > On Wednesday, July 17, 2013 7:50:44 PM UTC-6, Chris Angelico wrote: >> >> Copy and paste your actual code, don't re-type it :) > > This is as far as I have gotten. THis is all my code and it has been copied > and pasted. Thats why I am posting here. I k

Re: Homework help requested (not what you think!)

2013-07-17 Thread Aseem Bansal
On Wednesday, July 17, 2013 4:13:45 AM UTC+5:30, John Ladasky wrote: > Hi folks, > > > > No, I'm not asking for YOU to help ME with a Python homework assignment! > > > > Previously, I mentioned that I was starting to teach my son Python. > > > > https://groups.google.com/d/msg/comp.lang.

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/18/2013 12:38 AM, fronag...@gmail.com wrote: On Thursday, July 18, 2013 9:07:24 AM UTC+8, Dave Angel wrote: On 07/17/2013 08:44 PM, fronag...@gmail.com wrote: On Thursday, July 18, 2013 1:38:34 AM UTC+8, Dave Angel wrote: On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: On Wednesday,

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 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 wil

Why on CentOS, python consumes too much memory ?

2013-07-17 Thread snowingbear
Hi: Previously, we found that our python scripts consume too much memory. So I use python's resource module to restrict RLIMIT_AS's soft limit and hard limit to 200M. On my RHEL5.3(i386)+python2.6.2, it works OK. But on CentOS 6.2(x86_64)+python2.6.6, it reports memory error(exceeding 200M).

Re: tkinter redraw rates

2013-07-17 Thread fronagzen
On Thursday, July 18, 2013 9:07:24 AM UTC+8, Dave Angel wrote: > On 07/17/2013 08:44 PM, fronag...@gmail.com wrote: > > On Thursday, July 18, 2013 1:38:34 AM UTC+8, Dave Angel wrote: > >> On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: > >>> On Wednesday, July 17, 2013 7:42:45 PM UTC+8, Dave Ang

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 devel

Re: Need help with network script

2013-07-17 Thread bbechdol
> In addition to reposting using copy/paste, please specify the Python > > version. There were differences between 2.6 and 2.7. > > > > Short answer is that subprocess.call() returns an integral returncode. > > So zero tells you that shelling to the subprocess succeeded. > > > > Perhaps

Re: Homework help requested (not what you think!)

2013-07-17 Thread alex23
On 17/07/2013 11:29 PM, Chris Angelico wrote: On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti wrote: Markov chains are an advanced technique you could introduce, but you'd need a huge list of names broken into syllables from somewhere. You could use names broken into letters... or skip the not

Re: Python HTTP POST

2013-07-17 Thread alex23
On 18/07/2013 4:49 AM, Matt Graves wrote: How would I submit a python HTTP POST request to... for example, go to google.com, enter "Pie" into the search box and submit (Search) Other replies have suggested how you could do it by building the request yourself. Another approach is to interact d

Re: Need help with network script

2013-07-17 Thread Dave Angel
On 07/17/2013 09:50 PM, Chris Angelico wrote: On Thu, Jul 18, 2013 at 11:44 AM, wrote: Hi everyone. I am starting to learn python and I decided to start with what I though was a simple script but I guess now. All I want to do is return what current network location I am using on my mac. Ever

Re: Need help with network script

2013-07-17 Thread bbechdol
Im trying to get the output from "scselect" and display it on a new line. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with network script

2013-07-17 Thread bbechdol
On Wednesday, July 17, 2013 7:50:44 PM UTC-6, Chris Angelico wrote: > On Thu, Jul 18, 2013 at 11:44 AM, > > > Hi everyone. I am starting to learn python and I decided to start with what > > I though was a simple script but I guess now. All I want to do is return > > what current network locatio

Re: Need help with network script

2013-07-17 Thread Chris Angelico
On Thu, Jul 18, 2013 at 11:44 AM, wrote: > Hi everyone. I am starting to learn python and I decided to start with what I > though was a simple script but I guess now. All I want to do is return what > current network location I am using on my mac. Every time I run it, it gives > me back a 0. I

Need help with network script

2013-07-17 Thread bbechdol
Hi everyone. I am starting to learn python and I decided to start with what I though was a simple script but I guess now. All I want to do is return what current network location I am using on my mac. Every time I run it, it gives me back a 0. I don't know what I am doing wrong so here is my cod

Re: Python-list Digest, Vol 118, Issue 144

2013-07-17 Thread Ben Last
> From: Gregory Ewing > To: python-list@python.org > Is 'dash' the same as 'literal("-")'? > Yes, it's a convenience method, like 'dot' and 'underscore'. The code I pasted is from the unit tests, where I use the different methods to push coverage up. > Is there any difference between 'then' and

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/17/2013 08:44 PM, fronag...@gmail.com wrote: On Thursday, July 18, 2013 1:38:34 AM UTC+8, Dave Angel wrote: On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 7:42:45 PM UTC+8, Dave Angel wrote: On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: On Wednesday,

Re: tkinter redraw rates

2013-07-17 Thread fronagzen
On Thursday, July 18, 2013 1:38:34 AM UTC+8, Dave Angel wrote: > On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: > > On Wednesday, July 17, 2013 7:42:45 PM UTC+8, Dave Angel wrote: > >> On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: > >>> On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave An

Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-17 Thread CTSB01
I've been puzzling over how to get a certain function working in Python. The function, takes positive integers to other positive integers as follows: Phi_m(n2) = Phi_m(m*n + r) = m*x[n1] + r*(x[n1 + 1] - x[n1]) The above terms are all integer valued and are defined as follows: n2 = the

Re: grimace: a fluent regular expression generator in Python

2013-07-17 Thread Gregory Ewing
Ben Last wrote: north_american_number_re = (RE().start .literal('(').followed_by.__exactly(3).digits.then.__literal(')') .then.one.literal("-").then.__exactly(3).digits .then.one.dash.followed_by.__exactly(4).digits.then.end

Re: tkinter redraw rates

2013-07-17 Thread Michael Torrie
On 07/17/2013 05:08 AM, fronag...@gmail.com wrote: > Ok. Well, what I'm currently doing, based on advice from this thread, > is to create a new thread that handles the downloading, as well as > updating a variable for text display on the GUI, and in the main > thread, just after the thread is creat

Re: [ANN] bbfreeze 1.1.2

2013-07-17 Thread Fábio Santos
On 17 Jul 2013 21:46, "Ralf Schmitt" wrote: > bbfreeze will not > work with python 3 or higher. > > > -- > Cheers > Ralf Seems like it has awesome features, but py3k is really important to me. Is this on your roadmap? -- http://mail.python.org/mailman/listinfo/python-list

[ANN] bbfreeze 1.1.2

2013-07-17 Thread Ralf Schmitt
Hi, I've just released bbfreeze 1.1.2. The code is available from pypi https://pypi.python.org/pypi/bbfreeze/ or from github https://github.com/schmir/bbfreeze bbfreeze creates stand-alone executables from python scripts. It's similar in purpose to the well known py2exe for windows, py2ap

Re: Python HTTP POST

2013-07-17 Thread Joel Goldstick
On Wed, Jul 17, 2013 at 4:15 PM, John Gordon wrote: > In <00ec2f9b-fcae-428c-8932-163e653dd...@googlegroups.com> Matt Graves < > tunacu...@gmail.com> writes: > > > How would I submit a python HTTP POST request to... for example, go to > > google.com, enter "Pie" into the search box and submit (Se

Re: Python HTTP POST

2013-07-17 Thread John Gordon
In <00ec2f9b-fcae-428c-8932-163e653dd...@googlegroups.com> Matt Graves writes: > How would I submit a python HTTP POST request to... for example, go to > google.com, enter "Pie" into the search box and submit (Search) Something like this: import urllib import urllib2 # the google form search

Re: Storing a very large number

2013-07-17 Thread Ian Kelly
On Wed, Jul 17, 2013 at 1:21 PM, Hasit Mistry wrote: > I came across a problem that requires me to store a very large number (say >>10^100). How do I do it efficiently? Both the int and Decimal types support arbitrary precision. Floats do not. > And also, how do I select a particular number (sa

Re: Storing a very large number

2013-07-17 Thread Gary Herron
On 07/17/2013 12:21 PM, Hasit Mistry wrote: I came across a problem that requires me to store a very large number (say >10^100). How do I do it efficiently? And also, how do I select a particular number (say 209th) from that very large number? I am relatively new to Python. Thank you in advanc

Re: Storing a very large number

2013-07-17 Thread Grant Edwards
On 2013-07-17, Hasit Mistry wrote: > I came across a problem that requires me to store a very large number > (say >10^100). How do I do it efficiently? First you must define "efficient". If you want to store the least number of bytes, and all you need to do is store the number (you don't need t

Re: [ANN]:JSONStream

2013-07-17 Thread Fábio Santos
On 17 Jul 2013 20:40, "Sol Toure" wrote: > > I didn't look into using YAML processor. > Also that would have required pre-processing the data to add the separators. > With this method you don't need the separators. You can have 0 or more white space between objects: > > for obj in JSONStream(Strin

Storing a very large number

2013-07-17 Thread Hasit Mistry
I came across a problem that requires me to store a very large number (say >10^100). How do I do it efficiently? And also, how do I select a particular number (say 209th) from that very large number? I am relatively new to Python. Thank you in advance. -- http://mail.python.org/mailman/listinf

Re: [ANN]:JSONStream

2013-07-17 Thread Sol Toure
I didn't look into using YAML processor. Also that would have required pre-processing the data to add the separators. With this method you don't need the separators. You can have 0 or more white space between objects: for obj in JSONStream(StringIO('''{"one":1}{"two":2}{"three":3} 4 {"five": 5

Python HTTP POST

2013-07-17 Thread Matt Graves
I am going to be creating a python script that will make filling in information at my job easier. I have all of the information I need... I guess I just need to see it in practice to fully grasp it. How would I submit a python HTTP POST request to... for example, go to google.com, enter "Pie"

Re: tkinter redraw rates

2013-07-17 Thread Peter Otten
fronag...@gmail.com wrote: > Hm. My apologies for not being very clear. What I'm doing is this: > > self.loader_thread = Thread(target=self.loadpages, > name="loader_thread") > self.loader_thread.start() > while self.loader_thread.isAliv

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/17/2013 09:18 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 7:42:45 PM UTC+8, Dave Angel wrote: On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave Angel wrote: On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: Noted on the

Re: [ANN]:JSONStream

2013-07-17 Thread Clark C. Evans
Looks interesting. In YAML we used three dashes as the "stream separator". So already a YAML processor could handle a JSON stream ... >>> for doc in yaml.load_all(""" ... --- {"one": "value"} ... --- {"two": "another"} ... --- ... {"three": "a third item in the stream", ... "with": "more

Re: grimace: a fluent regular expression generator in Python

2013-07-17 Thread Roy Smith
In article , "Anders J. Munch" <2...@jmunch.dk> wrote: > The problem with Perl-style regexp notation isn't so much that it's terse - > it's > that the syntax is irregular (sic) and doesn't follow modern principles for > lexical structure in computer languages. There seem to be three basic way

Re: Homework help requested (not what you think!)

2013-07-17 Thread Chris Angelico
On Wed, Jul 17, 2013 at 11:55 PM, Neil Cerutti wrote: > On 2013-07-17, Chris Angelico wrote: >> On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti wrote: >>> Markov chains are an advanced technique you could introduce, but >>> you'd need a huge list of names broken into syllables from >>> somewhere.

Re: Homework help requested (not what you think!)

2013-07-17 Thread Neil Cerutti
On 2013-07-17, Chris Angelico wrote: > On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti wrote: >> Markov chains are an advanced technique you could introduce, but >> you'd need a huge list of names broken into syllables from >> somewhere. > > You could use names broken into letters... or skip the n

Re: Homework help requested (not what you think!)

2013-07-17 Thread Chris Angelico
On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti wrote: > Markov chains are an advanced technique you could introduce, but > you'd need a huge list of names broken into syllables from > somewhere. You could use names broken into letters... or skip the notion of names and just generate words. Lists

Re: Homework help requested (not what you think!)

2013-07-17 Thread Neil Cerutti
On 2013-07-16, John Ladasky wrote: > So, what I am seeking are suggestions for programming > assignments that I can give to brand-new students of Python. > Please keep in mind that none of them are even up to the task > of a simple algorithm like Bubble Sort -- at least, not yet. One of the first

Re: tkinter redraw rates

2013-07-17 Thread fronagzen
On Wednesday, July 17, 2013 7:42:45 PM UTC+8, Dave Angel wrote: > On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: > > On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave Angel wrote: > >> On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: > >>> Noted on the quoting thing. > >>> Regarding the thre

Re: grimace: a fluent regular expression generator in Python

2013-07-17 Thread Johann Hibschman
Ben Last writes: > Good points. I wanted to find a syntax that allows comments as well as > being fluent: > RE() > .any_number_of.digits # Recall that any_number_of includes zero > .followed_by.an_optional.dot.then.at_least_one.digit # The dot is > specifically optional > # but we must have one

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/17/2013 07:10 AM, fronag...@gmail.com wrote: On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave Angel wrote: On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: Noted on the quoting thing. Regarding the threading, well, first, I'm not so much a programmer as someone who knows a bit of ho

Re: tkinter redraw rates

2013-07-17 Thread fronagzen
On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave Angel wrote: > On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: > > > Noted on the quoting thing. > > Regarding the threading, well, first, I'm not so much a programmer as > > someone who knows a bit of how to program. > > And it seems that the

Re: grimace: a fluent regular expression generator in Python

2013-07-17 Thread Ben Last
On 16 July 2013 20:48, wrote: > From: "Anders J. Munch" <2...@jmunch.dk> > Date: Tue, 16 Jul 2013 13:38:35 +0200 > Ben Last wrote: > >> north_american_number_re = (RE().start >> .literal('(').followed_by.**exactly(3).digits.then.**literal(')') >> .then.one.lit

Re: tkinter redraw rates

2013-07-17 Thread fronagzen
On Wednesday, July 17, 2013 6:07:22 PM UTC+8, Dave Angel wrote: > On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: > > > Noted on the quoting thing. > > > > > > Regarding the threading, well, first, I'm not so much a programmer as > > someone who knows a bit of how to program. > > > > > > A

Re: tkinter redraw rates

2013-07-17 Thread Dave Angel
On 07/16/2013 11:04 PM, fronag...@gmail.com wrote: Noted on the quoting thing. Regarding the threading, well, first, I'm not so much a programmer as someone who knows a bit of how to program. And it seems that the only way to update a tkinter window is to use the .update() method, which is wh

Re: Homework help requested (not what you think!)

2013-07-17 Thread PythonAB
On 17 jul 2013, at 08:35, alex23 wrote: > On 17/07/2013 8:43 AM, John Ladasky wrote: >> The kids all claim to be interested. They all want to write the next great >> 3D video game. Thus, I'm a little surprised that the kids don't actually >> try to sit down and code without me prompting them.

Re: Homework help requested (not what you think!)

2013-07-17 Thread Joshua Landau
On 16 July 2013 23:43, John Ladasky wrote: > > Well, a few other parents caught wind of what I was doing with my son, and > they asked me whether I could tutor their kids, too. I accepted the jobs > (for pay, actually). > > The kids all claim to be interested. They all want to write the next g

Re: help on python regular expression named group

2013-07-17 Thread wxjmfauth
Le mercredi 17 juillet 2013 09:46:46 UTC+2, Joshua Landau a écrit : > On 17 July 2013 07:15, wrote: > > > Not sure, I'm correct. I took you precise string to > > > refresh my memory. > > > > I'm glad to see you doing something else, but I don't think you > > understood his problem. Note tha

Re: help on python regular expression named group

2013-07-17 Thread Joshua Landau
On 17 July 2013 07:15, wrote: > Not sure, I'm correct. I took you precise string to > refresh my memory. I'm glad to see you doing something else, but I don't think you understood his problem. Note that his problem has not solution, which a few seconds of Googling has confirmed to me. -- http:/