From orsenthil at gmail.com Fri Apr 1 04:14:16 2011 From: orsenthil at gmail.com (Senthil Kumaran) Date: Fri, 1 Apr 2011 10:14:16 +0800 Subject: [BangPypers] A python3 discussion Message-ID: <20110401021416.GA2899@kevin> http://programmers.stackexchange.com/questions/63859/why-do-people-hesitate-using-python-3/63935#63935 I think, Baiju (and others ) may feel good about Nick Coghlan's reference getpython3.net project! :) -- Senthil From santrajan at gmail.com Fri Apr 1 04:46:33 2011 From: santrajan at gmail.com (Santosh Rajan) Date: Fri, 1 Apr 2011 08:16:33 +0530 Subject: [BangPypers] A python3 discussion In-Reply-To: <20110401021416.GA2899@kevin> References: <20110401021416.GA2899@kevin> Message-ID: Yes indeed! getpython3.net is a good piece of work. Keep up the good work. On Fri, Apr 1, 2011 at 7:44 AM, Senthil Kumaran wrote: > > > http://programmers.stackexchange.com/questions/63859/why-do-people-hesitate-using-python-3/63935#63935 > > I think, Baiju (and others ) may feel good about Nick Coghlan's > reference getpython3.net project! :) > > -- > Senthil > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- http://about.me/santosh.rajan ?The *young man* knows the rules but the *old man* knows the exceptions?. *Oliver Wendell Holmes* From noufal at gmail.com Fri Apr 1 14:47:47 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 01 Apr 2011 18:17:47 +0530 Subject: [BangPypers] Nice "feature" Message-ID: <87pqp6gmto.fsf@gmail.com> Came across this at PyCon. Comments? >>> foo = (1,[2,3,4]) >>> foo[1] += [6] Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' object does not support item assignment >>> foo (1, [2, 3, 4, 6]) >>> -- From navin.kabra at gmail.com Fri Apr 1 14:55:03 2011 From: navin.kabra at gmail.com (Navin Kabra) Date: Fri, 1 Apr 2011 18:25:03 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: <87pqp6gmto.fsf@gmail.com> References: <87pqp6gmto.fsf@gmail.com> Message-ID: With Python 2.6.5 (on ubuntu) I get even more bizarre behavior: >>> foo=(1,[2,3,4]) >>> foo[1]+=6 Traceback (most recent call last): File "", line 1, in TypeError: 'int' object is not iterable >>> foo (1, [8, 9, 10]) On Fri, Apr 1, 2011 at 6:17 PM, Noufal Ibrahim wrote: > > Came across this at PyCon. Comments? > > >>> foo = (1,[2,3,4]) > >>> foo[1] += [6] > Traceback (most recent call last): > File "", line 1, in > TypeError: 'tuple' object does not support item assignment > >>> foo > (1, [2, 3, 4, 6]) > >>> > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From b.ghose at gmail.com Fri Apr 1 15:08:56 2011 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Fri, 1 Apr 2011 18:38:56 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: <87pqp6gmto.fsf@gmail.com> References: <87pqp6gmto.fsf@gmail.com> Message-ID: On Fri, Apr 1, 2011 at 6:17 PM, Noufal Ibrahim wrote: > Came across this at PyCon. Comments? > >>>> foo = (1,[2,3,4]) >>>> foo[1] += [6] > Traceback (most recent call last): > ?File "", line 1, in > TypeError: 'tuple' object does not support item assignment >>>> foo > (1, [2, 3, 4, 6]) Even nicer this way - >>> foo = (1, [2, 3, 4]) >>> foo[1].append(5) >>> foo (1, [2, 3, 4, 5]) >>> foo[1].append(6) >>> foo (1, [2, 3, 4, 5, 6]) Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From hussainbohra_30 at yahoo.com Fri Apr 1 15:14:04 2011 From: hussainbohra_30 at yahoo.com (Hussain Bohra) Date: Fri, 1 Apr 2011 06:14:04 -0700 (PDT) Subject: [BangPypers] Nice "feature" In-Reply-To: References: <87pqp6gmto.fsf@gmail.com> Message-ID: <227376.83152.qm@web114707.mail.gq1.yahoo.com> Atleast on changing list, you gets an exception. On updating dictionary living inside tuple wont throw an exception as well. >>> foo = (1,[2,3,4], {'a':1}) >>> foo[2].update({'b':2}) >>> foo (1, [2, 3, 4], {'a': 1, 'b': 2}) >>> Both python 2.6 and 3.1 behaves in?the?same way. ? Thanks and Regards, Hussain Bohra Tavant Technologies, Bangalore-95 mail-to:hussain.bohra at tavant.com mobile : +91 99867 95727 ________________________________ From: Navin Kabra To: Bangalore Python Users Group - India Sent: Fri, 1 April, 2011 6:25:03 PM Subject: Re: [BangPypers] Nice "feature" With Python 2.6.5 (on ubuntu) I get even more bizarre behavior: >>> foo=(1,[2,3,4]) >>> foo[1]+=6 Traceback (most recent call last): ? File "", line 1, in TypeError: 'int' object is not iterable >>> foo (1, [8, 9, 10]) On Fri, Apr 1, 2011 at 6:17 PM, Noufal Ibrahim wrote: > > Came across this at PyCon. Comments? > > >>> foo = (1,[2,3,4]) > >>> foo[1] += [6] > Traceback (most recent call last): >? File "", line 1, in > TypeError: 'tuple' object does not support item assignment > >>> foo > (1, [2, 3, 4, 6]) > >>> > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From rmathews at gmail.com Fri Apr 1 15:21:07 2011 From: rmathews at gmail.com (Roshan Mathews) Date: Fri, 1 Apr 2011 18:51:07 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: References: <87pqp6gmto.fsf@gmail.com> Message-ID: On Fri, Apr 1, 2011 at 18:25, Navin Kabra wrote: > With Python 2.6.5 (on ubuntu) I get even more bizarre behavior: >>>> foo=(1,[2,3,4]) >>>> foo[1]+=6 > Traceback (most recent call last): > ?File "", line 1, in > TypeError: 'int' object is not iterable >>>> foo > (1, [8, 9, 10]) > Couldn't reproduce this. Noufal's example "worked" though. Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 and Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) on Ubuntu 10.04 -- http://about.me/rosh From rmathews at gmail.com Fri Apr 1 15:24:59 2011 From: rmathews at gmail.com (Roshan Mathews) Date: Fri, 1 Apr 2011 18:54:59 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: <227376.83152.qm@web114707.mail.gq1.yahoo.com> References: <87pqp6gmto.fsf@gmail.com> <227376.83152.qm@web114707.mail.gq1.yahoo.com> Message-ID: On Fri, Apr 1, 2011 at 18:44, Hussain Bohra wrote: > Atleast on changing list, you gets an exception. > > On updating dictionary living inside tuple wont throw an exception as well. > I thought the surprising part was that it threw an exception, not that it updated the list. Even more surprising was that it threw the exception and updated the list too. >>> a, b = 1, [2, 3, 4] >>> foo = (a, b) >>> b += [5] >>> foo (1, [2, 3, 4, 5]) >>> -- http://about.me/rosh From noufal at gmail.com Fri Apr 1 15:28:34 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 01 Apr 2011 18:58:34 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: (Baishampayan Ghose's message of "Fri, 1 Apr 2011 18:38:56 +0530") References: <87pqp6gmto.fsf@gmail.com> Message-ID: <87hbaigkxp.fsf@gmail.com> On Fri, Apr 01 2011, Baishampayan Ghose wrote: [...] >>>> foo = (1, [2, 3, 4]) >>>> foo[1].append(5) >>>> foo > (1, [2, 3, 4, 5]) >>>> foo[1].append(6) >>>> foo > (1, [2, 3, 4, 5, 6]) This is an inplace modification. Does the other one "change" the list in some sense that the tuple gets annoyed? [...] -- From noufal at gmail.com Fri Apr 1 15:29:20 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 01 Apr 2011 18:59:20 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: (Navin Kabra's message of "Fri, 1 Apr 2011 18:25:03 +0530") References: <87pqp6gmto.fsf@gmail.com> Message-ID: <87d3l6gkwf.fsf@gmail.com> On Fri, Apr 01 2011, Navin Kabra wrote: > With Python 2.6.5 (on ubuntu) I get even more bizarre behavior: >>>> foo=(1,[2,3,4]) >>>> foo[1]+=6 Use [6] rather than 6. > Traceback (most recent call last): > File "", line 1, in > TypeError: 'int' object is not iterable >>>> foo > (1, [8, 9, 10]) [...] -- From ruchiryshukla at gmail.com Fri Apr 1 15:30:29 2011 From: ruchiryshukla at gmail.com (Ruchir Shukla) Date: Fri, 1 Apr 2011 19:00:29 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: References: <87pqp6gmto.fsf@gmail.com> <227376.83152.qm@web114707.mail.gq1.yahoo.com> Message-ID: Hello, This is just because you are changing the value of b and in foo there is a reference of b. while in >>> foo = (1,[2,3,4]) >>> foo[1] += [6] Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' object does not support item assignment >>> foo (1, [2, 3, 4, 6]) >>> it is changing the value in List but after that python has realized that the error . On Fri, Apr 1, 2011 at 6:54 PM, Roshan Mathews wrote: > On Fri, Apr 1, 2011 at 18:44, Hussain Bohra > wrote: > > Atleast on changing list, you gets an exception. > > > > On updating dictionary living inside tuple wont throw an exception as > well. > > > I thought the surprising part was that it threw an exception, not that > it updated the list. Even more surprising was that it threw the > exception and updated the list too. > > >>> a, b = 1, [2, 3, 4] > >>> foo = (a, b) > >>> b += [5] > >>> foo > (1, [2, 3, 4, 5]) > >>> > > > > -- > http://about.me/rosh > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ---------------------------- Kind regards Ruchir Shukla Phone: +91 9099020687 ruchiryshukla at gmail.com; Ruchir Shukla From pythonic at gmail.com Fri Apr 1 15:31:45 2011 From: pythonic at gmail.com (Shekhar Tiwatne) Date: Fri, 01 Apr 2011 19:01:45 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: References: <87pqp6gmto.fsf@gmail.com> Message-ID: <4D95D3C1.2070405@gmail.com> On Friday 01 April 2011 06:51 PM, Roshan Mathews wrote: > On Fri, Apr 1, 2011 at 18:25, Navin Kabra wrote: >> With Python 2.6.5 (on ubuntu) I get even more bizarre behavior: >>>>> foo=(1,[2,3,4]) >>>>> foo[1]+=6 foo[1]+6 won't work anyways l = [2,3,4] l+=6 # same error foo[1] += [6] # treated as tuple operatation foo[1].__add__([6]) # works, you know why :) >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: 'int' object is not iterable >>>>> foo >> (1, [8, 9, 10]) >> > Couldn't reproduce this. Noufal's example "worked" though. > > Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit > (Intel)] on win32 > and > Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) on Ubuntu 10.04 > From noufal at gmail.com Fri Apr 1 15:31:57 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 01 Apr 2011 19:01:57 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: (Roshan Mathews's message of "Fri, 1 Apr 2011 18:54:59 +0530") References: <87pqp6gmto.fsf@gmail.com> <227376.83152.qm@web114707.mail.gq1.yahoo.com> Message-ID: <878vvugks2.fsf@gmail.com> On Fri, Apr 01 2011, Roshan Mathews wrote: > On Fri, Apr 1, 2011 at 18:44, Hussain Bohra wrote: >> Atleast on changing list, you gets an exception. >> >> On updating dictionary living inside tuple wont throw an exception as well. >> > I thought the surprising part was that it threw an exception, not that > it updated the list. Even more surprising was that it threw the > exception and updated the list too. [...] Exactly. I don't expect things to change after a single operation if it raises an exception. Leaky abstractions? -- From noufal at gmail.com Fri Apr 1 16:01:56 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 01 Apr 2011 19:31:56 +0530 Subject: [BangPypers] Nice "feature" In-Reply-To: (Ruchir Shukla's message of "Fri, 1 Apr 2011 19:00:29 +0530") References: <87pqp6gmto.fsf@gmail.com> <227376.83152.qm@web114707.mail.gq1.yahoo.com> Message-ID: <87zkoaf4tn.fsf@gmail.com> On Fri, Apr 01 2011, Ruchir Shukla wrote: > Hello, > > This is just because you are changing the value of b and in foo there is a > reference of b. > > while in >>>> foo = (1,[2,3,4]) >>>> foo[1] += [6] > Traceback (most recent call last): > File "", line 1, in > TypeError: 'tuple' object does not support item assignment >>>> foo > (1, [2, 3, 4, 6]) >>>> > it is changing the value in List but after that python has realized that the > error . I like your use of "realized". Sort of like "Oops. I'm sorry I shouldn't have done that but I've half messed things up already". :) I can explain this behaviour just fine. Two operations etc. BG's thing about append can be explained I think with a disassemble. >>> def foo(): ... x = [] ... x += [1] ... >>> def bar(): ... x = [] ... x.append(1) ... >>> dis.dis(foo) 2 0 BUILD_LIST 0 3 STORE_FAST 0 (x) 3 6 LOAD_FAST 0 (x) 9 LOAD_CONST 1 (1) 12 BUILD_LIST 1 15 INPLACE_ADD 16 STORE_FAST 0 (x) 19 LOAD_CONST 0 (None) 22 RETURN_VALUE >>> dis.dis(bar) 2 0 BUILD_LIST 0 3 STORE_FAST 0 (x) 3 6 LOAD_FAST 0 (x) 9 LOAD_ATTR 0 (append) 12 LOAD_CONST 1 (1) 15 CALL_FUNCTION 1 18 POP_TOP 19 LOAD_CONST 0 (None) 22 RETURN_VALUE With `foo`, I think either STORE_FAST will alter an element of the tuple so it will die but by the time INPLACE_ADD has already taken place so the list has been modified. Would anyone here characterise this as a bug? [...] -- From orsenthil at gmail.com Fri Apr 1 17:38:58 2011 From: orsenthil at gmail.com (Senthil Kumaran) Date: Fri, 1 Apr 2011 23:38:58 +0800 Subject: [BangPypers] Nice "feature" In-Reply-To: <87zkoaf4tn.fsf@gmail.com> References: <87pqp6gmto.fsf@gmail.com> <227376.83152.qm@web114707.mail.gq1.yahoo.com> <87zkoaf4tn.fsf@gmail.com> Message-ID: <20110401153858.GB2656@kevin> On Fri, Apr 01, 2011 at 07:31:56PM +0530, Noufal Ibrahim wrote: > Would anyone here characterise this as a bug? http://bugs.python.org/issue11562 -- Senthil From noufal at gmail.com Sat Apr 2 08:13:20 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Sat, 02 Apr 2011 11:43:20 +0530 Subject: [BangPypers] User group meeting Message-ID: <87k4fdi3jz.fsf@gmail.com> Shouldn't we have one of these? It's been too long. Anyone here have a fun project they want to talk about? -- From admin.nitjece at gmail.com Sun Apr 3 20:08:21 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Sun, 3 Apr 2011 23:38:21 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <87k4fdi3jz.fsf@gmail.com> References: <87k4fdi3jz.fsf@gmail.com> Message-ID: I could have talked about a new open source project that we just kickstarted, Open Mangrove. But, unfortunately I will be out of town. The project homepage is here: http://mangroveorg.github.com/ On Sat, Apr 2, 2011 at 11:43 AM, Noufal Ibrahim wrote: > > Shouldn't we have one of these? It's been too long. Anyone here have a > fun project they want to talk about? > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From noufal at gmail.com Mon Apr 4 06:47:50 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 04 Apr 2011 10:17:50 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Diptanu Choudhury's message of "Sun, 3 Apr 2011 23:38:21 +0530") References: <87k4fdi3jz.fsf@gmail.com> Message-ID: <87sjtybp1l.fsf@gmail.com> On Sun, Apr 03 2011, Diptanu Choudhury wrote: > I could have talked about a new open source project that we just > kickstarted, Open Mangrove. But, unfortunately I will be out of town. > > The project homepage is here: http://mangroveorg.github.com/ [...] When will you be back? -- From noufal at gmail.com Mon Apr 4 06:49:53 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 04 Apr 2011 10:19:53 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Diptanu Choudhury's message of "Sun, 3 Apr 2011 23:38:21 +0530") References: <87k4fdi3jz.fsf@gmail.com> Message-ID: <87mxk6boy6.fsf@gmail.com> On Sun, Apr 03 2011, Diptanu Choudhury wrote: > I could have talked about a new open source project that we just > kickstarted, Open Mangrove. But, unfortunately I will be out of town. > > The project homepage is here: http://mangroveorg.github.com/ [...] What by the way is mangrove? It's a bit of a fail for the docs and website if I can't figure that out in 5 minutes. :) -- From orsenthil at gmail.com Mon Apr 4 06:54:36 2011 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 4 Apr 2011 12:54:36 +0800 Subject: [BangPypers] User group meeting In-Reply-To: <87mxk6boy6.fsf@gmail.com> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> Message-ID: <20110404045436.GA6873@kevin> On Mon, Apr 04, 2011 at 10:19:53AM +0530, Noufal Ibrahim wrote: > What by the way is mangrove? It's a bit of a fail for the docs and > website if I can't figure that out in 5 minutes. :) Yes true. Looks like a data (large data-set) analysis tool with couchdb backend. -- Senthil From santrajan at gmail.com Mon Apr 4 07:13:34 2011 From: santrajan at gmail.com (Santosh Rajan) Date: Mon, 4 Apr 2011 10:43:34 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <20110404045436.GA6873@kevin> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: Looks like a solution looking for a problem, rather than a problem looking for a solution. On Mon, Apr 4, 2011 at 10:24 AM, Senthil Kumaran wrote: > On Mon, Apr 04, 2011 at 10:19:53AM +0530, Noufal Ibrahim wrote: > > What by the way is mangrove? It's a bit of a fail for the docs and > > website if I can't figure that out in 5 minutes. :) > > Yes true. Looks like a data (large data-set) analysis tool with couchdb > backend. > > -- > Senthil > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- http://about.me/santosh.rajan ?The *young man* knows the rules but the *old man* knows the exceptions?. *Oliver Wendell Holmes* From rajeev.sebastian at gmail.com Mon Apr 4 07:31:19 2011 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Mon, 4 Apr 2011 11:01:19 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: Looks like a triple store, without the triples or the sparql ... Regards Rajeev J Sebastian On Mon, Apr 4, 2011 at 10:43 AM, Santosh Rajan wrote: > Looks like a solution looking for a problem, rather than a problem looking > for a solution. > > On Mon, Apr 4, 2011 at 10:24 AM, Senthil Kumaran wrote: > >> On Mon, Apr 04, 2011 at 10:19:53AM +0530, Noufal Ibrahim wrote: >> > What by the way is mangrove? It's a bit of a fail for the docs and >> > website if I can't figure that out in 5 minutes. :) >> >> Yes true. ?Looks like a data (large data-set) analysis tool with couchdb >> backend. >> >> -- >> Senthil >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > http://about.me/santosh.rajan > > ?The *young man* knows the rules but the *old man* knows the > exceptions?. *Oliver > Wendell Holmes* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From steve at lonetwin.net Mon Apr 4 11:16:44 2011 From: steve at lonetwin.net (steve) Date: Mon, 04 Apr 2011 14:46:44 +0530 Subject: [BangPypers] ZODB in the browser ! ..and yes it's a April fool's day joke ..ehe, wait a sec ! Message-ID: <4D998C7C.5050503@lonetwin.net> Hello, Some people are crazier than their ideas :) ..case in point: http://davisagli.com/blog/the-making-of-zodb.ws Excerpt: On April 1st Matthew Wilkes and I announced the launch of ZODB Webscale Edition, which runs the ZODB in a Javascript-based Python interpreter backed by HTML localstorage. It was of course in honor of April Fool's day, as the entire concept of running the ZODB in a browser is a bit silly, but the technology actually works. Here's how we did it. For those of you who are new to it, ZODB was the best NoSQL DB out there long before the term NoSQL was invented. cheers, - steve -- random spiel: http://lonetwin.net/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From admin.nitjece at gmail.com Mon Apr 4 12:22:21 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Mon, 4 Apr 2011 15:52:21 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: Sorry guys, for not giving enough information in my previous mail. And apologies for not setting up the project description in the docs yet. Mangrove is framework for mobile-data-collection/mobile-service-delivery. The target group of users are organizations(especially NGO's) who want to collect data in the field. With Mangrove users would be able to create forms and can configure the data type of the fields of the form. And the forms could be served to the data collectors using either SMS or Xforms(we will use something like Open Data Kit to render the xofrms). And the organizations can run analytics and dig up the information from the data collected in the field. The tech-stack - - Python - Django - Couchdb with CouchDB-Python - Xforms - OpenDataKit/OpenXData - Vumi(github.com/praekelt/vumi/) for transport layer - FreeSwitch for IVR integration It's an open-source project(I am not sure about the license though). It will take another four-five months before we are ready for production. On Mon, Apr 4, 2011 at 11:01 AM, Rajeev J Sebastian < rajeev.sebastian at gmail.com> wrote: > Looks like a triple store, without the triples or the sparql ... > > Regards > Rajeev J Sebastian > > On Mon, Apr 4, 2011 at 10:43 AM, Santosh Rajan > wrote: > > Looks like a solution looking for a problem, rather than a problem > looking > > for a solution. > > > > On Mon, Apr 4, 2011 at 10:24 AM, Senthil Kumaran >wrote: > > > >> On Mon, Apr 04, 2011 at 10:19:53AM +0530, Noufal Ibrahim wrote: > >> > What by the way is mangrove? It's a bit of a fail for the docs and > >> > website if I can't figure that out in 5 minutes. :) > >> > >> Yes true. Looks like a data (large data-set) analysis tool with couchdb > >> backend. > >> > >> -- > >> Senthil > >> _______________________________________________ > >> BangPypers mailing list > >> BangPypers at python.org > >> http://mail.python.org/mailman/listinfo/bangpypers > >> > > > > > > > > -- > > http://about.me/santosh.rajan > > > > ?The *young man* knows the rules but the *old man* knows the > > exceptions?. *Oliver > > Wendell Holmes* > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From lawgon at gmail.com Mon Apr 4 12:40:45 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Mon, 04 Apr 2011 16:10:45 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: <1301913645.2254.233.camel@localhost> On Mon, 2011-04-04 at 15:52 +0530, Diptanu Choudhury wrote: > It's an open-source project(I am not sure about the license though). > It will > take another four-five months before we are ready for production. url for the code? -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From santrajan at gmail.com Mon Apr 4 13:30:04 2011 From: santrajan at gmail.com (Santosh Rajan) Date: Mon, 4 Apr 2011 17:00:04 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: Ah, thanks for clarifying. You are solving a client side problem. Nothing to do with the server side per se. I mean, instead of Django/Python/CouchDB you could just as well have used Rails/Ruby/MongoDB or expressjs/nodejs/Javascript/redis. Is there any reason why you chose couchDB? Why not Redis? It is much faster and RAM is cheap nowadays. On Mon, Apr 4, 2011 at 3:52 PM, Diptanu Choudhury wrote: > Sorry guys, for not giving enough information in my previous mail. And > apologies for not setting up the project description in the docs yet. > > Mangrove is framework for mobile-data-collection/mobile-service-delivery. > The target group of users are organizations(especially NGO's) who want to > collect data in the field. With Mangrove users would be able to create > forms > and can configure the data type of the fields of the form. And the forms > could be served to the data collectors using either SMS or Xforms(we will > use something like Open Data Kit to render the xofrms). > And the organizations can run analytics and dig up the information from the > data collected in the field. > > The tech-stack - > - Python > - Django > - Couchdb with CouchDB-Python > - Xforms > - OpenDataKit/OpenXData > - Vumi(github.com/praekelt/vumi/) for transport layer > - FreeSwitch for IVR integration > > It's an open-source project(I am not sure about the license though). It > will > take another four-five months before we are ready for production. > > On Mon, Apr 4, 2011 at 11:01 AM, Rajeev J Sebastian < > rajeev.sebastian at gmail.com> wrote: > > > Looks like a triple store, without the triples or the sparql ... > > > > Regards > > Rajeev J Sebastian > > > > On Mon, Apr 4, 2011 at 10:43 AM, Santosh Rajan > > wrote: > > > Looks like a solution looking for a problem, rather than a problem > > looking > > > for a solution. > > > > > > On Mon, Apr 4, 2011 at 10:24 AM, Senthil Kumaran > >wrote: > > > > > >> On Mon, Apr 04, 2011 at 10:19:53AM +0530, Noufal Ibrahim wrote: > > >> > What by the way is mangrove? It's a bit of a fail for the docs and > > >> > website if I can't figure that out in 5 minutes. :) > > >> > > >> Yes true. Looks like a data (large data-set) analysis tool with > couchdb > > >> backend. > > >> > > >> -- > > >> Senthil > > >> _______________________________________________ > > >> BangPypers mailing list > > >> BangPypers at python.org > > >> http://mail.python.org/mailman/listinfo/bangpypers > > >> > > > > > > > > > > > > -- > > > http://about.me/santosh.rajan > > > > > > ?The *young man* knows the rules but the *old man* knows the > > > exceptions?. *Oliver > > > Wendell Holmes* > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Thanks, > Diptanu Choudhury > Mobile - +919686602153 > Web - www.linkedin.com/in/diptanu > Twitter - @diptanu > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- http://about.me/santosh.rajan ?The *young man* knows the rules but the *old man* knows the exceptions?. *Oliver Wendell Holmes* From admin.nitjece at gmail.com Mon Apr 4 13:39:08 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Mon, 4 Apr 2011 17:09:08 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <1301913645.2254.233.camel@localhost> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <1301913645.2254.233.camel@localhost> Message-ID: Kenneth, The source code is here: https://github.com/mangroveorg/mangrove and here: https://github.com/diptanu/datastore There are a couple of different pieces to the framework(More information on the docs hosted in RTD) - * DataStore * DataDictionary * Transports We are working on the DataStore for now. On Mon, Apr 4, 2011 at 4:10 PM, Kenneth Gonsalves wrote: > On Mon, 2011-04-04 at 15:52 +0530, Diptanu Choudhury wrote: > > It's an open-source project(I am not sure about the license though). > > It will > > take another four-five months before we are ready for production. > > url for the code? > -- > regards > Kenneth Gonsalves > http://lawgon.livejournal.com/ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From admin.nitjece at gmail.com Mon Apr 4 13:49:16 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Mon, 4 Apr 2011 17:19:16 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: Hi Santosh, Yes, we are trying to solve a problem related to data collection. The reasons why we pushed for Couch was - * Map-Reduce seemed to be an excellent tool for aggregation of data. * We wanted the master-master replication of Couch because apps built on Mangove would see a lot of ad-hoc deployments(mostly in rural Africa and India with low connectivity) and we would like to have the data replicated to the organizations data center as soon as the remote nodes comes live. And i don't have enough experience in Redis to answer whether going with Redis would have been a better option. And Python was our first choice because people who has worked in this domain has the opinion that it is easier for average programmers to learn Python than Ruby. And ultimately Mangrove has to be supported by tech people running the operations in the field. On Mon, Apr 4, 2011 at 5:00 PM, Santosh Rajan wrote: > Ah, thanks for clarifying. You are solving a client side problem. Nothing > to > do with the server side per se. I mean, instead of Django/Python/CouchDB > you > could just as well have used Rails/Ruby/MongoDB or > expressjs/nodejs/Javascript/redis. > > Is there any reason why you chose couchDB? Why not Redis? It is much faster > and RAM is cheap nowadays. > > On Mon, Apr 4, 2011 at 3:52 PM, Diptanu Choudhury > wrote: > > > Sorry guys, for not giving enough information in my previous mail. And > > apologies for not setting up the project description in the docs yet. > > > > Mangrove is framework for mobile-data-collection/mobile-service-delivery. > > The target group of users are organizations(especially NGO's) who want to > > collect data in the field. With Mangrove users would be able to create > > forms > > and can configure the data type of the fields of the form. And the forms > > could be served to the data collectors using either SMS or Xforms(we will > > use something like Open Data Kit to render the xofrms). > > And the organizations can run analytics and dig up the information from > the > > data collected in the field. > > > > The tech-stack - > > - Python > > - Django > > - Couchdb with CouchDB-Python > > - Xforms > > - OpenDataKit/OpenXData > > - Vumi(github.com/praekelt/vumi/) for transport layer > > - FreeSwitch for IVR integration > > > > It's an open-source project(I am not sure about the license though). It > > will > > take another four-five months before we are ready for production. > > > > On Mon, Apr 4, 2011 at 11:01 AM, Rajeev J Sebastian < > > rajeev.sebastian at gmail.com> wrote: > > > > > Looks like a triple store, without the triples or the sparql ... > > > > > > Regards > > > Rajeev J Sebastian > > > > > > On Mon, Apr 4, 2011 at 10:43 AM, Santosh Rajan > > > wrote: > > > > Looks like a solution looking for a problem, rather than a problem > > > looking > > > > for a solution. > > > > > > > > On Mon, Apr 4, 2011 at 10:24 AM, Senthil Kumaran < > orsenthil at gmail.com > > > >wrote: > > > > > > > >> On Mon, Apr 04, 2011 at 10:19:53AM +0530, Noufal Ibrahim wrote: > > > >> > What by the way is mangrove? It's a bit of a fail for the docs and > > > >> > website if I can't figure that out in 5 minutes. :) > > > >> > > > >> Yes true. Looks like a data (large data-set) analysis tool with > > couchdb > > > >> backend. > > > >> > > > >> -- > > > >> Senthil > > > >> _______________________________________________ > > > >> BangPypers mailing list > > > >> BangPypers at python.org > > > >> http://mail.python.org/mailman/listinfo/bangpypers > > > >> > > > > > > > > > > > > > > > > -- > > > > http://about.me/santosh.rajan > > > > > > > > ?The *young man* knows the rules but the *old man* knows the > > > > exceptions?. *Oliver > > > > Wendell Holmes* > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers at python.org > > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers at python.org > > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > > > > > -- > > Thanks, > > Diptanu Choudhury > > Mobile - +919686602153 > > Web - www.linkedin.com/in/diptanu > > Twitter - @diptanu > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > http://about.me/santosh.rajan > > ?The *young man* knows the rules but the *old man* knows the > exceptions?. *Oliver > Wendell Holmes* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From noufal at gmail.com Mon Apr 4 14:04:06 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 04 Apr 2011 17:34:06 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Santosh Rajan's message of "Mon, 4 Apr 2011 10:43:34 +0530") References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: <878vvq8bpl.fsf@gmail.com> On Mon, Apr 04 2011, Santosh Rajan wrote: > Looks like a solution looking for a problem, rather than a problem looking > for a solution. [...] That's a premature evaluation. -- From noufal at gmail.com Mon Apr 4 14:05:10 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 04 Apr 2011 17:35:10 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Diptanu Choudhury's message of "Mon, 4 Apr 2011 17:19:16 +0530") References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> Message-ID: <874o6e8bnt.fsf@gmail.com> On Mon, Apr 04 2011, Diptanu Choudhury wrote: [...] > And Python was our first choice because people who has worked in this domain > has the opinion that it is easier for average programmers to learn Python > than Ruby. And ultimately Mangrove has to be supported by tech people > running the operations in the field. [...] This sounds interesting. When *will* you be available to talk about it? -- From admin.nitjece at gmail.com Mon Apr 4 14:09:50 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Mon, 4 Apr 2011 17:39:50 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <874o6e8bnt.fsf@gmail.com> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> Message-ID: Hey Noufal, I will be in Bangalore only on the 23rd/24th weekend. On Mon, Apr 4, 2011 at 5:35 PM, Noufal Ibrahim wrote: > On Mon, Apr 04 2011, Diptanu Choudhury wrote: > > [...] > > > And Python was our first choice because people who has worked in this > domain > > has the opinion that it is easier for average programmers to learn Python > > than Ruby. And ultimately Mangrove has to be supported by tech people > > running the operations in the field. > > [...] > > This sounds interesting. When *will* you be available to talk about it? > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From lawgon at gmail.com Mon Apr 4 13:45:10 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Mon, 04 Apr 2011 17:15:10 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <1301913645.2254.233.camel@localhost> Message-ID: <1301917510.2254.239.camel@localhost> On Mon, 2011-04-04 at 17:09 +0530, Diptanu Choudhury wrote: > The source code is here: > https://github.com/mangroveorg/mangrove > and here: > https://github.com/diptanu/datastore > > what is the license? I am working on something similar as part of a bigger app, and would like to both pull stuff from you and also contribute back. But I need to know the license before going any further. -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From noufal at gmail.com Mon Apr 4 14:14:52 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 04 Apr 2011 17:44:52 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Diptanu Choudhury's message of "Mon, 4 Apr 2011 17:39:50 +0530") References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> Message-ID: <87zko66wn7.fsf@gmail.com> On Mon, Apr 04 2011, Diptanu Choudhury wrote: > Hey Noufal, > > I will be in Bangalore only on the 23rd/24th weekend. [...] Unless we have a serious talk offer before that, I think we can schedule the meetup for that weekend. -- From admin.nitjece at gmail.com Mon Apr 4 14:27:52 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Mon, 4 Apr 2011 17:57:52 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <1301917510.2254.239.camel@localhost> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <1301913645.2254.233.camel@localhost> <1301917510.2254.239.camel@localhost> Message-ID: Kenneth, I will need to find out about the license. It would be _awesome_ if you could use and contribute back to Mangrove. On Mon, Apr 4, 2011 at 5:15 PM, Kenneth Gonsalves wrote: > On Mon, 2011-04-04 at 17:09 +0530, Diptanu Choudhury wrote: > > The source code is here: > > https://github.com/mangroveorg/mangrove > > and here: > > https://github.com/diptanu/datastore > > > > > > what is the license? I am working on something similar as part of a > bigger app, and would like to both pull stuff from you and also > contribute back. But I need to know the license before going any > further. > -- > regards > Kenneth Gonsalves > http://lawgon.livejournal.com/ > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From lawgon at gmail.com Tue Apr 5 03:31:32 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Tue, 05 Apr 2011 07:01:32 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <1301913645.2254.233.camel@localhost> <1301917510.2254.239.camel@localhost> Message-ID: <1301967092.2254.248.camel@localhost> On Mon, 2011-04-04 at 17:57 +0530, Diptanu Choudhury wrote: > I will need to find out about the license. It would be _awesome_ if > you > could use and contribute back to Mangrove. caveat - I cannot touch it if it is GPL. I can also arrange some funds if mangrove fits my app (not $$$, but something) -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From neha.hbti.it at gmail.com Tue Apr 5 13:34:38 2011 From: neha.hbti.it at gmail.com (Neha Jain) Date: Tue, 5 Apr 2011 17:04:38 +0530 Subject: [BangPypers] A trivial doubt in negative lookbehind regular expression pattern Message-ID: Hi all, I am trying to avoid matching of the terms that start with a word ABC_ The general pattern is that the term has only caps alphabets and _, I have to ignore from these terms, ones that begin in ABC_ The regular expression I have written is: pattern = re.compile( ' ((? References: Message-ID: <20110405120810.GA2505@kevin> On Tue, Apr 05, 2011 at 05:04:38PM +0530, Neha Jain wrote: > I am trying to avoid matching of the terms that start with a word ABC_ > The general pattern is that the term has only caps alphabets and _, I have > to ignore from these terms, ones that begin in ABC_ > The regular expression I have written is: > > pattern = re.compile( ' ((?>> m = re.search('^(?!ABC_)[A-Z_]+','ABC_CDF') >>> m.group(0) Traceback (most recent call last): File "", line 1, in AttributeError: 'NoneType' object has no attribute 'group' >>> m = re.search('^(?!ABC_)[A-Z_]+','AB_CDF') >>> m.group(0) 'AB_CDF' -- Senthil From neha.hbti.it at gmail.com Tue Apr 5 14:51:03 2011 From: neha.hbti.it at gmail.com (Neha Jain) Date: Tue, 5 Apr 2011 18:21:03 +0530 Subject: [BangPypers] A trivial doubt in negative lookbehind regular expression pattern In-Reply-To: <20110405120810.GA2505@kevin> References: <20110405120810.GA2505@kevin> Message-ID: thanks senthil for the prompt reply.. On Tue, Apr 5, 2011 at 5:38 PM, Senthil Kumaran wrote: > On Tue, Apr 05, 2011 at 05:04:38PM +0530, Neha Jain wrote: > > I am trying to avoid matching of the terms that start with a word ABC_ > > The general pattern is that the term has only caps alphabets and _, I > have > > to ignore from these terms, ones that begin in ABC_ > > The regular expression I have written is: > > > > pattern = re.compile( ' ((? > That is because your [A-Z_]+ will match the entire string and then it > the string does not start with ABC_ is still true. > > How about using negative lookahead match at the start, by doing > something like this. > > >>> m = re.search('^(?!ABC_)[A-Z_]+','ABC_CDF') > >>> m.group(0) > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'NoneType' object has no attribute 'group' > >>> m = re.search('^(?!ABC_)[A-Z_]+','AB_CDF') > >>> m.group(0) > 'AB_CDF' > > but the problem with this is that the line where I am searching for may be like.. #define ABC_PG... so may be something for the start of the word type matching may help.. \b?? i am not sure.. Any pointers..? > -- > Senthil > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Smiles Neha ))))) From orsenthil at gmail.com Tue Apr 5 16:30:07 2011 From: orsenthil at gmail.com (Senthil Kumaran) Date: Tue, 5 Apr 2011 22:30:07 +0800 Subject: [BangPypers] A trivial doubt in negative lookbehind regular expression pattern In-Reply-To: References: <20110405120810.GA2505@kevin> Message-ID: <20110405143006.GA4306@kevin> On Tue, Apr 05, 2011 at 06:21:03PM +0530, Neha Jain wrote: > > > but the problem with this is that the line where I am searching for may be > like.. #define ABC_PG... so may be something for the start of the word type > matching may help.. \b?? i am not sure.. The reason that second pattern is inclusive of the first one, makes it bit tricky. You can also consider to do it two steps with splitting the words and verify that simpler strings do not startswith 'ABC_' pattern. >>> for each in re.split('\W','#define ABC_CDF\nAB_CDF'): ['', 'define', 'ABC_CDF', 'AB_CDF'] -- Senthil From neha.hbti.it at gmail.com Wed Apr 6 13:09:29 2011 From: neha.hbti.it at gmail.com (Neha Jain) Date: Wed, 6 Apr 2011 16:39:29 +0530 Subject: [BangPypers] A trivial doubt in negative lookbehind regular expression pattern In-Reply-To: <20110405143006.GA4306@kevin> References: <20110405120810.GA2505@kevin> <20110405143006.GA4306@kevin> Message-ID: yeah.. thats possible.. thanks :) On Tue, Apr 5, 2011 at 8:00 PM, Senthil Kumaran wrote: > On Tue, Apr 05, 2011 at 06:21:03PM +0530, Neha Jain wrote: > > > > > but the problem with this is that the line where I am searching for may > be > > like.. #define ABC_PG... so may be something for the start of the word > type > > matching may help.. \b?? i am not sure.. > > The reason that second pattern is inclusive of the first one, makes it > bit tricky. > > You can also consider to do it two steps with splitting the words and > verify that simpler strings do not startswith 'ABC_' pattern. > > > >>> for each in re.split('\W','#define ABC_CDF\nAB_CDF'): > ['', 'define', 'ABC_CDF', 'AB_CDF'] > > -- > Senthil > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Smiles Neha ))))) From habibpagarkar at gmail.com Wed Apr 6 13:35:31 2011 From: habibpagarkar at gmail.com (Habibullah Pagarkar) Date: Wed, 6 Apr 2011 17:05:31 +0530 Subject: [BangPypers] [OT][ANN] RubyConf India 2011 Registrations open Message-ID: Hello all, RubyConf India 2011 will be held in Bangalore on the 28th and 29th of May. The venue is Royal Orchid hotel off Old Airport Road, very close to ThoughtWorks' office where BangPypers meetings are occasionally held. We have a very knowledgeable group of speakers lined up - the keynote will be presented by Yehuda Katz, committer to Ruby on Rails, jQuery, Rubinius, DataMapper among others. Chad Fowler (author of Passionate Programmer) and Ola Bini (core committer to JRuby and creator of a few interesting programming languages) will also be presenting. To register for this event, please visit http://rubyconfindia.org/2011/registration.html Early bird registrations close in less than two weeks, so hurry! We've already received over 25 proposals. The call for participation closes in *just* two weeks. If you'd like to submit a proposal, head over to http://rubyconfindia.org/2011 to do so. The last date for submissions is 20th April, 2011. I'm hoping that just like last year, many members of this group will enrich RubyConf India with their perspectives and experiences of working with a fraternal dynamic language. :) Thank you, -- Habibullah Pagarkar habibpagarkar at gmail.com http://www.cs.jhu.edu/~habib http://habib.posterous.com/ http://twitter.com/mhabibp From nitin.nitp at gmail.com Wed Apr 6 14:11:42 2011 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Wed, 6 Apr 2011 17:41:42 +0530 Subject: [BangPypers] returning value from a class Message-ID: Hi All, I am looking for a return value when an object is created. but can see different behavior in different python version. Python 3 gives >>> class x: def __new__(self): return 5 >>> x() 5 Python 2.6.5 gives >>> class x: def __new__(self): return 5 >>> x() <__main__.x instance at 0x017CFD00> I need to use 2.6 only, so how to achieve the same functionality as in python 3. -- Nitin K From noufal at gmail.com Wed Apr 6 15:11:44 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 06 Apr 2011 18:41:44 +0530 Subject: [BangPypers] returning value from a class In-Reply-To: (Nitin Kumar's message of "Wed, 6 Apr 2011 17:41:42 +0530") References: Message-ID: <87ipurzfqn.fsf@gmail.com> You're opening up can of worms here but I'll try to sort it out since I'm feeling messed up anyway. First : Old style and new style classes --------------------------------------- "class X:" in Python 2.x creates an old style class[1] These classes were distinct from builtin "type"s. All such classes were of type "classobj" and instances would be of type "instance". "class X(object):" in Python 2.x creates a new style class[1] for which the class is of type 'type' which is ultimately the root of for all the builtin types as well. Instances would have the class as their type. So if you do x = X() and then ask for the type of X, you'd get "class X" for new style and "instance" for old style. With Python 3, the old style class was dropped and no longer supported. A plain class declaration would create a new style class. In your example, the 2.x variant is using an old style class and the 3.x one a new style class. Replacing your 2.x definition with class x(object): will create a new style class that will work in the same way as with Python 3. Second : The __new__ and __init__ methods ----------------------------------------- The __new__ method is an allocator. It "creates" the object. The __init__ method is an "initialiser" and might not always be called (e.g. while depickling). It will initialise the object created. Python semantics[2] state that if your __new__ method returns an object of a type different from the class it's allocating, the __init__ method will not be called. That's what's happening in your situation. Now, why is this not happening for old style classes? Well, I need to dig into the source to confirm this but one of the things that was added when they moved to new style classes (after 2.1 I think) is hooks that allow overriding of the allocation process. This made metaclasses and all that possible. This is not the case with old style classes where the allocator was not even exposed. >>> class F: ... def __new__(cls): ... print "Hello" ... return 5 ... >>> F() <__main__.F instance at 0x7fa759a4e908> >>> will not even print the "Hello" since there was no __new__. Thirdly : What are you trying to do? ------------------------------------ Why do you want to create a class that doesn't create itself when called? I'm not chastising you but most situations where this kind of thing is done are interesting and I'm curious to know more. On Wed, Apr 06 2011, Nitin Kumar wrote: > Hi All, > > I am looking for a return value when an object is created. > but can see different behavior in different python version. > > Python 3 gives >>>> class x: > def __new__(self): > return 5 > >>>> x() > 5 > > > Python 2.6.5 gives >>>> class x: > def __new__(self): > return 5 > >>>> x() > <__main__.x instance at 0x017CFD00> > > I need to use 2.6 only, so how to achieve the same functionality as in > python 3. Footnotes: [1] http://docs.python.org/release/2.5.2/ref/node33.html [2] http://docs.python.org/reference/datamodel.html#object.__new__ -- From nitin.nitp at gmail.com Wed Apr 6 15:24:20 2011 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Wed, 6 Apr 2011 18:54:20 +0530 Subject: [BangPypers] returning value from a class In-Reply-To: <87ipurzfqn.fsf@gmail.com> References: <87ipurzfqn.fsf@gmail.com> Message-ID: Thanks a lot Noufal, I was just missing overloading object (i got remind of this after checking your mail only) class in mine. Thanks for the info in such detail. Nitin K On Wed, Apr 6, 2011 at 6:41 PM, Noufal Ibrahim wrote: > > You're opening up can of worms here but I'll try to sort it out since > I'm feeling messed up anyway. > > First : Old style and new style classes > --------------------------------------- > "class X:" in Python 2.x creates an old style class[1] > > These classes were distinct from builtin "type"s. All such classes were > of type "classobj" and instances would be of type "instance". > > "class X(object):" in Python 2.x creates a new style class[1] > > for which the class is of type 'type' which is ultimately the root of > for all the builtin types as well. Instances would have the class as > their type. So if you do > > x = X() > > and then ask for the type of X, you'd get "class X" for new style and > "instance" for old style. > > With Python 3, the old style class was dropped and no longer > supported. A plain class declaration would create a new style class. > > In your example, the 2.x variant is using an old style class and the 3.x > one a new style class. Replacing your 2.x definition with > > class x(object): > > will create a new style class that will work in the same way as with > Python 3. > > Second : The __new__ and __init__ methods > ----------------------------------------- > > The __new__ method is an allocator. It "creates" the object. The > __init__ method is an "initialiser" and might not always be called > (e.g. while depickling). It will initialise the object created. > > Python semantics[2] state that if your __new__ method returns an object > of a type different from the class it's allocating, the __init__ method > will not be called. That's what's happening in your situation. > > Now, why is this not happening for old style classes? Well, I need to > dig into the source to confirm this but one of the things that was added > when they moved to new style classes (after 2.1 I think) is hooks that > allow overriding of the allocation process. This made metaclasses and > all that possible. This is not the case with old style classes where the > allocator was not even exposed. > > > >>> class F: > ... def __new__(cls): > ... print "Hello" > ... return 5 > ... > >>> F() > <__main__.F instance at 0x7fa759a4e908> > >>> > > > will not even print the "Hello" since there was no __new__. > > Thirdly : What are you trying to do? > ------------------------------------ > > Why do you want to create a class that doesn't create itself when > called? I'm not chastising you but most situations where this kind of > thing is done are interesting and I'm curious to know more. > > > On Wed, Apr 06 2011, Nitin Kumar wrote: > > > Hi All, > > > > I am looking for a return value when an object is created. > > but can see different behavior in different python version. > > > > Python 3 gives > >>>> class x: > > def __new__(self): > > return 5 > > > >>>> x() > > 5 > > > > > > Python 2.6.5 gives > >>>> class x: > > def __new__(self): > > return 5 > > > >>>> x() > > <__main__.x instance at 0x017CFD00> > > > > I need to use 2.6 only, so how to achieve the same functionality as in > > python 3. > > > Footnotes: > [1] http://docs.python.org/release/2.5.2/ref/node33.html > > [2] http://docs.python.org/reference/datamodel.html#object.__new__ > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K From noufal at gmail.com Wed Apr 6 15:31:33 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 06 Apr 2011 19:01:33 +0530 Subject: [BangPypers] returning value from a class In-Reply-To: (Nitin Kumar's message of "Wed, 6 Apr 2011 18:54:20 +0530") References: <87ipurzfqn.fsf@gmail.com> Message-ID: <87ei5fzetm.fsf@gmail.com> On Wed, Apr 06 2011, Nitin Kumar wrote: > Thanks a lot Noufal, > > I was just missing overloading object (i got remind of this after checking > your mail only) class in mine. > Thanks for the info in such detail. [...] So, what are you trying to do? -- From lorddaemon at gmail.com Wed Apr 6 15:34:23 2011 From: lorddaemon at gmail.com (Sidu Ponnappa) Date: Wed, 6 Apr 2011 19:04:23 +0530 Subject: [BangPypers] returning value from a class In-Reply-To: <87ipurzfqn.fsf@gmail.com> References: <87ipurzfqn.fsf@gmail.com> Message-ID: > Why do you want to create a class that doesn't create itself when called? It's interesting this came up today - we were just arguing about this at work on Monday. Some of my colleagues are of the opinion that this is a Bad Thing and should never be done. I agree that while it's a bad thing, there are rare occasions where it's still the most elegant solution. After all, the allocator is just a factory - I don't see why it should be treated as something special. As long as you have some rules (like the rules for overriding the default equality method in any OO language) you should be fine. FWIW, these are my two rules: * Don't do it unless there's no other sensible option. Like, absolutely nothing else exists that is more elegant. * Ensure that you're returning a sub-class of the class where you're implementing a custom allocator. No returning a different type, and definitely no returning a nil. Here's one occasion where I had call to do this. See https://github.com/kaiwren/wrest/blob/master/spec/wrest/native/response_spec.rb#L41 for the spec and https://github.com/kaiwren/wrest/blob/master/lib/wrest/native/response.rb#L43 for the code. It's in Ruby, though. Best, Sidu. http://c42.in http://about.me/ponnappa On Wed, Apr 6, 2011 at 6:41 PM, Noufal Ibrahim wrote: > > You're opening up can of worms here but I'll try to sort it out since > I'm feeling messed up anyway. > > First : Old style and new style classes > --------------------------------------- > "class X:" in Python 2.x creates an old style class[1] > > These classes were distinct from builtin "type"s. All such classes were > of type "classobj" and instances would be of type "instance". > > "class X(object):" in Python 2.x creates a new style class[1] > > for which the class is of type 'type' which is ultimately the root of > for all the builtin types as well. Instances would have the class as > their type. So if you do > > x = X() > > and then ask for the type of X, you'd get "class X" for new style and > "instance" for old style. > > With Python 3, the old style class was dropped and no longer > supported. A plain class declaration would create a new style class. > > In your example, the 2.x variant is using an old style class and the 3.x > one a new style class. Replacing your 2.x definition with > > class x(object): > > will create a new style class that will work in the same way as with > Python 3. > > Second : The __new__ and __init__ methods > ----------------------------------------- > > The __new__ method is an allocator. It "creates" the object. The > __init__ method is an "initialiser" and might not always be called > (e.g. while depickling). It will initialise the object created. > > Python semantics[2] state that if your __new__ method returns an object > of a type different from the class it's allocating, the __init__ method > will not be called. That's what's happening in your situation. > > Now, why is this not happening for old style classes? Well, I need to > dig into the source to confirm this but one of the things that was added > when they moved to new style classes (after 2.1 I think) is hooks that > allow overriding of the allocation process. This made metaclasses and > all that possible. This is not the case with old style classes where the > allocator was not even exposed. > > > >>> class F: > ... def __new__(cls): > ... print "Hello" > ... return 5 > ... > >>> F() > <__main__.F instance at 0x7fa759a4e908> > >>> > > > will not even print the "Hello" since there was no __new__. > > Thirdly : What are you trying to do? > ------------------------------------ > > Why do you want to create a class that doesn't create itself when > called? I'm not chastising you but most situations where this kind of > thing is done are interesting and I'm curious to know more. > > > On Wed, Apr 06 2011, Nitin Kumar wrote: > > > Hi All, > > > > I am looking for a return value when an object is created. > > but can see different behavior in different python version. > > > > Python 3 gives > >>>> class x: > > def __new__(self): > > return 5 > > > >>>> x() > > 5 > > > > > > Python 2.6.5 gives > >>>> class x: > > def __new__(self): > > return 5 > > > >>>> x() > > <__main__.x instance at 0x017CFD00> > > > > I need to use 2.6 only, so how to achieve the same functionality as in > > python 3. > > > Footnotes: > [1] http://docs.python.org/release/2.5.2/ref/node33.html > > [2] http://docs.python.org/reference/datamodel.html#object.__new__ > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From noufal at gmail.com Wed Apr 6 16:05:52 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 06 Apr 2011 19:35:52 +0530 Subject: [BangPypers] returning value from a class In-Reply-To: (Sidu Ponnappa's message of "Wed, 6 Apr 2011 19:04:23 +0530") References: <87ipurzfqn.fsf@gmail.com> Message-ID: <874o6bzd8f.fsf@gmail.com> On Wed, Apr 06 2011, Sidu Ponnappa wrote: >> Why do you want to create a class that doesn't create itself when called? > It's interesting this came up today - we were just arguing about this > at work on Monday. Some of my colleagues are of the opinion that this > is a Bad Thing and should never be done. I agree that while it's a bad > thing, there are rare occasions where it's still the most elegant > solution. After all, the allocator is just a factory - I don't see why > it should be treated as something special. As long as you have some > rules (like the rules for overriding the default equality method in > any OO language) you should be fine. Yup. It is a factory and seeing it that way makes things clearer. However, it's one of those things that comes after messing with stuff for a while rather than something taught. > FWIW, these are my two rules: > * Don't do it unless there's no other sensible option. Like, absolutely > nothing else exists that is more elegant. I'm not "against" it. Overriding the __new__ method in python (i.e. the allocator) is often done while metaclassing to create speciallised objects. e.g. with custom accessors and stuff like that. However, like you said, it's a rule to be broken only when you know what you're doing. > * Ensure that you're returning a sub-class of the class where you're > implementing a custom allocator. No returning a different type, and > definitely no returning a nil. This makes sense. Liskov's principle would be honoured and things would be more predictable. > Here's one occasion where I had call to do this. See > > https://github.com/kaiwren/wrest/blob/master/spec/wrest/native/response_spec.rb#L41 > > for the spec and > > https://github.com/kaiwren/wrest/blob/master/lib/wrest/native/response.rb#L43 > > for the code. It's in Ruby, though. So you'll actually build a redirection instead of just a response for the 3xx status codes? I don't know Wrest and the rest of the code well enough to have an opinion on being right or wrong but it does illustrate your point though. [...] -- From lorddaemon at gmail.com Wed Apr 6 17:31:58 2011 From: lorddaemon at gmail.com (Sidu Ponnappa) Date: Wed, 6 Apr 2011 21:01:58 +0530 Subject: [BangPypers] returning value from a class In-Reply-To: <874o6bzd8f.fsf@gmail.com> References: <87ipurzfqn.fsf@gmail.com> <874o6bzd8f.fsf@gmail.com> Message-ID: > So you'll actually build a redirection instead of just a response for > the 3xx status codes? Aye - the native Ruby HTTP libraries do no support an auto-follow-redirect feature and I wanted to add that to Wrest. So in Wrest, the Redirection class is a subclass of Response and overrides Response's default implementation of the 'follow' method to make this possible in a manner that's transparent to the end user of the library. On Wed, Apr 6, 2011 at 7:35 PM, Noufal Ibrahim wrote: > On Wed, Apr 06 2011, Sidu Ponnappa wrote: > > >> Why do you want to create a class that doesn't create itself when > called? > > It's interesting this came up today - we were just arguing about this > > at work on Monday. Some of my colleagues are of the opinion that this > > is a Bad Thing and should never be done. I agree that while it's a bad > > thing, there are rare occasions where it's still the most elegant > > solution. After all, the allocator is just a factory - I don't see why > > it should be treated as something special. As long as you have some > > rules (like the rules for overriding the default equality method in > > any OO language) you should be fine. > > Yup. It is a factory and seeing it that way makes things > clearer. However, it's one of those things that comes after messing with > stuff for a while rather than something taught. > > > > FWIW, these are my two rules: > > * Don't do it unless there's no other sensible option. Like, absolutely > > nothing else exists that is more elegant. > > I'm not "against" it. Overriding the __new__ method in python (i.e. the > allocator) is often done while metaclassing to create speciallised > objects. e.g. with custom accessors and stuff like that. > > However, like you said, it's a rule to be broken only when you know what > you're doing. > > > * Ensure that you're returning a sub-class of the class where you're > > implementing a custom allocator. No returning a different type, and > > definitely no returning a nil. > > This makes sense. Liskov's principle would be honoured and things would > be more predictable. > > > Here's one occasion where I had call to do this. See > > > > > https://github.com/kaiwren/wrest/blob/master/spec/wrest/native/response_spec.rb#L41 > > > > for the spec and > > > > > https://github.com/kaiwren/wrest/blob/master/lib/wrest/native/response.rb#L43 > > > > for the code. It's in Ruby, though. > > So you'll actually build a redirection instead of just a response for > the 3xx status codes? > > I don't know Wrest and the rest of the code well enough to have an > opinion on being right or wrong but it does illustrate your point > though. > > [...] > > > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From vsapre80 at gmail.com Wed Apr 6 21:39:27 2011 From: vsapre80 at gmail.com (Vishal) Date: Thu, 7 Apr 2011 01:09:27 +0530 Subject: [BangPypers] PyCamp during PyCon India Message-ID: Hello, I think the PyCamp idea is a wonderful idea to spread Python awareness. Can we have something like this during PyCon India this year. Please point this email to the correct mailing list or point me to that mailing list... Thanks and best regards, Vishal Sapre ---------- Forwarded message ---------- From: Date: Tue, Apr 5, 2011 at 3:30 PM Subject: Tutor Digest, Vol 86, Issue 19 To: tutor at python.org Today's Topics: 1. Toronto PyCamp 2011 (Chris Calloway) ---------------------------------------------------------------------- Message: 1 Date: Mon, 04 Apr 2011 18:27:32 -0400 From: Chris Calloway To: Python Tutor List Subject: [Tutor] Toronto PyCamp 2011 Message-ID: <4D9A45D4.9070805 at unc.edu> Content-Type: text/plain; charset=windows-1252; format=flowed The University of Toronto Department of Physics brings PyCamp to Toronto on Monday, June 27 through Thursday, June 30, 2011. Register today at http://trizpug.org/boot-camp/torpy11/ For beginners, this ultra-low-cost Python Boot Camp makes you productive so you can get your work done quickly. PyCamp emphasizes the features which make Python a simpler and more efficient language. Following along with example Python PushUps? speeds your learning process. Become a self-sufficient Python developer in just four days at PyCamp! PyCamp is conducted on the campus of the University of Toronto in a state of the art high technology classroom. -- Sincerely, Chris Calloway http://nccoos.org/Members/cbc office: 3313 Venable Hall phone: (919) 599-3530 mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599 ------------------------------ _______________________________________________ Tutor maillist - Tutor at python.org http://mail.python.org/mailman/listinfo/tutor From anil.kumar.848 at gmail.com Thu Apr 7 19:34:43 2011 From: anil.kumar.848 at gmail.com (anil kumar) Date: Thu, 7 Apr 2011 23:04:43 +0530 Subject: [BangPypers] Fwd: [Invite for Speakers] Mukthi 11.04 - FOSS conference at MSRIT In-Reply-To: References: Message-ID: Hello , I am Anil a part of Vrglinug (FOSS group) at MSRIT , After the success of PYCON , 2010. We are organizing a FOSS conference on the 23rd and 24th of April . it would be nice if we had people from the python community to come in as speakers. website : http://mukthi.vrglinug.org/ please drop me a mail for any details. Thank you. Regards, Anil Kumar M Vrglinug, MSRIT From director at guruprevails.com Wed Apr 13 20:30:16 2011 From: director at guruprevails.com (director guruprevails) Date: Thu, 14 Apr 2011 00:00:16 +0530 Subject: [BangPypers] Require consultants for Python, Django and Hadoop Message-ID: Dear Members, Greetings from GuRu Prevails! We would like to introduce ourselves as a research organization into Machine Learning Technologies. To know more about us please visit www.guruprevails.com We are looking for senior consultants in areas like Django, Python and Hadoop. Ideal Candidate should have design/implementation experience of at-least 3 large projects Preferred areas 1. Search Engine Implementation, recommendation engines 2. NLP and Data Mining, image processing and video mining 3. Working with large data-sets We are also open for part-time availability. Should this be interesting to you please give us a shout at 9972952810 -Thanks Dattatreya From amit.pureenergy at gmail.com Thu Apr 14 11:51:23 2011 From: amit.pureenergy at gmail.com (Amit Sethi) Date: Thu, 14 Apr 2011 15:21:23 +0530 Subject: [BangPypers] Broken pipe error Message-ID: Many times on making request to a the django development server I get this error File "/usr/lib/python2.6/socket.py", line 286, in flush self._sock.sendall(buffer) error: [Errno 32] Broken pipe However usually it is momentary. But I have been getting this error continuously. Thus I am curious. -- A-M-I-T S|S From b.ghose at gmail.com Thu Apr 14 12:11:31 2011 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Thu, 14 Apr 2011 15:41:31 +0530 Subject: [BangPypers] Broken pipe error In-Reply-To: References: Message-ID: On Thu, Apr 14, 2011 at 3:21 PM, Amit Sethi wrote: > File "/usr/lib/python2.6/socket.py", line 286, in flush > ? ?self._sock.sendall(buffer) > error: [Errno 32] Broken pipe This happens when the request from the client (browser) is closed/interrupted. Sometimes this happens when you press the Esc key or move to another page before the original page has loaded completely. This is not a serious issue and you can ignore it safely. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From lawgon at gmail.com Thu Apr 14 12:13:37 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 14 Apr 2011 15:43:37 +0530 Subject: [BangPypers] Broken pipe error In-Reply-To: References: Message-ID: <1302776017.2254.789.camel@localhost> On Thu, 2011-04-14 at 15:21 +0530, Amit Sethi wrote: > File "/usr/lib/python2.6/socket.py", line 286, in flush > self._sock.sendall(buffer) > error: [Errno 32] Broken pipe strange - I have been using it for over 5 years and have never got this error -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From noufal at gmail.com Thu Apr 14 12:47:09 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 14 Apr 2011 16:17:09 +0530 Subject: [BangPypers] Broken pipe error In-Reply-To: <1302776017.2254.789.camel@localhost> (Kenneth Gonsalves's message of "Thu, 14 Apr 2011 15:43:37 +0530") References: <1302776017.2254.789.camel@localhost> Message-ID: <87k4exp0sy.fsf@gmail.com> On Thu, Apr 14 2011, Kenneth Gonsalves wrote: > On Thu, 2011-04-14 at 15:21 +0530, Amit Sethi wrote: >> File "/usr/lib/python2.6/socket.py", line 286, in flush >> self._sock.sendall(buffer) >> error: [Errno 32] Broken pipe > > strange - I have been using it for over 5 years and have never got this > error It occurs quite often with the dev server especially if you use debuggers and tools on the client side. -- From lawgon at gmail.com Thu Apr 14 12:56:33 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 14 Apr 2011 16:26:33 +0530 Subject: [BangPypers] Broken pipe error In-Reply-To: <87k4exp0sy.fsf@gmail.com> References: <1302776017.2254.789.camel@localhost> <87k4exp0sy.fsf@gmail.com> Message-ID: <1302778593.2254.790.camel@localhost> On Thu, 2011-04-14 at 16:17 +0530, Noufal Ibrahim wrote: > On Thu, Apr 14 2011, Kenneth Gonsalves wrote: > > > On Thu, 2011-04-14 at 15:21 +0530, Amit Sethi wrote: > >> File "/usr/lib/python2.6/socket.py", line 286, in flush > >> self._sock.sendall(buffer) > >> error: [Errno 32] Broken pipe > > > > strange - I have been using it for over 5 years and have never got > this > > error > > It occurs quite often with the dev server especially if you use > debuggers and tools on the client side. I am talking about the dev server -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From nitin.nitp at gmail.com Thu Apr 14 14:17:52 2011 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Thu, 14 Apr 2011 17:47:52 +0530 Subject: [BangPypers] mac IP Message-ID: Hi All, Is anyone aware how to fetch mac machine IP using python? -- Nitin K From sudharshan.gupta at in.fiorano.com Thu Apr 14 14:16:26 2011 From: sudharshan.gupta at in.fiorano.com (Sudharshan Gupta) Date: Thu, 14 Apr 2011 17:46:26 +0530 Subject: [BangPypers] mac IP In-Reply-To: References: Message-ID: <4DA6E59A.10409@in.fiorano.com> Hi nitin, I think this works import socket socket.gethostbyname(socket.gethostname()) socket.gethostbyname_ex(socket.gethostname()) Nitin Kumar wrote: > Hi All, > > Is anyone aware how to fetch mac machine IP using python? > > -- Thanks & Regards Sudharshan From noufal at gmail.com Thu Apr 14 14:56:19 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 14 Apr 2011 18:26:19 +0530 Subject: [BangPypers] mac IP In-Reply-To: (Nitin Kumar's message of "Thu, 14 Apr 2011 17:47:52 +0530") References: Message-ID: <87fwplouto.fsf@gmail.com> On Thu, Apr 14 2011, Nitin Kumar wrote: > Hi All, > > Is anyone aware how to fetch mac machine IP using python? This module http://pypi.python.org/pypi/pynetinfo/0.1.9 seems to be able to to do it. -- From santrajan at gmail.com Thu Apr 14 14:58:37 2011 From: santrajan at gmail.com (Santosh Rajan) Date: Thu, 14 Apr 2011 18:28:37 +0530 Subject: [BangPypers] mac IP In-Reply-To: <4DA6E59A.10409@in.fiorano.com> References: <4DA6E59A.10409@in.fiorano.com> Message-ID: I think the solution below will give you all the ip addresses including 127.0.0.1. In any case this is not an easy one to solve. Depends on a lot of factors. You might want to revisit your original question on why you want the ip address? and which ip address (local or inet)?, and investigate wether you really need the ip address to solve the problem? On Thu, Apr 14, 2011 at 5:46 PM, Sudharshan Gupta < sudharshan.gupta at in.fiorano.com> wrote: > Hi nitin, > > I think this works > import socket > socket.gethostbyname(socket.gethostname()) > socket.gethostbyname_ex(socket.gethostname()) > > > > > > Nitin Kumar wrote: > >> Hi All, >> >> Is anyone aware how to fetch mac machine IP using python? >> >> >> > > > -- > Thanks & Regards > Sudharshan > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- http://about.me/santosh.rajan ?The *young man* knows the rules but the *old man* knows the exceptions?. *Oliver Wendell Holmes* From ruchiryshukla at gmail.com Thu Apr 14 15:25:38 2011 From: ruchiryshukla at gmail.com (Ruchir Shukla) Date: Thu, 14 Apr 2011 18:55:38 +0530 Subject: [BangPypers] mac IP In-Reply-To: References: Message-ID: here is a sample code >>> import fcntl, socket, struct >>> >>> def getHwAddr(ifname): ... s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ... info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) ... return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1] ... >>> print getHwAddr('eth0') On Thu, Apr 14, 2011 at 5:47 PM, Nitin Kumar wrote: > Hi All, > > Is anyone aware how to fetch mac machine IP using python? > > -- > Nitin K > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ---------------------------- Kind regards Ruchir Shukla Phone: +91 9099020687 ruchiryshukla at gmail.com; Ruchir Shukla From noufal at gmail.com Thu Apr 14 15:45:56 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 14 Apr 2011 19:15:56 +0530 Subject: [BangPypers] mac IP In-Reply-To: (Ruchir Shukla's message of "Thu, 14 Apr 2011 18:55:38 +0530") References: Message-ID: <871v15osiz.fsf@gmail.com> On Thu, Apr 14 2011, Ruchir Shukla wrote: > here is a sample code > > >>>> import fcntl, socket, struct >>>> >>>> def getHwAddr(ifname): > ... s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > ... info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', > ifname[:15])) > ... return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1] > ... >>>> print getHwAddr('eth0') [...] The IOCTL request code is probably platform specific. Does it work on MacOS? -- From nitin.nitp at gmail.com Fri Apr 15 07:29:58 2011 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Fri, 15 Apr 2011 10:59:58 +0530 Subject: [BangPypers] mac IP In-Reply-To: <871v15osiz.fsf@gmail.com> References: <871v15osiz.fsf@gmail.com> Message-ID: Ya this is the issue, I am writing code generic to all OS (windows 7, XP, mac) so ioctl wont be good to use. Nitin K On Thu, Apr 14, 2011 at 7:15 PM, Noufal Ibrahim wrote: > On Thu, Apr 14 2011, Ruchir Shukla wrote: > > > here is a sample code > > > > > >>>> import fcntl, socket, struct > >>>> > >>>> def getHwAddr(ifname): > > ... s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) > > ... info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', > > ifname[:15])) > > ... return ''.join(['%02x:' % ord(char) for char in > info[18:24]])[:-1] > > ... > >>>> print getHwAddr('eth0') > > [...] > > The IOCTL request code is probably platform specific. Does it work on > MacOS? > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K From nitin.nitp at gmail.com Fri Apr 15 07:31:49 2011 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Fri, 15 Apr 2011 11:01:49 +0530 Subject: [BangPypers] mac IP In-Reply-To: References: <4DA6E59A.10409@in.fiorano.com> Message-ID: the reason for the same is: We got to machine setup, one is US and one in India, according to machine location we need to use local server. So I was looking for IP which help me differentiate the position of client Machine to use that to chose server. thanks Nitin K On Thu, Apr 14, 2011 at 6:28 PM, Santosh Rajan wrote: > I think the solution below will give you all the ip addresses including > 127.0.0.1. In any case this is not an easy one to solve. Depends on a lot > of > factors. You might want to revisit your original question on why you want > the ip address? and which ip address (local or inet)?, and investigate > wether you really need the ip address to solve the problem? > > On Thu, Apr 14, 2011 at 5:46 PM, Sudharshan Gupta < > sudharshan.gupta at in.fiorano.com> wrote: > > > Hi nitin, > > > > I think this works > > import socket > > socket.gethostbyname(socket.gethostname()) > > socket.gethostbyname_ex(socket.gethostname()) > > > > > > > > > > > > Nitin Kumar wrote: > > > >> Hi All, > >> > >> Is anyone aware how to fetch mac machine IP using python? > >> > >> > >> > > > > > > -- > > Thanks & Regards > > Sudharshan > > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > http://about.me/santosh.rajan > > ?The *young man* knows the rules but the *old man* knows the > exceptions?. *Oliver > Wendell Holmes* > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K From nitin.nitp at gmail.com Fri Apr 15 07:40:39 2011 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Fri, 15 Apr 2011 11:10:39 +0530 Subject: [BangPypers] mac IP In-Reply-To: <87fwplouto.fsf@gmail.com> References: <87fwplouto.fsf@gmail.com> Message-ID: Hi Noufal, I am not in a condition to use any third party, I need any way to fetch ip using normal python command. Should i use Popen with ipconfig? Nitin k On Thu, Apr 14, 2011 at 6:26 PM, Noufal Ibrahim wrote: > On Thu, Apr 14 2011, Nitin Kumar wrote: > > > Hi All, > > > > Is anyone aware how to fetch mac machine IP using python? > > This module http://pypi.python.org/pypi/pynetinfo/0.1.9 > seems to be able to to do it. > > > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K From noufal at gmail.com Fri Apr 15 08:08:44 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 15 Apr 2011 11:38:44 +0530 Subject: [BangPypers] mac IP In-Reply-To: (Nitin Kumar's message of "Fri, 15 Apr 2011 11:01:49 +0530") References: <4DA6E59A.10409@in.fiorano.com> Message-ID: <8739lkkpw3.fsf@gmail.com> On Fri, Apr 15 2011, Nitin Kumar wrote: > the reason for the same is: > > We got to machine setup, one is US and one in India, according to > machine location we need to use local server. So I was looking for IP > which help me differentiate the position of client Machine to use that > to chose server. [...] If it's inside a corporate network, they often have some kind of file that contains information on it's location and other details like that which you can use to make a signature. I'd do that instead of relying on IP. -- From noufal at gmail.com Fri Apr 15 08:08:59 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 15 Apr 2011 11:38:59 +0530 Subject: [BangPypers] mac IP In-Reply-To: (Nitin Kumar's message of "Fri, 15 Apr 2011 11:10:39 +0530") References: <87fwplouto.fsf@gmail.com> Message-ID: <87y63cjbb8.fsf@gmail.com> On Fri, Apr 15 2011, Nitin Kumar wrote: > Hi Noufal, > > I am not in a condition to use any third party, I need any way to fetch ip > using normal python command. Should i use Popen with ipconfig? [...] Last option. That would work. :) -- From sriramnrn at gmail.com Sun Apr 17 05:26:47 2011 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Sun, 17 Apr 2011 08:56:47 +0530 Subject: [BangPypers] mac IP In-Reply-To: References: <4DA6E59A.10409@in.fiorano.com> Message-ID: If it's machine setup, then please use either puppet or chef or func. You'll get a lot by way of features. -- Ram On 4/15/11, Nitin Kumar wrote: > the reason for the same is: > > We got to machine setup, one is US and one in India, according to machine > location we need to use local server. > So I was looking for IP which help me differentiate the position of client > Machine to use that to chose server. > > thanks > Nitin K > > On Thu, Apr 14, 2011 at 6:28 PM, Santosh Rajan wrote: > >> I think the solution below will give you all the ip addresses including >> 127.0.0.1. In any case this is not an easy one to solve. Depends on a lot >> of >> factors. You might want to revisit your original question on why you want >> the ip address? and which ip address (local or inet)?, and investigate >> wether you really need the ip address to solve the problem? >> >> On Thu, Apr 14, 2011 at 5:46 PM, Sudharshan Gupta < >> sudharshan.gupta at in.fiorano.com> wrote: >> >> > Hi nitin, >> > >> > I think this works >> > import socket >> > socket.gethostbyname(socket.gethostname()) >> > socket.gethostbyname_ex(socket.gethostname()) >> > >> > >> > >> > >> > >> > Nitin Kumar wrote: >> > >> >> Hi All, >> >> >> >> Is anyone aware how to fetch mac machine IP using python? >> >> >> >> >> >> >> > >> > >> > -- >> > Thanks & Regards >> > Sudharshan >> > >> > >> > _______________________________________________ >> > BangPypers mailing list >> > BangPypers at python.org >> > http://mail.python.org/mailman/listinfo/bangpypers >> > >> >> >> >> -- >> http://about.me/santosh.rajan >> >> ?The *young man* knows the rules but the *old man* knows the >> exceptions?. *Oliver >> Wendell Holmes* >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > Nitin K > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Sent from my mobile device ================== Belenix: www.belenix.org From noufal at gmail.com Sun Apr 17 08:28:55 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 17 Apr 2011 11:58:55 +0530 Subject: [BangPypers] mac IP In-Reply-To: (Sriram Narayanan's message of "Sun, 17 Apr 2011 08:56:47 +0530") References: <4DA6E59A.10409@in.fiorano.com> Message-ID: <87y639xufs.fsf@gmail.com> On Sun, Apr 17 2011, Sriram Narayanan wrote: > If it's machine setup, then please use either puppet or chef or func. > You'll get a lot by way of features. [...] Do you have a recommendation from those 3? We wrote a custom scritp to set up machines and it's working quite well but I'm eager to use as few home brewn tools as possible. -- From satyaakam at gmail.com Sun Apr 17 09:31:01 2011 From: satyaakam at gmail.com (satyaakam goswami) Date: Sun, 17 Apr 2011 13:01:01 +0530 Subject: [BangPypers] mac IP In-Reply-To: <87y639xufs.fsf@gmail.com> References: <4DA6E59A.10409@in.fiorano.com> <87y639xufs.fsf@gmail.com> Message-ID: On Sun, Apr 17, 2011 at 11:58 AM, Noufal Ibrahim wrote: > On Sun, Apr 17 2011, Sriram Narayanan wrote: > > > If it's machine setup, then please use either puppet or chef or func. > > You'll get a lot by way of features. > > [...] > > Do you have a recommendation from those 3? > those are for configuration management . puppet i played around with its based on Ruby, works in client/server mode. > We wrote a custom scritp to set up machines and it's working quite well > but I'm eager to use as few home brewn tools as possible. when you mean setup do you mean provisioning ... the OS itself ? -Satya From nikunjbadjatya at gmail.com Sun Apr 17 16:31:47 2011 From: nikunjbadjatya at gmail.com (Nikunj Badjatya) Date: Sun, 17 Apr 2011 20:01:47 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx Message-ID: Hi All, I am working on a self project for grabbing certain URL's from the web. Do some processing and store the final contents in text/pdf file. I am also using html2text ( https://github.com/aaronsw/html2text/archives/master ) for converting the fetched page into text format. As a first step I tried with fetching and converting to text using following code. Code : {{{ #!/bin/python import os import urllib fetch = urllib.urlopen("some-web-link.htm") mainfile = open ('main.html', 'w' ) mainfile.write(fetch.read()) os.system('python2.6 html2text.py main.html > main.txt') }}} It flags an error: {{{ Traceback (most recent call last): File "html2text.py", line 447, in data = open(arg, 'r').read().decode(encoding) File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position 11366: invalid start byte }}} I also tried with {{{ + import codecs ... ... - mainfile = open ('main.html', 'w' ) +mainfile = codecs.open('xyz.htm', 'w', None, 'ignore') ... ... }}} Result is coming the same. Please tell as to what can be done to avoid this error.? Thanks, Nikunj Bangalore, India From jaganadhg at gmail.com Sun Apr 17 16:41:47 2011 From: jaganadhg at gmail.com (JAGANADH G) Date: Sun, 17 Apr 2011 20:11:47 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: On Sun, Apr 17, 2011 at 8:01 PM, Nikunj Badjatya wrote: > Hi All, > > I am working on a self project for grabbing certain URL's from the web. Do > some processing and store the final contents in text/pdf file. > > I am also using html2text ( > https://github.com/aaronsw/html2text/archives/master ) for converting the > fetched page into text format. > As a first step I tried with fetching and converting to text using > following > code. > > Code : > {{{ > #!/bin/python > > import os > import urllib > > fetch = urllib.urlopen("some-web-link.htm") > > mainfile = open ('main.html', 'w' ) > > mainfile.write(fetch.read()) > > os.system('python2.6 html2text.py main.html > main.txt') > > }}} > > It flags an error: > {{{ > Traceback (most recent call last): > File "html2text.py", line 447, in > data = open(arg, 'r').read().decode(encoding) > File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode > return codecs.utf_8_decode(input, errors, True) > UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position 11366: > invalid start byte > > }}} > > I also tried with > {{{ > + import codecs > > ... > ... > - mainfile = open ('main.html', 'w' ) > +mainfile = codecs.open('xyz.htm', 'w', None, 'ignore') > > ... > ... > }}} > > Result is coming the same. > > Please tell as to what can be done to avoid this error.? > > Try this from django.utils.encoding import smart_str myunistr = smart_str(YOUR_STRING) This will solve the issue -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog *ILUGCBE* http://ilugcbe.techstud.org From nikunjbadjatya at gmail.com Sun Apr 17 17:13:37 2011 From: nikunjbadjatya at gmail.com (Nikunj Badjatya) Date: Sun, 17 Apr 2011 20:43:37 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: Thanks for the quick reply.. I hve never touched Django before. I tried as: {{{ #!/bin/python import os import urllib + from django.utils.encoding import smart_str fetch = urllib.urlopen("some-web-link.htm") mainfile = open ('main.html', 'w' ) + myunistr = smart_str(fetch) print myunistr mainfile.write(myunistr) os.system('python2.6 html2text.py main.html > main.txt') }}} The execution went fine without any issues. But when I open the "main.html". I was expecting it to havee full contents of the page . But it has only , {{{ > }}} Please let me know if I am missing something. Thanks, Nikunj On Sun, Apr 17, 2011 at 8:11 PM, JAGANADH G wrote: > On Sun, Apr 17, 2011 at 8:01 PM, Nikunj Badjatya > wrote: > > > Hi All, > > > > I am working on a self project for grabbing certain URL's from the web. > Do > > some processing and store the final contents in text/pdf file. > > > > I am also using html2text ( > > https://github.com/aaronsw/html2text/archives/master ) for converting > the > > fetched page into text format. > > As a first step I tried with fetching and converting to text using > > following > > code. > > > > Code : > > {{{ > > #!/bin/python > > > > import os > > import urllib > > > > fetch = urllib.urlopen("some-web-link.htm") > > > > mainfile = open ('main.html', 'w' ) > > > > mainfile.write(fetch.read()) > > > > os.system('python2.6 html2text.py main.html > main.txt') > > > > }}} > > > > It flags an error: > > {{{ > > Traceback (most recent call last): > > File "html2text.py", line 447, in > > data = open(arg, 'r').read().decode(encoding) > > File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode > > return codecs.utf_8_decode(input, errors, True) > > UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position > 11366: > > invalid start byte > > > > }}} > > > > I also tried with > > {{{ > > + import codecs > > > > ... > > ... > > - mainfile = open ('main.html', 'w' ) > > +mainfile = codecs.open('xyz.htm', 'w', None, 'ignore') > > > > ... > > ... > > }}} > > > > Result is coming the same. > > > > Please tell as to what can be done to avoid this error.? > > > > > > > Try this > > from django.utils.encoding import smart_str > > myunistr = smart_str(YOUR_STRING) > > This will solve the issue > > > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > *ILUGCBE* > http://ilugcbe.techstud.org > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From jaganadhg at gmail.com Sun Apr 17 17:38:39 2011 From: jaganadhg at gmail.com (JAGANADH G) Date: Sun, 17 Apr 2011 21:08:39 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: On Sun, Apr 17, 2011 at 8:43 PM, Nikunj Badjatya wrote: > Thanks for the quick reply.. > I hve never touched Django before. > > I tried as: > > {{{ > > #!/bin/python > > import os > import urllib > + from django.utils.encoding import smart_str > > fetch = urllib.urlopen("some-web-link.htm") > > mainfile = open ('main.html', 'w' ) > > + myunistr = smart_str(fetch) > > print myunistr > > mainfile.write(myunistr) > > > os.system('python2.6 html2text.py main.html > main.txt') > > }}} > > The execution went fine without any issues. But when I open the > "main.html". I was expecting it to havee full contents of the page . But it > has only , > {{{ > 0x8deabac>> > }}} > > Please let me know if I am missing something. > > Change myunistr = smart_str(fetch) to myunistr = smart_str(fetch.read()) -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog *ILUGCBE* http://ilugcbe.techstud.org From nikunjbadjatya at gmail.com Sun Apr 17 17:43:10 2011 From: nikunjbadjatya at gmail.com (Nikunj Badjatya) Date: Sun, 17 Apr 2011 21:13:10 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: Tried with the change. {{{ ... ... - myunistr = smart_str(fetch) + myunistr = smart_str(fetch.read()) ... ... }}} Output: {{{ Traceback (most recent call last): File "html2text.py", line 447, in data = open(arg, 'r').read().decode(encoding) File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position 11366: invalid start byte }}} Same error as before. !! ?? On Sun, Apr 17, 2011 at 9:08 PM, JAGANADH G wrote: > > > On Sun, Apr 17, 2011 at 8:43 PM, Nikunj Badjatya > wrote: > >> Thanks for the quick reply.. >> I hve never touched Django before. >> >> I tried as: >> >> {{{ >> >> #!/bin/python >> >> import os >> import urllib >> + from django.utils.encoding import smart_str >> >> fetch = urllib.urlopen("some-web-link.htm") >> >> mainfile = open ('main.html', 'w' ) >> >> + myunistr = smart_str(fetch) >> >> print myunistr >> >> mainfile.write(myunistr) >> >> >> os.system('python2.6 html2text.py main.html > main.txt') >> >> }}} >> >> The execution went fine without any issues. But when I open the >> "main.html". I was expecting it to havee full contents of the page . But it >> has only , >> {{{ >> > 0x8deabac>> >> }}} >> >> Please let me know if I am missing something. >> >> > > > > Change myunistr = smart_str(fetch) to > myunistr = smart_str(fetch.read()) > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > *ILUGCBE* > http://ilugcbe.techstud.org > > From jaganadhg at gmail.com Sun Apr 17 17:51:26 2011 From: jaganadhg at gmail.com (JAGANADH G) Date: Sun, 17 Apr 2011 21:21:26 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: On Sun, Apr 17, 2011 at 9:13 PM, Nikunj Badjatya wrote: > > Tried with the change. > {{{ > ... > ... > - myunistr = smart_str(fetch) > > + myunistr = smart_str(fetch.read()) > ... > ... > }}} > > Output: > > {{{ > Traceback (most recent call last): > File "html2text.py", line 447, in > data = open(arg, 'r').read().decode(encoding) > File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode > return codecs.utf_8_decode(input, errors, True) > UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position 11366: > invalid start byte > }}} > > Same error as before. !! ?? > > I think the error is coming from this line os.system('python2.6 html2text.py main.html > main.txt') Insted of calling os.system try to import concerned function from html2text.py in the program -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog *ILUGCBE* http://ilugcbe.techstud.org From nikunjbadjatya at gmail.com Sun Apr 17 18:25:59 2011 From: nikunjbadjatya at gmail.com (Nikunj Badjatya) Date: Sun, 17 Apr 2011 21:55:59 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: Dear Jaganadh, I have tried with separate individual execution as {{{ $ python html2text.py index1.htm Traceback (most recent call last): File "../aaronsw-html2text-d9bf7d6/html2text.py", line 488, in data = data.decode(encoding) File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position 11366: invalid start byte }}} Where index1.htm is the fetched page from " http://www.hindu.com/nic/kye/index1.htm" while with index2.htm , fetched from " http://www.hindu.com/nic/kye/index2.htm " the command works fine..!! I also tried with importing as, "from html2text import * " and calling the function accordingly. Same results.!! Thanks, Nikunj On Sun, Apr 17, 2011 at 9:21 PM, JAGANADH G wrote: > > > On Sun, Apr 17, 2011 at 9:13 PM, Nikunj Badjatya > wrote: > >> >> Tried with the change. >> {{{ >> ... >> ... >> - myunistr = smart_str(fetch) >> >> + myunistr = smart_str(fetch.read()) >> ... >> ... >> }}} >> >> Output: >> >> {{{ >> Traceback (most recent call last): >> File "html2text.py", line 447, in >> data = open(arg, 'r').read().decode(encoding) >> File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode >> return codecs.utf_8_decode(input, errors, True) >> UnicodeDecodeError: 'utf8' codec can't decode byte 0x88 in position 11366: >> invalid start byte >> }}} >> >> Same error as before. !! ?? >> >> > > > I think the error is coming from this line > os.system('python2.6 html2text.py main.html > main.txt') > > Insted of calling os.system try to import concerned function from > html2text.py in the program > > > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > *ILUGCBE* > http://ilugcbe.techstud.org > > From nikunjbadjatya at gmail.com Sun Apr 17 19:43:07 2011 From: nikunjbadjatya at gmail.com (Nikunj Badjatya) Date: Sun, 17 Apr 2011 23:13:07 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: Hi, With stripogram Its working fine. Thanks a lot. :) !! But couldnt understand the reason behind the previous html2text malfunction for that particular (index1.htm) link.??! On Sun, Apr 17, 2011 at 10:28 PM, JAGANADH G wrote: > >> > Hi > Do the following things > > install the python librarry "stripogram" (easy_install stripogram) > > Then insted of html2text import do > from stripogram import html2text > > Change mainfile.write(fetch.read()) --> > mainfile.write(html2text(fetch.read())) > > comment the line os.system('python2.6 html2text.py main.html > main.txt') > > Also you can use the *re* module in Python to find the index , so that you > can avoid using popen and grep too > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > *ILUGCBE* > http://ilugcbe.techstud.org > > From noufal at gmail.com Sun Apr 17 19:47:24 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 17 Apr 2011 23:17:24 +0530 Subject: [BangPypers] How not to interview a Pythonista Message-ID: <87sjtgpy6r.fsf@gmail.com> A nice article by Danny Greenfeld on interview blunders made by people looking for Python programmers. Given the number of companies here looking for people, this seemed relevant. http://pydanny.blogspot.com/2011/04/how-not-to-interview-pythonistas.html -- From jaganadhg at gmail.com Sun Apr 17 19:47:02 2011 From: jaganadhg at gmail.com (JAGANADH G) Date: Sun, 17 Apr 2011 23:17:02 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: On Sun, Apr 17, 2011 at 11:13 PM, Nikunj Badjatya wrote: > Hi, > > With stripogram Its working fine. > Thanks a lot. :) !! > > But couldnt understand the reason behind the previous html2text malfunction > for that particular (index1.htm) link.??! > > beacuse html2text encounters a problem with utf-8 decoding . nothing much -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog *ILUGCBE* http://ilugcbe.techstud.org From nikunjbadjatya at gmail.com Sun Apr 17 19:55:31 2011 From: nikunjbadjatya at gmail.com (Nikunj Badjatya) Date: Sun, 17 Apr 2011 23:25:31 +0530 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: On Sun, Apr 17, 2011 at 11:17 PM, JAGANADH G wrote: > > > On Sun, Apr 17, 2011 at 11:13 PM, Nikunj Badjatya < > nikunjbadjatya at gmail.com> wrote: > >> Hi, >> >> With stripogram Its working fine. >> Thanks a lot. :) !! >> >> But couldnt understand the reason behind the previous html2text >> malfunction for that particular (index1.htm) link.??! >> >> > > beacuse html2text encounters a problem with utf-8 decoding . nothing much > So theres no other alternative to use besides utf-8 encoding with older html2text.? On looking at the source code , at line no. 444. They have used encoding=utf-8. Is this can be replaced by something else.? Also there is a lil problem with this new html2text. it does not provide the href links which the older html2text was providing. !! Its a complete text now. Anyways I will figure out the solution for it.. ! Thanks > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > *ILUGCBE* > http://ilugcbe.techstud.org > > From sateeshpyper at gmail.com Fri Apr 15 12:18:48 2011 From: sateeshpyper at gmail.com (Sateesh Kumar) Date: Fri, 15 Apr 2011 15:48:48 +0530 Subject: [BangPypers] mac IP In-Reply-To: References: <4DA6E59A.10409@in.fiorano.com> Message-ID: On Fri, Apr 15, 2011 at 11:01 AM, Nitin Kumar wrote: > the reason for the same is: > > We got to machine setup, one is US and one in India, according to machine > location we need to use local server. > So I was looking for IP which help me differentiate the position of client > Machine to use that to chose server. > > thanks > Nitin K > Usually inside the corporate network there are subdomains that are specific to each site (say for example the FQDN for a machine at Bangalore site would be something like machine_name.blr.compnay.com ). Can you use socket.getfqdn() and base your decision on the results you get ? reg, sateesh From samslists at gmail.com Mon Apr 18 10:07:07 2011 From: samslists at gmail.com (Sam's Lists) Date: Mon, 18 Apr 2011 01:07:07 -0700 Subject: [BangPypers] UnicodeDecodeError: 'utf8' codec can't decode byte xxx In-Reply-To: References: Message-ID: Perhaps a silly question, but what encoding is the page you are getting? You can check this by loading the page in FireFox, going to the view menu, and selecting "character encoding". That will tell you what FireFox thinks is the encoding. If it's not UTF-8, you'll probably have to convert it. -Sam On Sun, Apr 17, 2011 at 10:55 AM, Nikunj Badjatya wrote: > On Sun, Apr 17, 2011 at 11:17 PM, JAGANADH G wrote: > > > > > > > On Sun, Apr 17, 2011 at 11:13 PM, Nikunj Badjatya < > > nikunjbadjatya at gmail.com> wrote: > > > >> Hi, > >> > >> With stripogram Its working fine. > >> Thanks a lot. :) !! > >> > >> But couldnt understand the reason behind the previous html2text > >> malfunction for that particular (index1.htm) link.??! > >> > >> > > > > beacuse html2text encounters a problem with utf-8 decoding . nothing much > > > > So theres no other alternative to use besides utf-8 encoding with older > html2text.? On looking at the source code , at line no. 444. They have used > encoding=utf-8. Is this can be replaced by something else.? > > > Also there is a lil problem with this new html2text. it does not provide > the > href links which the older html2text was providing. !! Its a complete text > now. Anyways I will figure out the solution for it.. ! > > Thanks > > > > -- > > ********************************** > > JAGANADH G > > http://jaganadhg.freeflux.net/blog > > *ILUGCBE* > > http://ilugcbe.techstud.org > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From admin.nitjece at gmail.com Wed Apr 20 06:17:07 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Wed, 20 Apr 2011 09:47:07 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <87zko66wn7.fsf@gmail.com> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> Message-ID: Hello folks, Given that Friday is a holiday, can we have our user group meeting sometime on Friday? On Mon, Apr 4, 2011 at 5:44 PM, Noufal Ibrahim wrote: > On Mon, Apr 04 2011, Diptanu Choudhury wrote: > > > Hey Noufal, > > > > I will be in Bangalore only on the 23rd/24th weekend. > > [...] > > Unless we have a serious talk offer before that, I think we can schedule > the meetup for that weekend. > -- > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From lawgon at gmail.com Wed Apr 20 06:35:19 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 20 Apr 2011 10:05:19 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> Message-ID: <1303274119.1942.120.camel@localhost> On Wed, 2011-04-20 at 09:47 +0530, Diptanu Choudhury wrote: > Given that Friday is a holiday, can we have our user group meeting > sometime > on Friday? obviously there are no Christians in Bangalore ;-) -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From noufal at gmail.com Wed Apr 20 06:45:26 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 20 Apr 2011 10:15:26 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Diptanu Choudhury's message of "Wed, 20 Apr 2011 09:47:07 +0530") References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> Message-ID: <87oc418ra1.fsf@gmail.com> On Wed, Apr 20 2011, Diptanu Choudhury wrote: > Hello folks, > > Given that Friday is a holiday, can we have our user group meeting sometime > on Friday? [...] Works for me but I expect that a lot of the people will have gone back to their native places for the long weekend. How many people can make it? -- From admin.nitjece at gmail.com Wed Apr 20 12:04:21 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Wed, 20 Apr 2011 15:34:21 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <87oc418ra1.fsf@gmail.com> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> <87oc418ra1.fsf@gmail.com> Message-ID: Noufal, I guess the situation(people going to their native places) won't change even on Saturday. And do we have anything else in the agenda, other than me talking about Mangrove? On Wed, Apr 20, 2011 at 10:15 AM, Noufal Ibrahim wrote: > On Wed, Apr 20 2011, Diptanu Choudhury wrote: > > > Hello folks, > > > > Given that Friday is a holiday, can we have our user group meeting > sometime > > on Friday? > > [...] > > Works for me but I expect that a lot of the people will have gone back > to their native places for the long weekend. > > How many people can make it? > > -- > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From hnsri49 at gmail.com Wed Apr 20 12:07:14 2011 From: hnsri49 at gmail.com (srinivas hn) Date: Wed, 20 Apr 2011 15:37:14 +0530 Subject: [BangPypers] BangPypers Digest, Vol 44, Issue 18 In-Reply-To: References: Message-ID: +1 CHEERS CNA 9986229891 On Wed, Apr 20, 2011 at 3:30 PM, wrote: > Send BangPypers mailing list submissions to > bangpypers at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-request at python.org > > You can reach the person managing the list at > bangpypers-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. Re: User group meeting (Diptanu Choudhury) > 2. Re: User group meeting (Kenneth Gonsalves) > 3. Re: User group meeting (Noufal Ibrahim) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 20 Apr 2011 09:47:07 +0530 > From: Diptanu Choudhury > To: Noufal Ibrahim > Cc: Bangalore Python Users Group - India > Subject: Re: [BangPypers] User group meeting > Message-ID: > Content-Type: text/plain; charset=UTF-8 > > Hello folks, > > Given that Friday is a holiday, can we have our user group meeting sometime > on Friday? > > On Mon, Apr 4, 2011 at 5:44 PM, Noufal Ibrahim wrote: > > > On Mon, Apr 04 2011, Diptanu Choudhury wrote: > > > > > Hey Noufal, > > > > > > I will be in Bangalore only on the 23rd/24th weekend. > > > > [...] > > > > Unless we have a serious talk offer before that, I think we can schedule > > the meetup for that weekend. > > -- > > > > > > -- > Thanks, > Diptanu Choudhury > Mobile - +919686602153 > Web - www.linkedin.com/in/diptanu > Twitter - @diptanu > > > ------------------------------ > > Message: 2 > Date: Wed, 20 Apr 2011 10:05:19 +0530 > From: Kenneth Gonsalves > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] User group meeting > Message-ID: <1303274119.1942.120.camel at localhost> > Content-Type: text/plain; charset="UTF-8" > > On Wed, 2011-04-20 at 09:47 +0530, Diptanu Choudhury wrote: > > Given that Friday is a holiday, can we have our user group meeting > > sometime > > on Friday? > > obviously there are no Christians in Bangalore ;-) > -- > regards > Kenneth Gonsalves > http://lawgon.livejournal.com/ > > > > ------------------------------ > > Message: 3 > Date: Wed, 20 Apr 2011 10:15:26 +0530 > From: Noufal Ibrahim > To: Diptanu Choudhury > Cc: Bangalore Python Users Group - India > Subject: Re: [BangPypers] User group meeting > Message-ID: <87oc418ra1.fsf at gmail.com> > Content-Type: text/plain; charset=us-ascii > > On Wed, Apr 20 2011, Diptanu Choudhury wrote: > > > Hello folks, > > > > Given that Friday is a holiday, can we have our user group meeting > sometime > > on Friday? > > [...] > > Works for me but I expect that a lot of the people will have gone back > to their native places for the long weekend. > > How many people can make it? > > -- > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 44, Issue 18 > ****************************************** > From noufal at gmail.com Wed Apr 20 12:28:42 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 20 Apr 2011 15:58:42 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Diptanu Choudhury's message of "Wed, 20 Apr 2011 15:34:21 +0530") References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> <87oc418ra1.fsf@gmail.com> Message-ID: <87mxjl6wth.fsf@gmail.com> On Wed, Apr 20 2011, Diptanu Choudhury wrote: > Noufal, > > I guess the situation(people going to their native places) won't change even > on Saturday. > > And do we have anything else in the agenda, other than me talking about > Mangrove? [...] Not that I'm aware of. Mangrove it is. -- From anushshetty at gmail.com Wed Apr 20 13:50:46 2011 From: anushshetty at gmail.com (Anush Shetty) Date: Wed, 20 Apr 2011 17:20:46 +0530 Subject: [BangPypers] Django + NoSQL Message-ID: Hi All, What is the most preferred NoSQL engine with Django here. Would like to hear out some experiences. - anush From ppc.lists at gmail.com Wed Apr 20 17:55:20 2011 From: ppc.lists at gmail.com (Pradip Caulagi) Date: Wed, 20 Apr 2011 21:25:20 +0530 Subject: [BangPypers] Django + NoSQL In-Reply-To: References: Message-ID: <4DAF01E8.6010205@gmail.com> On 4/20/11 5:20 PM, Anush Shetty wrote: > > What is the most preferred NoSQL engine with Django here. Would like > to hear out some experiences. Django currently doesn't support NoSQL. It is planned though. http://www.allbuttonspressed.com/projects/django-nonrel From santrajan at gmail.com Wed Apr 20 18:05:56 2011 From: santrajan at gmail.com (Santosh Rajan) Date: Wed, 20 Apr 2011 21:35:56 +0530 Subject: [BangPypers] Django + NoSQL In-Reply-To: References: Message-ID: Simon Willison one of the original authors of Django is a great fan of Redis. http://simonwillison.net/static/2010/redis-tutorial/ On Wed, Apr 20, 2011 at 5:20 PM, Anush Shetty wrote: > Hi All, > > What is the most preferred NoSQL engine with Django here. Would like > to hear out some experiences. > > - > anush > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- http://about.me/santosh.rajan ?The *young man* knows the rules but the *old man* knows the exceptions?. *Oliver Wendell Holmes* From pradeep at btbytes.com Wed Apr 20 18:18:16 2011 From: pradeep at btbytes.com (Pradeep Gowda) Date: Wed, 20 Apr 2011 12:18:16 -0400 Subject: [BangPypers] Django + NoSQL In-Reply-To: References: Message-ID: All popular NoSQL solutions (Couch, MongoDB, Riak ..) have Python bindings. Core django modules still assume a relational backend. Why the insistence on "django " ? Putting on the Django glasses everytime is not a healthy development. +PG On Wed, Apr 20, 2011 at 7:50 AM, Anush Shetty wrote: > Hi All, > > What is the most preferred NoSQL engine with Django here. Would like > to hear out some experiences. > > - > anush > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From vnbang2003 at yahoo.com Wed Apr 20 18:58:17 2011 From: vnbang2003 at yahoo.com (vijay) Date: Wed, 20 Apr 2011 22:28:17 +0530 (IST) Subject: [BangPypers] Django + NoSQL In-Reply-To: Message-ID: <43958.67906.qm@web95312.mail.in2.yahoo.com> I have used Django with SqlAlchmeny. --- On Wed, 20/4/11, Anush Shetty wrote: From: Anush Shetty Subject: [BangPypers] Django + NoSQL To: bangpypers at python.org Date: Wednesday, 20 April, 2011, 5:20 PM Hi All, What is the most preferred NoSQL engine with Django here. Would like to hear out some experiences. - anush _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From pradeep at btbytes.com Wed Apr 20 19:09:03 2011 From: pradeep at btbytes.com (Pradeep Gowda) Date: Wed, 20 Apr 2011 13:09:03 -0400 Subject: [BangPypers] Django + NoSQL In-Reply-To: <43958.67906.qm@web95312.mail.in2.yahoo.com> References: <43958.67906.qm@web95312.mail.in2.yahoo.com> Message-ID: This "SqlAlchmeny" must be a new library then. Is it anything like the SQLAlchemy library that talks only to relational databases? On Wed, Apr 20, 2011 at 12:58 PM, vijay wrote: > I have used Django with SqlAlchmeny. > > > --- On Wed, 20/4/11, Anush Shetty wrote: > > From: Anush Shetty > Subject: [BangPypers] Django + NoSQL > To: bangpypers at python.org > Date: Wednesday, 20 April, 2011, 5:20 PM > > Hi All, > > What is the most preferred NoSQL engine with Django here. Would like > to hear out some experiences. > > - > anush > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From sriramnrn at gmail.com Wed Apr 20 19:27:40 2011 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Wed, 20 Apr 2011 22:57:40 +0530 Subject: [BangPypers] User group meeting In-Reply-To: <87mxjl6wth.fsf@gmail.com> References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> <87oc418ra1.fsf@gmail.com> <87mxjl6wth.fsf@gmail.com> Message-ID: Hey, where are we all meeting ? The Thoughtworks offices are available. -- Sriram From noufal at gmail.com Wed Apr 20 19:46:47 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 20 Apr 2011 23:16:47 +0530 Subject: [BangPypers] Django + NoSQL In-Reply-To: (Anush Shetty's message of "Wed, 20 Apr 2011 17:20:46 +0530") References: Message-ID: <87ei4w6cjc.fsf@gmail.com> On Wed, Apr 20 2011, Anush Shetty wrote: > Hi All, > > What is the most preferred NoSQL engine with Django here. Would like > to hear out some experiences. [...] You could just let Django use it's own ORM and relational backend and then use any of the popular bindings to one of the non relational systems and use that in your app. You won't have tight coupling with Djano and all that but that's an advantage (atleast in my opinion). -- From ramdaz at gmail.com Wed Apr 20 20:48:16 2011 From: ramdaz at gmail.com (Ramdas S) Date: Thu, 21 Apr 2011 00:18:16 +0530 Subject: [BangPypers] Django + NoSQL In-Reply-To: <87ei4w6cjc.fsf@gmail.com> References: <87ei4w6cjc.fsf@gmail.com> Message-ID: On Wed, Apr 20, 2011 at 11:16 PM, Noufal Ibrahim wrote: > On Wed, Apr 20 2011, Anush Shetty wrote: > > > Hi All, > > > > What is the most preferred NoSQL engine with Django here. Would like > > to hear out some experiences. > > [...] > > You could just let Django use it's own ORM and relational backend and > then use any of the popular bindings to one of the non relational > systems and use that in your app. You won't have tight coupling with > Djano and all that but that's an advantage (atleast in my opinion).u > > All NoSQL programs that works well with Python works well with Django. I guess you must define your problem clearly, will make it easier for the community to advise you better.... > -- > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Ramdas S +91 9342 583 065 From lawgon at gmail.com Thu Apr 21 03:49:21 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 21 Apr 2011 07:19:21 +0530 Subject: [BangPypers] jkm's 5-1 bounty Message-ID: <1303350561.1942.158.camel@localhost> hi, Jacob Kaplan-Moss has announced a 5-1 bounty. Very simple. You review 5 unreviewed tickets and he will personally fix one of your pending tickets. Several other django core devs have also joined him in this offer. And it is working - I found that all my pending tickets got reviewed within hours of the announcement. -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From senthil at uthcode.com Thu Apr 21 03:59:22 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 21 Apr 2011 09:59:22 +0800 Subject: [BangPypers] jkm's 5-1 bounty In-Reply-To: <1303350561.1942.158.camel@localhost> References: <1303350561.1942.158.camel@localhost> Message-ID: On Thu, Apr 21, 2011 at 07:19:21AM +0530, Kenneth Gonsalves wrote: > > Jacob Kaplan-Moss has announced a 5-1 bounty. Very simple. You review 5 > unreviewed tickets and he will personally fix one of your pending AFAIK, when people explicitly request to fix an issue, Martin von Lowis follows this sometimes for CPython. (Yes, in a positive way). :) Works well for low-hanging fruits. -- Senthil The English country gentleman galloping after a fox -- the unspeakable in full pursuit of the uneatable. -- Oscar Wilde, "A Woman of No Importance" From vnbang2003 at yahoo.com Thu Apr 21 06:25:56 2011 From: vnbang2003 at yahoo.com (vijay) Date: Thu, 21 Apr 2011 09:55:56 +0530 (IST) Subject: [BangPypers] Django + NoSQL In-Reply-To: Message-ID: <882175.31387.qm@web95316.mail.in2.yahoo.com> It not new.See if below link can help you morehttp://lethain.com/replacing-django-s-orm-with-sqlalchemy/ With Regards Vijay --- On Wed, 20/4/11, Pradeep Gowda wrote: From: Pradeep Gowda Subject: Re: [BangPypers] Django + NoSQL To: "Bangalore Python Users Group - India" Date: Wednesday, 20 April, 2011, 10:39 PM This "SqlAlchmeny" must be a new library then. Is it anything like the SQLAlchemy library that talks only to relational databases? On Wed, Apr 20, 2011 at 12:58 PM, vijay wrote: > I have used Django with SqlAlchmeny. > > > --- On Wed, 20/4/11, Anush Shetty wrote: > > From: Anush Shetty > Subject: [BangPypers] Django + NoSQL > To: bangpypers at python.org > Date: Wednesday, 20 April, 2011, 5:20 PM > > Hi All, > > What is the most preferred NoSQL engine with Django here. Would like > to hear out some experiences. > > - > anush > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From lawgon at gmail.com Thu Apr 21 06:36:16 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 21 Apr 2011 10:06:16 +0530 Subject: [BangPypers] Django + NoSQL In-Reply-To: <882175.31387.qm@web95316.mail.in2.yahoo.com> References: <882175.31387.qm@web95316.mail.in2.yahoo.com> Message-ID: <1303360576.1942.161.camel@localhost> On Thu, 2011-04-21 at 09:55 +0530, vijay wrote: > It not new.See if below link can help you > morehttp://lethain.com/replacing-django-s-orm-with-sqlalchemy/ > > it is not nosql -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From admin.nitjece at gmail.com Fri Apr 22 06:27:55 2011 From: admin.nitjece at gmail.com (Diptanu Choudhury) Date: Fri, 22 Apr 2011 09:57:55 +0530 Subject: [BangPypers] User group meeting In-Reply-To: References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> <87oc418ra1.fsf@gmail.com> <87mxjl6wth.fsf@gmail.com> Message-ID: So are we meeting today? Let me propose a time and place and let's do a show of hands 4PM at ThoughtWorks office in Diamond District(2nd Floor) ? On Wed, Apr 20, 2011 at 10:57 PM, Sriram Narayanan wrote: > Hey, where are we all meeting ? > > The Thoughtworks offices are available. > > -- Sriram > -- Thanks, Diptanu Choudhury Mobile - +919686602153 Web - www.linkedin.com/in/diptanu Twitter - @diptanu From noufal at gmail.com Fri Apr 22 06:59:39 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 22 Apr 2011 10:29:39 +0530 Subject: [BangPypers] User group meeting In-Reply-To: (Diptanu Choudhury's message of "Fri, 22 Apr 2011 09:57:55 +0530") References: <87k4fdi3jz.fsf@gmail.com> <87mxk6boy6.fsf@gmail.com> <20110404045436.GA6873@kevin> <874o6e8bnt.fsf@gmail.com> <87zko66wn7.fsf@gmail.com> <87oc418ra1.fsf@gmail.com> <87mxjl6wth.fsf@gmail.com> Message-ID: <87vcy6swxw.fsf@gmail.com> On Fri, Apr 22 2011, Diptanu Choudhury wrote: > So are we meeting today? > > Let me propose a time and place and let's do a show of hands > > 4PM at ThoughtWorks office in Diamond District(2nd Floor) ? [...] +1 -- From djpatra at gmail.com Tue Apr 26 09:59:40 2011 From: djpatra at gmail.com (devjyoti patra) Date: Tue, 26 Apr 2011 13:29:40 +0530 Subject: [BangPypers] Internship opportunity for students in Bangalore Message-ID: Hi Friends, Beevolve (http://www.beevolve.com) is looking for college students for internship positions at Bangalore. You will help us in building a state-of-art analytics platform to help companies make sense of the clutter that we call WWW. Beevolve, a start-up based out of India, was founded in 2008. We then participated in the iAccelerator program at IIM-Ahmedabad and have currently set up an office in Bangalore. At this point in time, we are looking for students who are already present in Bangalore and can spend at-least 2 months with us. Requirements for the internship: ? Strong passion for learning. ? Strong background in any of these languages C++/Java/Python. ? Knowledge of Data-Structures and Algorithms. ? Experience using Linux/Unix. The most important qualifications for this position are having good problem solving skills, ability to learn quickly and a willingness to pitch in wherever you are needed. Awards: ? Informal and entrepreneurial environment. ? Possibilities and incentives for learning new technologies. . Learn how you can start with your own solution. If this seems like an interesting opportunity to you, please send your resume to careers at beevolve.com or devjyoti at beevolve.com with the subject ?Internship Summer-11?. Best Regards, Devjyoti From nitin.nitp at gmail.com Wed Apr 27 07:38:26 2011 From: nitin.nitp at gmail.com (Nitin Kumar) Date: Wed, 27 Apr 2011 11:08:26 +0530 Subject: [BangPypers] Internship opportunity for students in Bangalore In-Reply-To: References: Message-ID: Even my company (http://w3.efi.com/) is looking or the same. Duration: 4-6 Months Facility: Cab and lunch only Requirment: BE or similar profile willing to work in wxpython/pyqt (python) Thanks Nitin K On Tue, Apr 26, 2011 at 1:29 PM, devjyoti patra wrote: > Hi Friends, > > Beevolve (http://www.beevolve.com) is looking for college students for > internship positions at Bangalore. You will help us in building a > state-of-art > analytics platform to help companies make sense of the clutter that we > call > > WWW. > > Beevolve, a start-up based out of India, was founded in 2008. We then > participated in the iAccelerator program at IIM-Ahmedabad and have > currently set up an office in Bangalore. > > At this point in time, we are looking for students who are already present > in > Bangalore and can spend at-least 2 months with us. > > Requirements for the internship: > ? Strong passion for learning. > ? Strong background in any of these languages C++/Java/Python. > ? Knowledge of Data-Structures and Algorithms. > ? Experience using Linux/Unix. > > The most important qualifications for this position are having good > problem solving skills, ability to learn quickly and a willingness > to pitch in wherever you are needed. > > Awards: > ? Informal and entrepreneurial environment. > ? Possibilities and incentives for learning new technologies. > . Learn how you can start with your own solution. > > > If this seems like an interesting opportunity to you, please send your > resume to careers at beevolve.com or devjyoti at beevolve.com with the > subject ?Internship Summer-11?. > > Best Regards, > Devjyoti > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Nitin K From lgp171188 at gmail.com Wed Apr 27 07:41:44 2011 From: lgp171188 at gmail.com (Guruprasad) Date: Wed, 27 Apr 2011 11:11:44 +0530 Subject: [BangPypers] Internship opportunity for students in Bangalore In-Reply-To: References: Message-ID: Hi, On Wed, Apr 27, 2011 at 11:08 AM, Nitin Kumar wrote: > Even my company (http://w3.efi.com/) is looking or the same. > Duration: 4-6 Months > Facility: Cab and lunch only > Requirment: BE or similar profile willing to work in wxpython/pyqt (python) Please follow the mailing list guidelines (http://www.ilugc.in/content/mailinglist-guidelines) and avoid top posting. Interleaved, trimmed posting is the recommended style. This is because the emails are archived in threads and there is no need to preserve the context, albeit redundantly, in every reply. Also interleaved, trimmed posting is more suited for conversations because it follows the order in which people normally read text. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? Thanks & Regards, Guruprasad From lgp171188 at gmail.com Wed Apr 27 07:45:04 2011 From: lgp171188 at gmail.com (Guruprasad) Date: Wed, 27 Apr 2011 11:15:04 +0530 Subject: [BangPypers] Internship opportunity for students in Bangalore In-Reply-To: References: Message-ID: Hi, On Wed, Apr 27, 2011 at 11:11 AM, Guruprasad wrote: > Please follow the mailing list guidelines > (http://www.ilugc.in/content/mailinglist-guidelines) and avoid top > posting. Interleaved, trimmed posting is the recommended style. This > is because the emails are archived in threads and there is no need to > preserve the context, albeit redundantly, in every reply. Also > interleaved, trimmed posting is more suited for conversations because > it follows the order in which people normally read text. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? Aargh! The OP had cross-posted this to multiple mailing lists and Gmail shows everything together in a single thread which led me to wrongly believe that the mail that I was replying to was posted to ILUGC and hence the above reply. I know that we don't insist on particular posting style here in this list. Thanks & Regards. Guruprasad From sree at mahiti.org Wed Apr 27 07:46:22 2011 From: sree at mahiti.org (Sreekanth S Rameshaiah) Date: Wed, 27 Apr 2011 11:16:22 +0530 Subject: [BangPypers] Internship opportunity for students in Bangalore In-Reply-To: References: Message-ID: Mahiti has been providing intern ship opportunities for students interested in Python/ Java for over 10 years now. Please feel free to apply to hr at mahiti.org Min. duration: 2 months. Max duration: 8 months Facility: Food and beverages Exposure: Interns will not only get to work on cutting edge projects in Python/ Andorid/ Iphone platform but also will be able to learn all aspects of software development life cycle. - sree -- Sreekanth S Rameshaiah Executive Director Mahiti Infotech Pvt. Ltd. "OpenSpace", #583, Vyalikaval HBCS Layout, Nagawara, Veerannapalya, Bangalore, India - 560043 Phone: +91 80 4343 7373 Mobile: +91 98455 12611 www.mahiti.org On 27 April 2011 11:08, Nitin Kumar wrote: > Even my company (http://w3.efi.com/) is looking or the same. > Duration: 4-6 Months > Facility: Cab and lunch only > Requirment: BE or similar profile willing to work in wxpython/pyqt (python) > > Thanks > Nitin K > > > On Tue, Apr 26, 2011 at 1:29 PM, devjyoti patra wrote: > > > Hi Friends, > > > > Beevolve (http://www.beevolve.com) is looking for college students for > > internship positions at Bangalore. You will help us in building a > > state-of-art > > analytics platform to help companies make sense of the clutter that we > > call > > > > WWW. > > > > Beevolve, a start-up based out of India, was founded in 2008. We then > > participated in the iAccelerator program at IIM-Ahmedabad and have > > currently set up an office in Bangalore. > > > > At this point in time, we are looking for students who are already > present > > in > > Bangalore and can spend at-least 2 months with us. > > > > Requirements for the internship: > > ? Strong passion for learning. > > ? Strong background in any of these languages C++/Java/Python. > > ? Knowledge of Data-Structures and Algorithms. > > ? Experience using Linux/Unix. > > > > The most important qualifications for this position are having good > > problem solving skills, ability to learn quickly and a willingness > > to pitch in wherever you are needed. > > > > Awards: > > ? Informal and entrepreneurial environment. > > ? Possibilities and incentives for learning new technologies. > > . Learn how you can start with your own solution. > > > > > > If this seems like an interesting opportunity to you, please send your > > resume to careers at beevolve.com or devjyoti at beevolve.com with the > > subject ?Internship Summer-11?. > > > > Best Regards, > > Devjyoti > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Nitin K > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From vikasruhil06 at gmail.com Wed Apr 27 10:59:55 2011 From: vikasruhil06 at gmail.com (vikas ruhil) Date: Wed, 27 Apr 2011 14:29:55 +0530 Subject: [BangPypers] Internship opportunity for students in Bangalore In-Reply-To: References: Message-ID: > hey would you like to mention which place ? > students from Delhi are welcomed or not ? > if we submit any research work or any specific experience in Python ? > or any type which we have created to show that is working on python? > any application related to wxWindows cross-platform toolkit. ? > what are the terms & conditions? > i am looking for the same in security application, in security work is that possible ? Regards Vikash Ruhil On Wed, Apr 27, 2011 at 11:08 AM, Nitin Kumar wrote: > Even my company (http://w3.efi.com/) is looking or the same. > Duration: 4-6 Months > Facility: Cab and lunch only > Requirment: BE or similar profile willing to work in wxpython/pyqt (python) > > Thanks > Nitin K > > > On Tue, Apr 26, 2011 at 1:29 PM, devjyoti patra wrote: > > > Hi Friends, > > > > Beevolve (http://www.beevolve.com) is looking for college students for > > internship positions at Bangalore. You will help us in building a > > state-of-art > > analytics platform to help companies make sense of the clutter that we > > call > > > > WWW. > > > > Beevolve, a start-up based out of India, was founded in 2008. We then > > participated in the iAccelerator program at IIM-Ahmedabad and have > > currently set up an office in Bangalore. > > > > At this point in time, we are looking for students who are already > present > > in > > Bangalore and can spend at-least 2 months with us. > > > > Requirements for the internship: > > ? Strong passion for learning. > > ? Strong background in any of these languages C++/Java/Python. > > ? Knowledge of Data-Structures and Algorithms. > > ? Experience using Linux/Unix. > > > > The most important qualifications for this position are having good > > problem solving skills, ability to learn quickly and a willingness > > to pitch in wherever you are needed. > > > > Awards: > > ? Informal and entrepreneurial environment. > > ? Possibilities and incentives for learning new technologies. > > . Learn how you can start with your own solution. > > > > > > If this seems like an interesting opportunity to you, please send your > > resume to careers at beevolve.com or devjyoti at beevolve.com with the > > subject ?Internship Summer-11?. > > > > Best Regards, > > Devjyoti > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Nitin K > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From vikasruhil06 at gmail.com Wed Apr 27 11:30:38 2011 From: vikasruhil06 at gmail.com (vikas ruhil) Date: Wed, 27 Apr 2011 15:00:38 +0530 Subject: [BangPypers] How to combine a Reminder-bot to a Single-server IRCbot Message-ID: > HERE is a bot that uses the SingleServerIRCBot class from ircbot.py > The bot enters a channel and listens for commands in private messages or channel traffic. > Commands in channel messages are given by prefixing the text by the bot name followed by a colon. > The known commands are: > stats -- Prints some channel information. > disconnect -- Disconnect the bot. The bot will try to reconnect after 60 seconds. > die -- Let the bot cease to exist. """ > now i programmed this below one i want to combine this one with ReaminderBot in JAVA with Ident server class can anybody help me in this regard > this python programmed below of Irc bot import string, random, re from ircbot import SingleServerIRCBot from irclib import nm_to_n, irc_lower def enforce_subset(set, subset): for item in subset: if (set.count(item) == 0): try: subset.remove(item) except: pass class TestBot(SingleServerIRCBot): def __init__(self, channel, nickname, server, port=6667): SingleServerIRCBot.__init__(self, [(server, port)], nickname, nickname) self.channel = channel self.registered = [] self.random = random.Random() self.start() def on_welcome(self, c, e): c.join(self.channel) def on_join(self, c, e): c.privmsg("manager", "register") def on_privmsg(self, c, e): msg = re.sub(r'[^\s!-~\n]','', e.arguments()[0]) self.do_command(nm_to_n(e.source()), msg) def on_pubmsg(self, c, e): msg = re.sub(r'[^\s!-~\n]','', e.arguments()[0]) a = string.split(msg, ":", 1) b = string.split(msg, ",", 1) if len(a) > 1 and irc_lower(a[0].strip()) == irc_lower(self.connection.get_nickname()): self.do_command(nm_to_n(e.source()), string.strip(a[1])) elif len(b) > 1 and irc_lower(b[0].strip()) == irc_lower(self.connection.get_nickname()): self.message_manager(string.strip(b[1])) return def message_manager(self, message): c = self.connection reply = message c.privmsg("manager", reply) def do_command(self, nick, cmd): c = self.connection users = [] for chname, chobj in self.channels.items(): users.extend(chobj.users()) enforce_subset(users, self.registered) if cmd == "disconnect": self.disconnect() elif cmd == "die": self.die() elif cmd == "stats": for chname, chobj in self.channels.items(): c.notice(nick, "--- Channel statistics ---") c.notice(nick, "Channel: " + chname) users = chobj.users() users.sort() c.notice(nick, "Users: " + string.join(users, ", ")) opers = chobj.opers() opers.sort() c.notice(nick, "Opers: " + string.join(opers, ", ")) voiced = chobj.voiced() voiced.sort() c.notice(nick, "Voiced: " + string.join(voiced, ", ")) else: c.notice(nick, "Not understood: " + cmd) def main(): import sys if len(sys.argv) != 4: print "Usage: testbot " sys.exit(1) s = string.split(sys.argv[1], ":", 1) server = s[0] if len(s) == 2: try: port = int(s[1]) except ValueError: print "Error: Erroneous port." sys.exit(1) else: port = 6667 channel = sys.argv[2] nickname = sys.argv[3] bot = TestBot(channel, nickname, server, port) bot.start() if __name__ == "__main__": main() > now here is code of the ReminderBot > in java public class IdentServer extends Thread { /** * Constructs and starts an instance of an IdentServer that will * respond to a client with the provided login. Rather than calling * this constructor explicitly from your code, it is recommended that * you use the startIdentServer method in the IRCBot class. *

* The ident server will wait for up to 60 seconds before shutting * down. Otherwise, it will shut down as soon as it has responded * to an ident request. * * @param bot The IRCBot instance that will be used to log to. * @param login The login that the ident server will respond with. */ IdentServer(IRCBot bot, String login) { _bot = bot; _login = login; try { _ss = new ServerSocket(113); _ss.setSoTimeout(60000); } catch (Exception e) { _bot.log("*** Could not start the ident server on port 113."); return; } _bot.log("*** Ident server running on port 113 for the next 60 seconds..."); this.setName(this.getClass() + "-Thread"); this.start(); } /** * Waits for a client to connect to the ident server before making an * appropriate response. Note that this method is started by the class * constructor. */ public void run() { try { Socket socket = _ss.accept(); socket.setSoTimeout(60000); BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream())); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())); String line = reader.readLine(); if (line != null) { _bot.log("*** Ident request received: " + line); line = line + " : USERID : UNIX : " + _login; writer.write(line + "\r\n"); writer.flush(); _bot.log("*** Ident reply sent: " + line); writer.close(); } } catch (Exception e) { // We're not really concerned with what went wrong, are we? } try { _ss.close(); } catch (Exception e) { // Doesn't really matter... } _bot.log("*** The Ident server has been shut down."); } private IRCBot _bot; private String _login; private ServerSocket _ss = null; } > when i combined these two what exactly error comes it Gives me Reminder but only for Login any new person on IRC not Excatly about serversockets ? > any body can HELP me in this regards Regards Vikash Ruhil From djpatra at gmail.com Wed Apr 27 11:38:11 2011 From: djpatra at gmail.com (devjyoti patra) Date: Wed, 27 Apr 2011 15:08:11 +0530 Subject: [BangPypers] BangPypers Digest, Vol 44, Issue 24 In-Reply-To: References: Message-ID: > > > Aargh! The OP had cross-posted this to multiple mailing lists and > > Gmail shows everything together in a single thread which led me to > > wrongly believe that the mail that I was replying to was posted to > > ILUGC and hence the above reply. I know that we don't insist on > > particular posting style here in this list. How does Gmail show a message from Ilugc and Bangpypers on a single thread? Instead of blaming the OP for cross-posting, please read, if required re-read, and then reply to messages. Thanks, Devjyoti From benignbala at gmail.com Wed Apr 27 11:42:26 2011 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Wed, 27 Apr 2011 15:12:26 +0530 Subject: [BangPypers] BangPypers Digest, Vol 44, Issue 24 In-Reply-To: References: Message-ID: Hi, On Wed, Apr 27, 2011 at 3:08 PM, devjyoti patra wrote: >> > > How does Gmail show a message from Ilugc and Bangpypers on a single thread? > Instead of blaming the OP for cross-posting, please read, if required > re-read, and then reply to messages. > Unfortunately, it did show on a single thread. That's because, you had posted something to ilugc, then copy pasted the content to BangPypers. So, gmail detects that to be a duplicate copy of the original mail and puts it to the same thread and hence the confusion. That would exactly look like a cross-posted mail. Thanks -- Thank you Balachandran Sivakumar Arise Awake and stop not till the goal is reached. Mail: benignbala at gmail.com Blog: http://benignbala.wordpress.com/ From djpatra at gmail.com Wed Apr 27 11:45:28 2011 From: djpatra at gmail.com (devjyoti patra) Date: Wed, 27 Apr 2011 15:15:28 +0530 Subject: [BangPypers] Internship opportunity for students in Bangalore Message-ID: Apologies for my previous mail, where I forgot to edit the subject. > Aargh! The OP had cross-posted this to multiple mailing lists and > > Gmail shows everything together in a single thread which led me to > > wrongly believe that the mail that I was replying to was posted to > > ILUGC and hence the above reply. I know that we don't insist on > > particular posting style here in this list. How can Gmail show a message from Ilugc and Bangpypers in a single thread? Instead of blaming the OP for cross-posting, please read, if required re-read, and then reply to messages. Thanks, Devjyoti From noufal at gmail.com Wed Apr 27 11:56:24 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 27 Apr 2011 15:26:24 +0530 Subject: [BangPypers] How to combine a Reminder-bot to a Single-server IRCbot In-Reply-To: (vikas ruhil's message of "Wed, 27 Apr 2011 15:00:38 +0530") References: Message-ID: <87aafc6mrb.fsf@gmail.com> On Wed, Apr 27 2011, vikas ruhil wrote: >> HERE is a bot that uses the SingleServerIRCBot class from ircbot.py >> The bot enters a channel and listens for commands in private messages or > channel traffic. [...] Please trim your email, format it properly and start new threads for asking questions. I couldn't read any of what you sent. -- From noufal at gmail.com Wed Apr 27 11:59:10 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 27 Apr 2011 15:29:10 +0530 Subject: [BangPypers] New bug Message-ID: <87vcy05829.fsf@gmail.com> Just came across it on Python dev. >>> nan = float("nan") >>> nan == nan False >>> [nan] == [nan] True Nice eh? -- From vikasruhil06 at gmail.com Wed Apr 27 12:01:26 2011 From: vikasruhil06 at gmail.com (vikas ruhil) Date: Wed, 27 Apr 2011 15:31:26 +0530 Subject: [BangPypers] BangPypers Digest, Vol 44, Issue 24 In-Reply-To: References: Message-ID: > ya i would like go with Balachandran Sivakumar >you can look at programming that is used send any mail > 1. private void button_send_Click(object sender, EventArgs e) 2. { 3. //Detailed Method 4. 5. MailAddress mailfrom = new MailAddress("sender at gmail.com"); 6. MailAddress mailto = new MailAddress("receiver at abc.com"); 7. MailMessage newmsg = new MailMessage(mailfrom, mailto); 8. 9. newmsg.Subject = "Subject of Email"; 10. newmsg.Body = "Body(message) of email"; 11. 12. //For File Attachment, more file can also be attached 13. Attachment att = new Attachment("C:\\...file path"); 14. newmsg.Attachments.Add(att); 15. 16. SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587); 17. smtp.UseDefaultCredentials = false; 18. smtp.Credentials = new NetworkCredential("username","password"); 19. smtp.EnableSsl = true; 20. smtp.Send(newmsg); 21. 22. //Alternative Short Method 23. 24. SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587); 25. smtp.UseDefaultCredentials = false; 26. smtp.Credentials = new NetworkCredential("username","password"); 27. smtp.EnableSsl = true; 28. smtp.Send("sender at gamil.com", "receiver", "subject", "Email Body" ); 29. } if this recognize any post duplicate it shows same problem faces by Devjvoti 30. also working of GOOGLEBOT is same , sometimes it also happen on blogger Thanks Vikash Ruhil Mail: Vikasruhil06 at gmail.com Blog: learnhackstuff.blogspot.com On Wed, Apr 27, 2011 at 3:08 PM, devjyoti patra wrote: > > > > > Aargh! The OP had cross-posted this to multiple mailing lists and > > > Gmail shows everything together in a single thread which led me to > > > wrongly believe that the mail that I was replying to was posted to > > > ILUGC and hence the above reply. I know that we don't insist on > > > particular posting style here in this list. > > > How does Gmail show a message from Ilugc and Bangpypers on a single thread? > Instead of blaming the OP for cross-posting, please read, if required > re-read, and then reply to messages. > > Thanks, > Devjyoti > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From senthil at uthcode.com Wed Apr 27 12:28:12 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 27 Apr 2011 18:28:12 +0800 Subject: [BangPypers] New bug In-Reply-To: <87vcy05829.fsf@gmail.com> References: <87vcy05829.fsf@gmail.com> Message-ID: On Wed, Apr 27, 2011 at 5:59 PM, Noufal Ibrahim wrote: > > Just came across it on Python dev. > >>>> nan = float("nan") >>>> nan == nan > False >>>> [nan] == [nan] > True > > Nice eh? The second line is bit confusing, because the way to check for nan is usually via math.isnan. The report says that identity comparison is not done in containers that may be the bug. There are various quirks with nan,inf and -0 and +0's that most often is amusing. :) -- Senthil From dialkforkaushik at gmail.com Wed Apr 27 17:05:33 2011 From: dialkforkaushik at gmail.com (kaushik kalyanaraman) Date: Wed, 27 Apr 2011 10:05:33 -0500 Subject: [BangPypers] New bug In-Reply-To: References: <87vcy05829.fsf@gmail.com> Message-ID: On Wed, Apr 27, 2011 at 5:28 AM, Senthil Kumaran wrote: > The second line is bit confusing, because the way to check for nan is > usually via math.isnan. ?The report says that identity comparison is > not done in containers that may be the bug. I believe that the second-line behavior is the bug since the first one is correct from a math point of view. > There are various quirks with nan,inf and -0 and +0's that most often > is amusing. :) And, perhaps usually indicates non-conformance to IEEE 754! :-) -Kaushik -- To know that we know what we know, and that we do not know what we do not know, that is true knowledge. From senthil at uthcode.com Thu Apr 28 01:45:34 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 28 Apr 2011 07:45:34 +0800 Subject: [BangPypers] New bug In-Reply-To: References: <87vcy05829.fsf@gmail.com> Message-ID: <20110427234534.GA2787@kevin> On Wed, Apr 27, 2011 at 10:05:33AM -0500, kaushik kalyanaraman wrote: > On Wed, Apr 27, 2011 at 5:28 AM, Senthil Kumaran wrote: > > > The second line is bit confusing, because the way to check for nan is > > usually via math.isnan. ?The report says that identity comparison is > > not done in containers that may be the bug. > I believe that the second-line behavior is the bug since the first one > is correct from a math point of view. Actually no, the original python-dev discussion is more enlightening. This got rejected as not a bug, because of it is theoretical only value. Yeah, you can play around and find subtleties nan,inf and -0, but there are set of methods which are defined for proper operation of those. -- Senthil Support your local police force -- steal!! From noufal at gmail.com Thu Apr 28 07:30:33 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 28 Apr 2011 11:00:33 +0530 Subject: [BangPypers] New bug In-Reply-To: <20110427234534.GA2787@kevin> (Senthil Kumaran's message of "Thu, 28 Apr 2011 07:45:34 +0800") References: <87vcy05829.fsf@gmail.com> <20110427234534.GA2787@kevin> Message-ID: <87bozr6iyu.fsf@gmail.com> On Thu, Apr 28 2011, Senthil Kumaran wrote: > On Wed, Apr 27, 2011 at 10:05:33AM -0500, kaushik kalyanaraman wrote: >> On Wed, Apr 27, 2011 at 5:28 AM, Senthil Kumaran wrote: >> >> > The second line is bit confusing, because the way to check for nan is >> > usually via math.isnan. ?The report says that identity comparison is >> > not done in containers that may be the bug. >> I believe that the second-line behavior is the bug since the first one >> is correct from a math point of view. > > Actually no, the original python-dev discussion is more enlightening. > This got rejected as not a bug, because of it is theoretical only > value. Yes. It's very enlightening. Especially Raymond's posts. > Yeah, you can play around and find subtleties nan,inf and -0, but > there are set of methods which are defined for proper operation of > those. While true, I don't like surprises. I don't expect to come across corner cases like these in my day to day life but when I do, I don't want to have to look up the manual for some subtlety that explains this counter intuitive behaviour. -- From lawgon at gmail.com Thu Apr 28 08:45:37 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 28 Apr 2011 12:15:37 +0530 Subject: [BangPypers] editor for restructured text Message-ID: <1303973137.1942.360.camel@localhost> hi, I have a lot of writing to do in restructured text. Any suggestions for an editor (on linux) to make life easier? (please do not suggest vim or emacs) -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From vnbang2003 at yahoo.com Thu Apr 28 08:48:14 2011 From: vnbang2003 at yahoo.com (vijay) Date: Thu, 28 Apr 2011 12:18:14 +0530 (IST) Subject: [BangPypers] editor for restructured text In-Reply-To: <1303973137.1942.360.camel@localhost> Message-ID: <728462.38050.qm@web95304.mail.in2.yahoo.com> You can try eclipse --- On Thu, 28/4/11, Kenneth Gonsalves wrote: From: Kenneth Gonsalves Subject: [BangPypers] editor for restructured text To: "Bangalore Python Users Group - India" Date: Thursday, 28 April, 2011, 12:15 PM hi, I have a lot of writing to do in restructured text. Any suggestions for an editor (on linux) to make life easier? (please do not suggest vim or emacs) -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From senthil at uthcode.com Thu Apr 28 08:51:24 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 28 Apr 2011 14:51:24 +0800 Subject: [BangPypers] editor for restructured text Message-ID: <20110428065124.GA7804@kevin> On Thu, Apr 28, 2011 at 12:15:37PM +0530, Kenneth Gonsalves wrote: > I have a lot of writing to do in restructured text. Any suggestions for > an editor (on linux) to make life easier? (please do not suggest vim or Did you find any problems with Gedit plugin? http://kib2.alwaysdata.net/GEdit/ Related: http://stackoverflow.com/questions/2746692/restructuredtext-tool-support -- Senthil The avoidance of taxes is the only intellectual pursuit that carries any reward. -- John Maynard Keynes From lawgon at gmail.com Thu Apr 28 09:05:09 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 28 Apr 2011 12:35:09 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <20110428065124.GA7804@kevin> References: <20110428065124.GA7804@kevin> Message-ID: <1303974309.1942.361.camel@localhost> On Thu, 2011-04-28 at 14:51 +0800, Senthil Kumaran wrote: > On Thu, Apr 28, 2011 at 12:15:37PM +0530, Kenneth Gonsalves wrote: > > I have a lot of writing to do in restructured text. Any suggestions > for > > an editor (on linux) to make life easier? (please do not suggest vim > or > > Did you find any problems with Gedit plugin? > http://kib2.alwaysdata.net/GEdit/ will try it - noticed some stuff by enthought, but their documentation is confusing. -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From noufal at gmail.com Thu Apr 28 09:25:48 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 28 Apr 2011 12:55:48 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <1303973137.1942.360.camel@localhost> (Kenneth Gonsalves's message of "Thu, 28 Apr 2011 12:15:37 +0530") References: <1303973137.1942.360.camel@localhost> Message-ID: <87y62u6dmr.fsf@gmail.com> On Thu, Apr 28 2011, Kenneth Gonsalves wrote: > hi, > > I have a lot of writing to do in restructured text. Any suggestions for > an editor (on linux) to make life easier? (please do not suggest vim or > emacs) Why not Emacs? The mode for ReST is written by David Goodger as far as I know who wrote docutils itself. It does an excellent job and is quite feature rich. For large amounts of text, it's really quite excellent. Contrary to popular opinion, you *can* use Emacs as just a text editor without buying into it's whole lispy philsophy. -- From lawgon at gmail.com Thu Apr 28 09:49:15 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 28 Apr 2011 13:19:15 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <87y62u6dmr.fsf@gmail.com> References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> Message-ID: <1303976955.1942.363.camel@localhost> On Thu, 2011-04-28 at 12:55 +0530, Noufal Ibrahim wrote: > On Thu, Apr 28 2011, Kenneth Gonsalves wrote: > > > hi, > > > > I have a lot of writing to do in restructured text. Any suggestions > for > > an editor (on linux) to make life easier? (please do not suggest vim > or > > emacs) > > Why not Emacs? The mode for ReST is written by David Goodger as far as > I > know who wrote docutils itself. It does an excellent job and is quite > feature rich. For large amounts of text, it's really quite excellent. > > Contrary to popular opinion, you *can* use Emacs as just a text editor > without buying into it's whole lispy philsophy. I have tried to learn emacs several times - each time ending in failure and frustration -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From b.ghose at gmail.com Thu Apr 28 09:52:34 2011 From: b.ghose at gmail.com (Baishampayan Ghose) Date: Thu, 28 Apr 2011 13:22:34 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <87y62u6dmr.fsf@gmail.com> References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> Message-ID: On Thu, Apr 28, 2011 at 12:55 PM, Noufal Ibrahim wrote: > Contrary to popular opinion, you *can* use Emacs as just a text editor > without buying into it's whole lispy philsophy. FWIW, only a small percentage of Emacs users buy into the "whole lispy philosophy". Nevertheless, the path to mastering Emacs does intersect with the path to mastering Lisp in some important places. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com From nigelbabu at gmail.com Thu Apr 28 09:57:10 2011 From: nigelbabu at gmail.com (Nigel Babu) Date: Thu, 28 Apr 2011 13:27:10 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <20110428065124.GA7804@kevin> References: <20110428065124.GA7804@kevin> Message-ID: On Thu, Apr 28, 2011 at 12:21 PM, Senthil Kumaran wrote: > On Thu, Apr 28, 2011 at 12:15:37PM +0530, Kenneth Gonsalves wrote: >> I have a lot of writing to do in restructured text. Any suggestions for >> an editor (on linux) to make life easier? (please do not suggest vim or > > Did you find any problems with Gedit plugin? > http://kib2.alwaysdata.net/GEdit/ > > Related: > http://stackoverflow.com/questions/2746692/restructuredtext-tool-support > > -- > Senthil I tried out the gedit plugin. Turns out that it depends on gtkhtml2 package which seems to have been deprecated. From noufal at gmail.com Thu Apr 28 10:04:22 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 28 Apr 2011 13:34:22 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <1303976955.1942.363.camel@localhost> (Kenneth Gonsalves's message of "Thu, 28 Apr 2011 13:19:15 +0530") References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> <1303976955.1942.363.camel@localhost> Message-ID: <87tydi6buh.fsf@gmail.com> On Thu, Apr 28 2011, Kenneth Gonsalves wrote: [...] > I have tried to learn emacs several times - each time ending in > failure and frustration Fair enough. The ReST mode for Emacs' is really excellent though especially for large amounts of editing. -- From lawgon at gmail.com Thu Apr 28 11:08:24 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 28 Apr 2011 14:38:24 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <87tydi6buh.fsf@gmail.com> References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> <1303976955.1942.363.camel@localhost> <87tydi6buh.fsf@gmail.com> Message-ID: <1303981704.1942.364.camel@localhost> On Thu, 2011-04-28 at 13:34 +0530, Noufal Ibrahim wrote: > > I have tried to learn emacs several times - each time ending in > > failure and frustration > > Fair enough. The ReST mode for Emacs' is really excellent though > especially for large amounts of editing. yum install emacs -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From senthil at uthcode.com Thu Apr 28 11:16:37 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 28 Apr 2011 17:16:37 +0800 Subject: [BangPypers] editor for restructured text In-Reply-To: References: <20110428065124.GA7804@kevin> Message-ID: <20110428091637.GA11598@kevin> On Thu, Apr 28, 2011 at 01:27:10PM +0530, Nigel Babu wrote: > > Did you find any problems with Gedit plugin? > > http://kib2.alwaysdata.net/GEdit/ > > > > Related: > > http://stackoverflow.com/questions/2746692/restructuredtext-tool-support > > > > -- > > Senthil > > I tried out the gedit plugin. Turns out that it depends on gtkhtml2 > package which seems to have been deprecated. Yes, true. Don't go the gedit plugin path as it not maintained. -- Senthil What this country needs is a dime that will buy a good five-cent bagel. From anandology at gmail.com Thu Apr 28 11:16:22 2011 From: anandology at gmail.com (Anand Chitipothu) Date: Thu, 28 Apr 2011 14:46:22 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <1303981704.1942.364.camel@localhost> References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> <1303976955.1942.363.camel@localhost> <87tydi6buh.fsf@gmail.com> <1303981704.1942.364.camel@localhost> Message-ID: 2011/4/28 Kenneth Gonsalves : > On Thu, 2011-04-28 at 13:34 +0530, Noufal Ibrahim wrote: >> > I have tried to learn emacs several times - each time ending in >> > failure and frustration >> >> Fair enough. The ReST mode for Emacs' is really excellent though >> especially for large amounts of editing. > > yum install emacs and then, vi .emacs :) From noufal at gmail.com Thu Apr 28 11:28:20 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 28 Apr 2011 14:58:20 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <1303981704.1942.364.camel@localhost> (Kenneth Gonsalves's message of "Thu, 28 Apr 2011 14:38:24 +0530") References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> <1303976955.1942.363.camel@localhost> <87tydi6buh.fsf@gmail.com> <1303981704.1942.364.camel@localhost> Message-ID: <87mxja67yj.fsf@gmail.com> On Thu, Apr 28 2011, Kenneth Gonsalves wrote: > On Thu, 2011-04-28 at 13:34 +0530, Noufal Ibrahim wrote: >> > I have tried to learn emacs several times - each time ending in >> > failure and frustration >> >> Fair enough. The ReST mode for Emacs' is really excellent though >> especially for large amounts of editing. > > yum install emacs On Ubuntu, the Emacs mode comes along with the python-docutils package. I don't know how it is for Fedora. http://docutils.sourceforge.net/docs/user/emacs.html has details on all it's capabilities. -- From lawgon at gmail.com Fri Apr 29 08:16:19 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Fri, 29 Apr 2011 11:46:19 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <87mxja67yj.fsf@gmail.com> References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> <1303976955.1942.363.camel@localhost> <87tydi6buh.fsf@gmail.com> <1303981704.1942.364.camel@localhost> <87mxja67yj.fsf@gmail.com> Message-ID: <1304057779.1942.390.camel@localhost> On Thu, 2011-04-28 at 14:58 +0530, Noufal Ibrahim wrote: > > yum install emacs > > On Ubuntu, the Emacs mode comes along with the python-docutils > package. I don't know how it is for Fedora. in fedora the ReSt thingie is there by default -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From noufal at gmail.com Fri Apr 29 08:59:05 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 29 Apr 2011 12:29:05 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <1304057779.1942.390.camel@localhost> (Kenneth Gonsalves's message of "Fri, 29 Apr 2011 11:46:19 +0530") References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> <1303976955.1942.363.camel@localhost> <87tydi6buh.fsf@gmail.com> <1303981704.1942.364.camel@localhost> <87mxja67yj.fsf@gmail.com> <1304057779.1942.390.camel@localhost> Message-ID: <87wridfsqu.fsf@gmail.com> On Fri, Apr 29 2011, Kenneth Gonsalves wrote: > On Thu, 2011-04-28 at 14:58 +0530, Noufal Ibrahim wrote: >> > yum install emacs >> >> On Ubuntu, the Emacs mode comes along with the python-docutils >> package. I don't know how it is for Fedora. > > in fedora the ReSt thingie is there by default Opening files with a .rst prefix should enable to mode automatically. -- From lawgon at gmail.com Fri Apr 29 09:06:50 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Fri, 29 Apr 2011 12:36:50 +0530 Subject: [BangPypers] editor for restructured text In-Reply-To: <87wridfsqu.fsf@gmail.com> References: <1303973137.1942.360.camel@localhost> <87y62u6dmr.fsf@gmail.com> <1303976955.1942.363.camel@localhost> <87tydi6buh.fsf@gmail.com> <1303981704.1942.364.camel@localhost> <87mxja67yj.fsf@gmail.com> <1304057779.1942.390.camel@localhost> <87wridfsqu.fsf@gmail.com> Message-ID: <1304060810.1942.394.camel@localhost> On Fri, 2011-04-29 at 12:29 +0530, Noufal Ibrahim wrote: > > in fedora the ReSt thingie is there by default > > Opening files with a .rst prefix should enable to mode automatically. yes - w00t -- regards Kenneth Gonsalves http://lawgon.livejournal.com/ From baiju.m.mail at gmail.com Sat Apr 30 17:46:11 2011 From: baiju.m.mail at gmail.com (Baiju M) Date: Sat, 30 Apr 2011 21:16:11 +0530 Subject: [BangPypers] Fwd: [pypy-dev] PyPy 1.5 released In-Reply-To: References: Message-ID: Forwarding PyPy 1.5 release announcement. ---------- Forwarded message ---------- From: Armin Rigo Date: Sat, Apr 30, 2011 at 8:34 PM Subject: [pypy-dev] PyPy 1.5 released To: PyPy Dev , python-announce-list at python.org ====================== PyPy 1.5: Catching Up ====================== We're pleased to announce the 1.5 release of PyPy. This release updates PyPy with the features of CPython 2.7.1, including the standard library. Thus all the features of `CPython 2.6`_ and `CPython 2.7`_ are now supported. It also contains additional performance improvements. You can download it here: ? ?http://pypy.org/download.html What is PyPy? ============= PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7.1. It's fast (`pypy 1.5 and cpython 2.6.2`_ performance comparison) due to its integrated tracing JIT compiler. This release includes the features of CPython 2.6 and 2.7. It also includes a large number of small improvements to the tracing JIT compiler. It supports Intel machines running Linux 32/64 or Mac OS X. ?Windows is beta (it roughly works but a lot of small issues have not been fixed so far). ?Windows 64 is not yet supported. Numerous speed achievements are described on `our blog`_. Normalized speed charts comparing `pypy 1.5 and pypy 1.4`_ as well as `pypy 1.5 and cpython 2.6.2`_ are available on our benchmark website. The speed improvement over 1.4 seems to be around 25% on average. More highlights =============== - The largest change in PyPy's tracing JIT is adding support for `loop invariant ?code motion`_, which was mostly done by H?kan Ard?. This feature improves the ?performance of tight loops doing numerical calculations. - The CPython extension module API has been improved and now supports many more ?extensions. For information on which one are supported, please refer to our ?`compatibility wiki`_. - These changes make it possible to support `Tkinter and IDLE`_. - The `cProfile`_ profiler is now working with the JIT. However, it skews the ?performance in unstudied ways. Therefore it is not yet usable to analyze ?subtle performance problems (the same is true for CPython of course). - There is an `external fork`_ which includes an RPython version of the ?``postgresql``. ?However, there are no prebuilt binaries for this. - Our developer documentation was moved to Sphinx and cleaned up. ?(click 'Dev Site' on http://pypy.org/ .) - and many small things :-) Cheers, Carl Friedrich Bolz, Laura Creighton, Antonio Cuni, Maciej Fijalkowski, Amaury Forgeot d'Arc, Alex Gaynor, Armin Rigo and the PyPy team .. _`CPython 2.6`: http://docs.python.org/dev/whatsnew/2.6.html .. _`CPython 2.7`: http://docs.python.org/dev/whatsnew/2.7.html .. _`our blog`: http://morepypy.blogspot.com .. _`pypy 1.5 and pypy 1.4`: http://bit.ly/joPhHo .. _`pypy 1.5 and cpython 2.6.2`: http://bit.ly/mbVWwJ .. _`loop invariant code motion`: http://morepypy.blogspot.com/2011/01/loop-invariant-code-motion.html .. _`compatibility wiki`: https://bitbucket.org/pypy/compatibility/wiki/Home .. _`Tkinter and IDLE`: http://morepypy.blogspot.com/2011/04/using-tkinter-and-idle-with-pypy.html .. _`cProfile`: http://docs.python.org/library/profile.html .. _`external fork`: https://bitbucket.org/alex_gaynor/pypy-postgresql _______________________________________________ pypy-dev at codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev