From ashok at parliaments.info Thu Jun 4 10:59:15 2009 From: ashok at parliaments.info (Ashok Hariharan) Date: Thu, 4 Jun 2009 11:59:15 +0300 Subject: [BangPypers] [JOB] UN vacancy for Python Developer Message-ID: There is a official United Nations vacancy for a python developer in Nairobi (Kenya). Please click the link below for details (you can apply online on the same link). Kindly contact me off-list if you need any clarifications or more information. regds Ashok Hariharan From swtest123 at gmail.com Thu Jun 4 11:29:35 2009 From: swtest123 at gmail.com (testing123 test) Date: Thu, 4 Jun 2009 14:59:35 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python Message-ID: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Hi all, I am prasad.I need a help to write a python script to compare two XML Files.Is there any tutorial.Should we include any library?Please help me How to start? Rgds, Prasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From venkat83 at gmail.com Thu Jun 4 11:32:46 2009 From: venkat83 at gmail.com (Venkatraman S) Date: Thu, 4 Jun 2009 15:02:46 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python In-Reply-To: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> References: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Message-ID: On Thu, Jun 4, 2009 at 2:59 PM, testing123 test wrote: > I am prasad.I need a help to write a python script to compare two > XML Files.Is there any tutorial.Should we include any library?Please help me > How to start? > It is a structured document! Please use some basic CS skills. -V- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruchiryshukla at gmail.com Thu Jun 4 11:37:45 2009 From: ruchiryshukla at gmail.com (Ruchir Shukla) Date: Thu, 4 Jun 2009 15:07:45 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python In-Reply-To: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> References: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Message-ID: import difflib f=open('text1.txt','rb') text1=f.read() f.close() f=open('text2.txt','rb') text2=f.read() f.close() #print text1 #print text2 text1_lines = text1.splitlines(1) text2_lines = text2.splitlines(1) d = difflib.HtmlDiff() diff = d.make_file(text1_lines, text2_lines) print diff To find difference this program and *"difflib"* library can help you HtmlDiff will return the HTML format of the comparison. if u are looking for output in plain text format then following can help you. import difflib d = difflib.Differ() diff = d.compare(text1_lines, text2_lines) On Thu, Jun 4, 2009 at 2:59 PM, testing123 test wrote: > Hi all, > I am prasad.I need a help to write a python script to compare two > XML Files.Is there any tutorial.Should we include any library?Please help me > How to start? > > Rgds, > Prasad > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- ------------------------------ Thanking You Ruchir Shukla -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Thu Jun 4 11:43:05 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 4 Jun 2009 15:13:05 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python In-Reply-To: References: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Message-ID: <8548c5f30906040243m3986dd09t845d58bb6fc92ac5@mail.gmail.com> On Thu, Jun 4, 2009 at 3:02 PM, Venkatraman S wrote: > On Thu, Jun 4, 2009 at 2:59 PM, testing123 test wrote: > >> I am prasad.I need a help to write a python script to compare two >> XML Files.Is there any tutorial.Should we include any library?Please help me >> How to start? > > What do you want to do while comparing two XML files ? Do you want to validate that both XML files are the same, i.e result in the same DOM ? Or do you want to compare only some top-level elements ? Give us the context of the problem. Please don't CC xml-sig on routine XML programming stuff. You will probably get flamed/charred beyond recognition. > >> > It is a structured document! Please use some basic CS skills. > > -V- > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From venkat83 at gmail.com Thu Jun 4 11:50:56 2009 From: venkat83 at gmail.com (Venkatraman S) Date: Thu, 4 Jun 2009 15:20:56 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python In-Reply-To: References: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Message-ID: On Thu, Jun 4, 2009 at 3:07 PM, Ruchir Shukla wrote: > import difflib > f=open('text1.txt','rb') > text1=f.read() > f.close() > f=open('text2.txt','rb') > text2=f.read() > f.close() > #print text1 > #print text2 > text1_lines = text1.splitlines(1) > text2_lines = text2.splitlines(1) > d = difflib.HtmlDiff() > > diff = d.make_file(text1_lines, text2_lines) > print diff > > > To find difference this program and *"difflib"* library can help you > HtmlDiff will return the HTML format of the comparison. > > if u are looking for output in plain text format then following can help > you. > > import difflib > d = difflib.Differ() > diff = d.compare(text1_lines, text2_lines) > Do NOT spoonfeed! *sigh* -V- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruchiryshukla at gmail.com Thu Jun 4 12:10:10 2009 From: ruchiryshukla at gmail.com (Ruchir Shukla) Date: Thu, 4 Jun 2009 15:40:10 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python In-Reply-To: References: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Message-ID: okay sorry :) will keep in mind On Thu, Jun 4, 2009 at 3:20 PM, Venkatraman S wrote: > On Thu, Jun 4, 2009 at 3:07 PM, Ruchir Shukla wrote: > >> import difflib >> f=open('text1.txt','rb') >> text1=f.read() >> f.close() >> f=open('text2.txt','rb') >> text2=f.read() >> f.close() >> #print text1 >> #print text2 >> text1_lines = text1.splitlines(1) >> text2_lines = text2.splitlines(1) >> d = difflib.HtmlDiff() >> >> diff = d.make_file(text1_lines, text2_lines) >> print diff >> >> >> To find difference this program and *"difflib"* library can help you >> HtmlDiff will return the HTML format of the comparison. >> >> if u are looking for output in plain text format then following can help >> you. >> >> import difflib >> d = difflib.Differ() >> diff = d.compare(text1_lines, text2_lines) >> > > > Do NOT spoonfeed! *sigh* > > -V- > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- ------------------------------ Ruchir Shukla -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Thu Jun 4 12:22:37 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Thu, 4 Jun 2009 15:52:37 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python In-Reply-To: References: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Message-ID: <5ead360a0906040322m10c18877je9d078b9ea0c0e60@mail.gmail.com> Hello, My name is Jayanth. I am new to BangPypers and Python in general. I have been working on Ruby however so I am not lost or anything. I wanted to point out that on ruby-lang several posters from India seem to have no concept of how to phrase questions. They also lack the basic curiosity to try common things before they go asking around for answers. I've pondered for a long time why this phenomenon is particularly large here whereas nearly everywhere else, even in countries where English is a non-native language, people actually stick to basic etiquette. Either the proportion of posters who ask for answers outright is really high from India, or I am just being overly critical. What do you feel are some of the reasons for this? Thank you, Jayanth On Thu, Jun 4, 2009 at 3:40 PM, Ruchir Shukla wrote: > okay sorry :) > will keep in mind > > On Thu, Jun 4, 2009 at 3:20 PM, Venkatraman S wrote: > >> On Thu, Jun 4, 2009 at 3:07 PM, Ruchir Shukla wrote: >> >>> import difflib >>> f=open('text1.txt','rb') >>> text1=f.read() >>> f.close() >>> f=open('text2.txt','rb') >>> text2=f.read() >>> f.close() >>> #print text1 >>> #print text2 >>> text1_lines = text1.splitlines(1) >>> text2_lines = text2.splitlines(1) >>> d = difflib.HtmlDiff() >>> >>> diff = d.make_file(text1_lines, text2_lines) >>> print diff >>> >>> >>> To find difference this program and *"difflib"* library can help you >>> HtmlDiff will return the HTML format of the comparison. >>> >>> if u are looking for output in plain text format then following can help >>> you. >>> >>> import difflib >>> d = difflib.Differ() >>> diff = d.compare(text1_lines, text2_lines) >>> >> >> >> Do NOT spoonfeed! *sigh* >> >> -V- >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > > -- > ------------------------------ > Ruchir Shukla > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From swtest123 at gmail.com Thu Jun 4 13:00:40 2009 From: swtest123 at gmail.com (testing123 test) Date: Thu, 4 Jun 2009 16:30:40 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 1 In-Reply-To: References: Message-ID: <8f7c146d0906040400r48ba3af3g45ff70ed2c653c80@mail.gmail.com> Hi Venkatraman, Yes,My requirement is to compait 2 XML Files are same or not. Please help me in this regard. Rgds, Prasad On Thu, Jun 4, 2009 at 3:20 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. [JOB] UN vacancy for Python Developer (Ashok Hariharan) > 2. Regarding 2 XML Files Comparision using Python (testing123 test) > 3. Re: Regarding 2 XML Files Comparision using Python (Venkatraman S) > 4. Re: Regarding 2 XML Files Comparision using Python (Ruchir Shukla) > 5. Re: Regarding 2 XML Files Comparision using Python > (Anand Balachandran Pillai) > 6. Re: Regarding 2 XML Files Comparision using Python (Venkatraman S) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 4 Jun 2009 11:59:15 +0300 > From: Ashok Hariharan > To: bangalore python-ug list > Subject: [BangPypers] [JOB] UN vacancy for Python Developer > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > There is a official United Nations vacancy for a python developer in > Nairobi (Kenya). > > Please click the link below for details (you can apply online on the same > link). > > < > https://jobs.un.org/Galaxy/Release3/Vacancy/Display_Vac.aspx?lang=1200&VACID=9b6c586f-4cc9-4090-8e20-a81da9c32eb4 > > > > Kindly contact me off-list if you need any clarifications or more > information. > > regds > > Ashok Hariharan > > > ------------------------------ > > Message: 2 > Date: Thu, 4 Jun 2009 14:59:35 +0530 > From: testing123 test > To: bangpypers at python.org > Cc: xml-sig at python.org > Subject: [BangPypers] Regarding 2 XML Files Comparision using Python > Message-ID: > <8f7c146d0906040229i2d8a0a46i70a01886d119543d at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > I am prasad.I need a help to write a python script to compare two XML > Files.Is there any tutorial.Should we include any library?Please help me > How > to start? > > Rgds, > Prasad > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/bangpypers/attachments/20090604/31dceacd/attachment-0001.htm > > > > ------------------------------ > > Message: 3 > Date: Thu, 4 Jun 2009 15:02:46 +0530 > From: Venkatraman S > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using > Python > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On Thu, Jun 4, 2009 at 2:59 PM, testing123 test >wrote: > > > I am prasad.I need a help to write a python script to compare two > > XML Files.Is there any tutorial.Should we include any library?Please help > me > > How to start? > > > > It is a structured document! Please use some basic CS skills. > > -V- > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/bangpypers/attachments/20090604/aefe647d/attachment-0001.htm > > > > ------------------------------ > > Message: 4 > Date: Thu, 4 Jun 2009 15:07:45 +0530 > From: Ruchir Shukla > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using > Python > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > import difflib > f=open('text1.txt','rb') > text1=f.read() > f.close() > f=open('text2.txt','rb') > text2=f.read() > f.close() > #print text1 > #print text2 > text1_lines = text1.splitlines(1) > text2_lines = text2.splitlines(1) > d = difflib.HtmlDiff() > > diff = d.make_file(text1_lines, text2_lines) > print diff > > > To find difference this program and *"difflib"* library can help you > HtmlDiff will return the HTML format of the comparison. > > if u are looking for output in plain text format then following can help > you. > > import difflib > d = difflib.Differ() > diff = d.compare(text1_lines, text2_lines) > > On Thu, Jun 4, 2009 at 2:59 PM, testing123 test > wrote: > > > Hi all, > > I am prasad.I need a help to write a python script to compare two > > XML Files.Is there any tutorial.Should we include any library?Please help > me > > How to start? > > > > Rgds, > > Prasad > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > -- > ------------------------------ > Thanking You > Ruchir Shukla > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/bangpypers/attachments/20090604/f8905c73/attachment-0001.htm > > > > ------------------------------ > > Message: 5 > Date: Thu, 4 Jun 2009 15:13:05 +0530 > From: Anand Balachandran Pillai > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using > Python > Message-ID: > <8548c5f30906040243m3986dd09t845d58bb6fc92ac5 at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > On Thu, Jun 4, 2009 at 3:02 PM, Venkatraman S wrote: > > > On Thu, Jun 4, 2009 at 2:59 PM, testing123 test >wrote: > > > >> I am prasad.I need a help to write a python script to compare two > >> XML Files.Is there any tutorial.Should we include any library?Please > help me > >> How to start? > > > > > What do you want to do while comparing two XML files ? Do you want to > validate that both XML files are the same, i.e result in the same > DOM ? Or do you want to compare only some top-level elements ? > Give us the context of the problem. > > Please don't CC xml-sig on routine XML programming stuff. > You will probably get flamed/charred beyond recognition. > > > > > > > >> > > It is a structured document! Please use some basic CS skills. > > > > -V- > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > > -- > -Anand > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/bangpypers/attachments/20090604/4f3c6b3a/attachment-0001.htm > > > > ------------------------------ > > Message: 6 > Date: Thu, 4 Jun 2009 15:20:56 +0530 > From: Venkatraman S > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using > Python > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On Thu, Jun 4, 2009 at 3:07 PM, Ruchir Shukla >wrote: > > > import difflib > > f=open('text1.txt','rb') > > text1=f.read() > > f.close() > > f=open('text2.txt','rb') > > text2=f.read() > > f.close() > > #print text1 > > #print text2 > > text1_lines = text1.splitlines(1) > > text2_lines = text2.splitlines(1) > > d = difflib.HtmlDiff() > > > > diff = d.make_file(text1_lines, text2_lines) > > print diff > > > > > > To find difference this program and *"difflib"* library can help you > > HtmlDiff will return the HTML format of the comparison. > > > > if u are looking for output in plain text format then following can help > > you. > > > > import difflib > > d = difflib.Differ() > > diff = d.compare(text1_lines, text2_lines) > > > > > Do NOT spoonfeed! *sigh* > > -V- > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/bangpypers/attachments/20090604/06fbfb95/attachment.htm > > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 22, Issue 1 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gora at srijan.in Thu Jun 4 13:07:08 2009 From: gora at srijan.in (Gora Mohanty) Date: Thu, 4 Jun 2009 16:37:08 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 1 In-Reply-To: <8f7c146d0906040400r48ba3af3g45ff70ed2c653c80@mail.gmail.com> References: <8f7c146d0906040400r48ba3af3g45ff70ed2c653c80@mail.gmail.com> Message-ID: <20090604163708.67d39e5d@anubis> On Thu, 4 Jun 2009 16:30:40 +0530 testing123 test wrote: > Hi Venkatraman, > > Yes,My requirement is to compait 2 XML Files are same or not. > Please help me in this regard. [...] o Use of a weird email address o Ignoring relevant replies o Inability to understand replies o No concept of how to ask questions o Quoting entire digests I smell a troll. Regards, Gora From abpillai at gmail.com Thu Jun 4 13:12:23 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 4 Jun 2009 16:42:23 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 1 In-Reply-To: <20090604163708.67d39e5d@anubis> References: <8f7c146d0906040400r48ba3af3g45ff70ed2c653c80@mail.gmail.com> <20090604163708.67d39e5d@anubis> Message-ID: <8548c5f30906040412k621df97cmce1277b4df52bc24@mail.gmail.com> On Thu, Jun 4, 2009 at 4:37 PM, Gora Mohanty wrote: > On Thu, 4 Jun 2009 16:30:40 +0530 > testing123 test wrote: > > > Hi Venkatraman, > > > > Yes,My requirement is to compait 2 XML Files are same or > not. > > Please help me in this regard. > [...] > > o Use of a weird email address > o Ignoring relevant replies > o Inability to understand replies > o No concept of how to ask questions > o Quoting entire digests > > I smell a troll. Let us not get too harsh in judging a newbie (I know he joined today because I got a request to approve his posting as non-member which I did not). Most likely he is not clued in to the aspects of posting to tech forums. With that, to the O.P. Please make sure that, 1. Try not to reply to digests, if you do trim the post tail. 2. When you ask a question, try giving a richer context, i.e why you want to compare 2 XML files ? For example, quoting the actual problem details would help. 3. When sending a mail to list, try not to address a single person. The etiquette is to address to the list or simply say "Hi". 4. Use a personal email address - swtest123 does not say anything about you. > > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From stallomir at gmail.com Thu Jun 4 13:13:24 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Thu, 4 Jun 2009 16:43:24 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 1 In-Reply-To: <20090604163708.67d39e5d@anubis> References: <8f7c146d0906040400r48ba3af3g45ff70ed2c653c80@mail.gmail.com> <20090604163708.67d39e5d@anubis> Message-ID: Yeah, First really troll-like message I've encountered on this list though. :D On Thu, Jun 4, 2009 at 4:37 PM, Gora Mohanty wrote: > On Thu, 4 Jun 2009 16:30:40 +0530 > testing123 test wrote: > > > Hi Venkatraman, > > > > Yes,My requirement is to compait 2 XML Files are same or > not. > > Please help me in this regard. > [...] > > o Use of a weird email address > o Ignoring relevant replies > o Inability to understand replies > o No concept of how to ask questions > o Quoting entire digests > > I smell a troll. > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stallomir at gmail.com Thu Jun 4 13:14:47 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Thu, 4 Jun 2009 16:44:47 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 1 In-Reply-To: <8548c5f30906040412k621df97cmce1277b4df52bc24@mail.gmail.com> References: <8f7c146d0906040400r48ba3af3g45ff70ed2c653c80@mail.gmail.com> <20090604163708.67d39e5d@anubis> <8548c5f30906040412k621df97cmce1277b4df52bc24@mail.gmail.com> Message-ID: H'm.... In that case, welcome to the newbie...(+what he said) On Thu, Jun 4, 2009 at 4:42 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > > > On Thu, Jun 4, 2009 at 4:37 PM, Gora Mohanty wrote: > >> On Thu, 4 Jun 2009 16:30:40 +0530 >> testing123 test wrote: >> >> > Hi Venkatraman, >> > >> > Yes,My requirement is to compait 2 XML Files are same or >> not. >> > Please help me in this regard. >> [...] >> >> o Use of a weird email address >> o Ignoring relevant replies >> o Inability to understand replies >> o No concept of how to ask questions >> o Quoting entire digests >> >> I smell a troll. > > > Let us not get too harsh in judging a newbie (I know he joined today > because I got a request to approve his posting as non-member which > I did not). Most likely he is not clued in to the aspects of posting to > tech forums. > > With that, to the O.P. Please make sure that, > > 1. Try not to reply to digests, if you do trim the post tail. > 2. When you ask a question, try giving a richer context, > i.e why you want to compare 2 XML files ? For example, > quoting the actual problem details would help. > 3. When sending a mail to list, try not to address a single > person. The etiquette is to address to the list or simply > say "Hi". > 4. Use a personal email address - swtest123 does not > say anything about you. > > >> >> >> Regards, >> Gora >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > -Anand > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From swtest123 at gmail.com Thu Jun 4 09:45:21 2009 From: swtest123 at gmail.com (testing123 test) Date: Thu, 4 Jun 2009 13:15:21 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python Message-ID: <8f7c146d0906040045r3df577e6vf14097697de54c8@mail.gmail.com> Hi all, I am prasad.I need a help to write a python script to compare two XML Files.Is there any tutorial.Should we include any library?Please help me How to start? Rgds, Prasad -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan_ml at behnel.de Thu Jun 4 13:35:16 2009 From: stefan_ml at behnel.de (Stefan Behnel) Date: Thu, 4 Jun 2009 13:35:16 +0200 (CEST) Subject: [BangPypers] [XML-SIG] Regarding 2 XML Files Comparision using Python In-Reply-To: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> References: <8f7c146d0906040229i2d8a0a46i70a01886d119543d@mail.gmail.com> Message-ID: <13f45ea2de40bad6ab3039730ad7442a.squirrel@groupware.dvs.informatik.tu-darmstadt.de> testing123 test wrote: > Hi all, > I am prasad.I need a help to write a python script to compare two XML > Files.Is there any tutorial.Should we include any library?Please help me > How to start? ... by looking at the Python package index? If your XML files are small, you may get away with the xmldiff package. Also, a very simple way to do that is to pretty print your XML files and then run a normal line diff on them. Depends on what you want to achieve with your 'script'. If you need more than that and want to implement it in Python, you may consider using lxml (or cElementTree if you can afford to ignore comments) to parse the two files and then run through the two trees to look for differences. But note that this is not trivial. There is some scientific literature on good algorithms to compare XML tree structures. Note that lxml.html comes with an HTML diff algorithm, which you can look at for inspiration. Stefan From abpillai at gmail.com Thu Jun 4 15:18:32 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Thu, 4 Jun 2009 18:48:32 +0530 Subject: [BangPypers] Regarding 2 XML Files Comparision using Python In-Reply-To: <8f7c146d0906040045r3df577e6vf14097697de54c8@mail.gmail.com> References: <8f7c146d0906040045r3df577e6vf14097697de54c8@mail.gmail.com> Message-ID: <8548c5f30906040618o32c20dbej56786686515e1189@mail.gmail.com> On Thu, Jun 4, 2009 at 1:15 PM, testing123 test wrote: > Hi all, > I am prasad.I need a help to write a python script to compare two > XML Files.Is there any tutorial.Should we include any library?Please help me > How to start? > Are you a bot or something ? Why do you keep repeating the same stuff again and again ? If you are some hacker testing a bot on this list, it is not very funny. > > > Rgds, > Prasad > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From srinivasaenergy at gmail.com Fri Jun 5 16:30:11 2009 From: srinivasaenergy at gmail.com (srinivasa rao) Date: Fri, 5 Jun 2009 20:00:11 +0530 Subject: [BangPypers] PyCon India website admin needed! In-Reply-To: <9963e56e0905300529n24bf45f5rd860fbc5a9e3d453@mail.gmail.com> References: <9963e56e0905290459n636d35cak3668c832a99a402e@mail.gmail.com> <9963e56e0905300529n24bf45f5rd860fbc5a9e3d453@mail.gmail.com> Message-ID: Dear sir I am in bangalore and to set up internet so i start work for you i hope i get a support from you thanks yours truly srinivasa rao m On Sat, May 30, 2009 at 5:59 PM, Noufal Ibrahim wrote: > Hi Sriinivas, > Please join the inpycon list. There are lots of things for which we > need volunteers. As we move forwards, things will keep coming up and > it would be wonderful to have people interested in contributing then. > > Thanks. > -- > ~noufal > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Sat Jun 6 06:53:44 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Sat, 6 Jun 2009 10:23:44 +0530 Subject: [BangPypers] PyCon India website admin needed! In-Reply-To: References: <9963e56e0905290459n636d35cak3668c832a99a402e@mail.gmail.com> <9963e56e0905300529n24bf45f5rd860fbc5a9e3d453@mail.gmail.com> Message-ID: <8548c5f30906052153i4239b6aaubcb86b41d32b3d27@mail.gmail.com> On Fri, Jun 5, 2009 at 8:00 PM, srinivasa rao wrote: > Dear sir > I am in bangalore and to set up internet so i start work for you i hope i > get a support from you > thanks > yours truly > srinivasa rao m > If you are interested, please join the inpycon list. The list can be accessed at http://mail.python.org/mailman/listinfo/*inpycon* > > > On Sat, May 30, 2009 at 5:59 PM, Noufal Ibrahim wrote: > >> Hi Sriinivas, >> Please join the inpycon list. There are lots of things for which we >> need volunteers. As we move forwards, things will keep coming up and >> it would be wonderful to have people interested in contributing then. >> >> Thanks. >> -- >> ~noufal >> _______________________________________________ >> 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 > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsapre80 at gmail.com Sun Jun 7 21:37:11 2009 From: vsapre80 at gmail.com (Vishal) Date: Mon, 8 Jun 2009 01:07:11 +0530 Subject: [BangPypers] How to create Debug and Release code in Python Message-ID: Hello, We would like to have debug and release versions of our scripts. However since the scripts are directly used by the 'users' and they are not real software guys...maintaining two different scripts and then keeping them synchronized across 15-20 workstations etc is not something that the management wants. Scripts are complex enough that we cannot abstract out all the variables into config files....which might have been easier for users (just change parameters in a config file) *Is there a way to create a conditionally compilable Python script ?* Some facility that would prevent from code getting compiled into ".pyc"....something like the old #ifdef #endif preprocessor directives....is there a Python preprocessory available :) if thats doable I can ask them to make all experimental modifications within the conditional directives. I could still ask them to do that using simple if's and bool parameters, however, putting too many ifs might degrade the performance of these scripts. ("the lesser the branches the better it is for processor performance...more so for super scalar processors") We cannot use the, often unknown, __debug__ flag, because our users would like to simply double-click on a python file, which means to use the -O or -OO options (which sets __debug__ to False) we'd have to make windows python command line have these, and then double clicking would be of no use if you want the run stuff inside the __debug__. Any and every help is most welcome :) Thanks and best regards, Vishal Sapre On Wed, May 27, 2009 at 1:25 PM, Sam's Lists wrote: > Anand--- > > Thanks, that worked great. > > -Sam > > > On Tue, May 26, 2009 at 7:34 PM, Anand Chitipothu wrote: > >> > text = "The Price ?7" >> > pattern = u"?\d" >> > >> > m = re.search(pattern, text, re.UNICODE) >> > print m.group(0) >> >> Your text is in utf-8 encoding and pattern in unicode. >> Make text unicode solves the issue. >> >> text = u"The Price ?7" >> pattern = u"?\d" >> m = re.search(pattern, text, re.UNICODE) >> print m.group(0).encode('utf-8') >> >> Anand >> _______________________________________________ >> 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 and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." -------------- next part -------------- An HTML attachment was scrubbed... URL: From sidharth.kuruvila at gmail.com Mon Jun 8 00:08:57 2009 From: sidharth.kuruvila at gmail.com (Sidharth Kuruvila) Date: Mon, 8 Jun 2009 03:38:57 +0530 Subject: [BangPypers] How to create Debug and Release code in Python In-Reply-To: References: Message-ID: <2ab2ed550906071508ydfbade7rf6829c28a4c2f746@mail.gmail.com> Hi, You could try the C preprocessor. Personally, I'd just go for python's inbult logging framework, and worry about the performance issue later. Regards On Mon, Jun 8, 2009 at 1:07 AM, Vishal wrote: > Hello, > We would like to have debug and release versions of our scripts. However > since the scripts are directly used by the 'users' and they are not real > software guys...maintaining two different scripts and then keeping them > synchronized across 15-20 workstations etc is not something that the > management wants. > Scripts are complex enough that we cannot abstract out all the variables > into config files....which might have been easier for users (just change > parameters in a config file) > > *Is there a way to create a conditionally compilable Python script ?* Some > facility that would prevent from code getting compiled into > ".pyc"....something like the old #ifdef #endif preprocessor directives....is > there a Python preprocessory available :) > > if thats doable I can ask them to make all experimental modifications > within the conditional directives. I could still ask them to do that using > simple if's and bool parameters, however, putting too many ifs might degrade > the performance of these scripts. ("the lesser the branches the better it is > for processor performance...more so for super scalar processors") > > We cannot use the, often unknown, __debug__ flag, because our users would > like to simply double-click on a python file, which means to use the -O or > -OO options (which sets __debug__ to False) we'd have to make windows python > command line have these, and then double clicking would be of no use if you > want the run stuff inside the __debug__. > > Any and every help is most welcome :) > > Thanks and best regards, > Vishal Sapre > > On Wed, May 27, 2009 at 1:25 PM, Sam's Lists wrote: > >> Anand--- >> >> Thanks, that worked great. >> >> -Sam >> >> >> On Tue, May 26, 2009 at 7:34 PM, Anand Chitipothu wrote: >> >>> > text = "The Price ?7" >>> > pattern = u"?\d" >>> > >>> > m = re.search(pattern, text, re.UNICODE) >>> > print m.group(0) >>> >>> Your text is in utf-8 encoding and pattern in unicode. >>> Make text unicode solves the issue. >>> >>> text = u"The Price ?7" >>> pattern = u"?\d" >>> m = re.search(pattern, text, re.UNICODE) >>> print m.group(0).encode('utf-8') >>> >>> Anand >>> _______________________________________________ >>> 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 and best regards, > Vishal Sapre > > --- > > "So say...Day by day, in every way, I am getting better, better and better > !!!" > "A Strong and Positive attitude creates more miracles than anything else. > Because...Life is 10% how you make it, and 90% how you take it" > "Diamond is another piece of coal that did well under pressure? > "Happiness keeps u Sweet, Trials keep u Strong, > Sorrow keeps u Human, Failure Keeps u Humble, > Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- I am but a man. -------------- next part -------------- An HTML attachment was scrubbed... URL: From orsenthil at gmail.com Mon Jun 8 18:18:50 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 8 Jun 2009 21:48:50 +0530 Subject: [BangPypers] problems while using pexpect. pexpect.TIMEOUT always... Message-ID: <20090608161850.GA20698@ubuntu.ubuntu-domain> I have been trying to use pexpect and I am failing with pexpect.TIMEOUT for all my attempts. In order to troubleshoot, I decided to go with simplest possible one. Here is my ssh to localhost: [21:29:14 senthil]$ssh localhost -l senthil senthil at localhost's password: senthil at ubuntu:~$ And here is my pexpect script: http://paste.pocoo.org/show/121788/ And the output I get is: True None None Traceback (most recent call last): File "4.py", line 17, in print child.read() File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 858, in read self.expect (self.delimiter) # delimiter default is EOF File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1311, in expect return self.expect_list(compiled_pattern_list, timeout, searchwindowsize) File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1325, in expect_list return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize) File "/usr/local/lib/python2.6/site-packages/pexpect.py", line 1409, in expect_loop raise TIMEOUT (str(e) + '\n' + str(self)) pexpect.TIMEOUT: Timeout exceeded in read_nonblocking(). Complete Traceback is here: http://paste.pocoo.org/show/121790/ Which shows that command is executed. Can someone help me pointing out what I am doing wrong here? Why is not working for such a simple thing as ssh to my localhost.? Thanks, Senthil From gora at srijan.in Mon Jun 8 19:09:00 2009 From: gora at srijan.in (Gora Mohanty) Date: Mon, 8 Jun 2009 22:39:00 +0530 Subject: [BangPypers] problems while using pexpect. pexpect.TIMEOUT always... In-Reply-To: <20090608161850.GA20698@ubuntu.ubuntu-domain> References: <20090608161850.GA20698@ubuntu.ubuntu-domain> Message-ID: <20090608223901.60932d69@anubis> On Mon, 8 Jun 2009 21:48:50 +0530 Senthil Kumaran wrote: > I have been trying to use pexpect and I am failing with > pexpect.TIMEOUT for all my attempts. In order to troubleshoot, I > decided to go with simplest possible one. > > Here is my ssh to localhost: > > [21:29:14 senthil]$ssh localhost -l senthil > senthil at localhost's password: > senthil at ubuntu:~$ > > And here is my pexpect script: > > http://paste.pocoo.org/show/121788/ I am not very familiar with pexpect, but from what I remember of Expect, there are a couple of issues here: o You should be using p.expect() instead of time.sleep() o After issuing a 'fortune' command you should be expecting a shell prompt. o You should explicitly close the connection by logging out Please see http://paste.pocoo.org/show/121800/ where I have used 'ls' instead of 'fortune' as I did not have the latter installed. The pattern matches anything, i.e., whatever be the shell prompt, and child.expect also matches EOF. Regards, Gora From orsenthil at gmail.com Mon Jun 8 19:38:43 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 8 Jun 2009 23:08:43 +0530 Subject: [BangPypers] problems while using pexpect. pexpect.TIMEOUT always... In-Reply-To: <20090608223901.60932d69@anubis> References: <20090608161850.GA20698@ubuntu.ubuntu-domain> <20090608223901.60932d69@anubis> Message-ID: <20090608173842.GA4482@ubuntu.ubuntu-domain> On Mon, Jun 08, 2009 at 10:39:00PM +0530, Gora Mohanty wrote: > > And here is my pexpect script: > > > > http://paste.pocoo.org/show/121788/ > > I am not very familiar with pexpect, but from what I remember > of Expect, there are a couple of issues here: > o You should be using p.expect() instead of time.sleep() > o After issuing a 'fortune' command you should be expecting a > shell prompt. > o You should explicitly close the connection by logging out Thank you, Gora. Yes, the main problem was the need to 'explicitly close the connection by doing a logout'. I agree with point 1 too; but I read in some discussion that perhaps read() was sending request too soon, so I had placed time.sleep() at various places... illogically before sendline too. > Please see http://paste.pocoo.org/show/121800/ where I have used > 'ls' instead of 'fortune' as I did not have the latter installed. > The pattern matches anything, i.e., whatever be the shell prompt, > and child.expect also matches EOF. Yes, this way worked; Adding child.sendline('logout') before I did child.read() in the original script also worked. I got to check with pexpect a little more to see if I can just get the output of a command only instead of the whole session. Paramiko, is a good module to with ssh related stuff in python, but unfortunately that is not pure python, So bundling as an option gets ruled out. -- Senthil From noufal at gmail.com Wed Jun 10 04:56:22 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Wed, 10 Jun 2009 08:26:22 +0530 Subject: [BangPypers] [commercial] : Stratbeans consulting looking for a python/PHP programmer Message-ID: <9963e56e0906091956x1912b441ye84ce35db984d964@mail.gmail.com> Hello everyone, My close buddy's company Stratbeans consulting is looking for an entry level Python/PHP programmer. They are a consulting firm and the work will mostly be web related and training. If anyone's interested, please send your resume to techjobs at stratbeans.com Thanks, -- ~noufal From aman.coe at gmail.com Wed Jun 10 13:27:39 2009 From: aman.coe at gmail.com (Aman Aggarwal) Date: Wed, 10 Jun 2009 16:57:39 +0530 Subject: [BangPypers] [New bie question ] Clarification on "Multiply" operator applied to list(data structure) In-Reply-To: <882494550906100413y35e652b3m858271d77ea68fee@mail.gmail.com> References: <882494550906100413y35e652b3m858271d77ea68fee@mail.gmail.com> Message-ID: <882494550906100427x1a99ac60h9540f04cc656a13e@mail.gmail.com> Hello there I am reading?"How to think like a computer scientist"?which is an introductory test in Python. I wanna clarify the behaviour of multiply operator(*) when applied to list(data structure). Consider the function?make_matrix def make_matrix(rows, columns): """ ? >>> make_matrix(4, 2) ? [[0, 0], [0, 0], [0, 0], [0, 0]] ? >>> m = make_matrix(4, 2) ? >>> m[1][1] = 7 ? >>> m ? [[0, 0], [0, 7], [0, 0], [0, 0]] """ return [[0] * columns] * rows The actual output is [[0, 7], [0, 7], [0, 7], [0, 7]] The correct version of?make_matrix?is : def make_matrix(rows, columns): """ ? >>> make_matrix(3, 5) ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] ? >>> make_matrix(4, 2) ? [[0, 0], [0, 0], [0, 0], [0, 0]] ? >>> m = make_matrix(4, 2) ? >>> m[1][1] = 7 ? >>> m ? [[0, 0], [0, 7], [0, 0], [0, 0]] """ matrix = [] for row in range(rows): ? ? matrix += [[0] * columns] return matrix The reason why first version of?make_matrix?fails ( as explained in the book at 9.8 ) is that "...each row is an alias of the other rows..." I wonder why [[0] * columns] * rows causes?"...each row is an alias of the other rows..." but not [[0] * columns] i.e. why each [0] in a row is not an alias of other row element. /* ?Everything worth doing is worth doing in excess */ From orsenthil at gmail.com Wed Jun 10 16:15:20 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Wed, 10 Jun 2009 19:45:20 +0530 Subject: [BangPypers] [New bie question ] Clarification on "Multiply" operator applied to list(data structure) In-Reply-To: <882494550906100427x1a99ac60h9540f04cc656a13e@mail.gmail.com> References: <882494550906100413y35e652b3m858271d77ea68fee@mail.gmail.com> <882494550906100427x1a99ac60h9540f04cc656a13e@mail.gmail.com> Message-ID: <20090610141520.GB14638@ubuntu.ubuntu-domain> On Wed, Jun 10, 2009 at 04:57:39PM +0530, Aman Aggarwal wrote: > > I am reading?"How to think like a computer scientist"?which is an > introductory test in Python. > > I wanna clarify the behaviour of multiply operator(*) when applied to > list(data structure). > > > I wonder why > > [[0] * columns] * rows > > causes?"...each row is an alias of the other rows..." > > but not > > [[0] * columns] > > i.e. why each [0] in a row is not an alias of other row element. It is bit tricky in that code.. You have to understand that in the second option, the matrix is formed row-by-row, wherein a new row (list) is created as [0] * columns. This is what the second version essentially is doing: >>> rows = 2 >>> cols = 2 >>> mat = [] >>> mat = [[0] * cols] # first row >>> mat = mat + [[0] * cols] # second row >>> mat [[0, 0], [0, 0]] >>> mat[0][0] = 'Spam' >>> mat [['Spam', 0], [0, 0]] >>> This is the what the first version of the code was doing. >>> rows = 2 >>> cols = 2 >>> mat = [] >>> mat = [[0] * cols] # first row >>> mat = mat * 2 # second row >>> mat [[0, 0], [0, 0]] >>> mat[0][0] = 'Spam' >>> mat [['Spam', 0], ['Spam', 0]] >>> Does this clarify your doubt? -- Senthil From shivraj.ms at gmail.com Wed Jun 10 15:07:27 2009 From: shivraj.ms at gmail.com (Shivaraj M S) Date: Wed, 10 Jun 2009 06:07:27 -0700 (PDT) Subject: [BangPypers] [New bie question ] Clarification on "Multiply" operator applied to list(data structure) In-Reply-To: <882494550906100427x1a99ac60h9540f04cc656a13e@mail.gmail.com> References: <882494550906100427x1a99ac60h9540f04cc656a13e@mail.gmail.com> Message-ID: <23961937.post@talk.nabble.com> The first one is a reference and second one is not. case 1: >>> m = [[0]*2]*4 >>> m[1][1]=7 >>> m [[0, 7], [0, 7], [0, 7], [0, 7]] case 2: >>> m=[] >>> for r in range(4): ... m+=[[0]*2] ... >>> m [[0, 0], [0, 0], [0, 0], [0, 0]] >>> m[1][1]=7 >>> m [[0, 0], [0, 7], [0, 0], [0, 0]] We can make the second case look like first just by creating a reference to [[0]*2] which is what was done implicitly when multiplication operator was used. case 2 - modified for reference: >>> m=[] >>> mi = [[0]*2] >>> for r in range(4): ... m+=mi ... >>> m [[0, 0], [0, 0], [0, 0], [0, 0]] >>> mi[0][1]=7 >>> m [[0, 7], [0, 7], [0, 7], [0, 7]] >>> m[1][1]=1 >>> m [[0, 1], [0, 1], [0, 1], [0, 1]] >>> mi [[0, 1]] Aman Aggarwal-4 wrote: > > Hello there > > I am reading?"How to think like a computer scientist"?which is an > introductory test in Python. > > I wanna clarify the behaviour of multiply operator(*) when applied to > list(data structure). > > Consider the function?make_matrix > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > return [[0] * columns] * rows > > > > > The actual output is > > [[0, 7], [0, 7], [0, 7], [0, 7]] > > > > > The correct version of?make_matrix?is : > > > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(3, 5) > ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > matrix = [] > for row in range(rows): > ? ? matrix += [[0] * columns] > return matrix > > > The reason why first version of?make_matrix?fails ( as explained in > the book at 9.8 ) is that > > "...each row is an alias of the other rows..." > > I wonder why > > [[0] * columns] * rows > > causes?"...each row is an alias of the other rows..." > > but not > > [[0] * columns] > > i.e. why each [0] in a row is not an alias of other row element. > > > > > > /* > ?Everything worth doing is worth doing in excess > */ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- View this message in context: http://www.nabble.com/-New-bie-question---Clarification-on-%22Multiply%22-operator-applied-to-list%28data-structure%29-tp23960277p23961937.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From shivraj.ms at gmail.com Wed Jun 10 15:09:16 2009 From: shivraj.ms at gmail.com (Shivaraj M S) Date: Wed, 10 Jun 2009 06:09:16 -0700 (PDT) Subject: [BangPypers] [New bie question ] Clarification on "Multiply" operator applied to list(data structure) In-Reply-To: <882494550906100427x1a99ac60h9540f04cc656a13e@mail.gmail.com> References: <882494550906100427x1a99ac60h9540f04cc656a13e@mail.gmail.com> Message-ID: <23961977.post@talk.nabble.com> The first one is a case of reference/alias and second one is not. case 1: >>> m = [[0]*2]*4 >>> m[1][1]=7 >>> m [[0, 7], [0, 7], [0, 7], [0, 7]] case 2: >>> m=[] >>> for r in range(4): ... m+=[[0]*2] ... >>> m [[0, 0], [0, 0], [0, 0], [0, 0]] >>> m[1][1]=7 >>> m [[0, 0], [0, 7], [0, 0], [0, 0]] We can make the second case look like first just by creating a reference to [[0]*2] which is what was done implicitly when multiplication operator was used. case 2 - modified for reference: >>> m=[] >>> mi = [[0]*2] >>> for r in range(4): ... m+=mi ... >>> m [[0, 0], [0, 0], [0, 0], [0, 0]] >>> mi[0][1]=7 >>> m [[0, 7], [0, 7], [0, 7], [0, 7]] >>> m[1][1]=1 >>> m [[0, 1], [0, 1], [0, 1], [0, 1]] >>> mi [[0, 1]] Aman Aggarwal-4 wrote: > > Hello there > > I am reading?"How to think like a computer scientist"?which is an > introductory test in Python. > > I wanna clarify the behaviour of multiply operator(*) when applied to > list(data structure). > > Consider the function?make_matrix > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > return [[0] * columns] * rows > > > > > The actual output is > > [[0, 7], [0, 7], [0, 7], [0, 7]] > > > > > The correct version of?make_matrix?is : > > > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(3, 5) > ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > matrix = [] > for row in range(rows): > ? ? matrix += [[0] * columns] > return matrix > > > The reason why first version of?make_matrix?fails ( as explained in > the book at 9.8 ) is that > > "...each row is an alias of the other rows..." > > I wonder why > > [[0] * columns] * rows > > causes?"...each row is an alias of the other rows..." > > but not > > [[0] * columns] > > i.e. why each [0] in a row is not an alias of other row element. > > > > > > /* > ?Everything worth doing is worth doing in excess > */ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- View this message in context: http://www.nabble.com/-New-bie-question---Clarification-on-%22Multiply%22-operator-applied-to-list%28data-structure%29-tp23960277p23961977.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From sridhar.ratna at gmail.com Fri Jun 12 06:31:24 2009 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Thu, 11 Jun 2009 21:31:24 -0700 Subject: [BangPypers] Responding to people who lack the curiosity Message-ID: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> On Thu, Jun 4, 2009 at 3:22 AM, Srijayanth Sridhar wrote: > Hello, > > My name is Jayanth. I am new to BangPypers and Python in general. I have > been working on Ruby however so I am not lost or anything. > > I wanted to point out that on ruby-lang several posters from India seem to > have no concept of how to phrase questions. They also lack the basic > curiosity to try common things before they go asking around for answers. > I've pondered for a long time why this phenomenon is particularly large here > whereas nearly everywhere else, even in countries where English is a > non-native language, people actually stick to basic etiquette. > > Either the proportion of posters who ask for answers outright is really high > from India, or I am just being overly critical. What do you feel are some of > the reasons for this? Hi Jayanth, I don't know the reasons either, but would like to know too. I often think the best way to handle such posters is to momentarily divert the topic of the conversation to their own interest-level, curiosity and self-learning . For example, I'd respond to Prasad like this: ??????????????????????????????????????? Hi Prasad, On Thu, Jun 4, 2009 at 2:29 AM, testing123 test wrote: > Hi all, > I am prasad.I need a help to write a python script to compare two XML > Files.Is there any tutorial. Yes, do you want to know? http://www.google.ca/search?q=python+xml+diff+tutorial > Should we include any library? Perhaps, do you want to find out? http://www.google.ca/search?q=python+xml+diff+library > Please help me How > to start? I normally just fucking google it - http://justfuckinggoogleit.com/ ??????????????????????????????????????? Cheers, Sridhar From pradeep at btbytes.com Fri Jun 12 07:31:11 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 12 Jun 2009 01:31:11 -0400 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> Message-ID: <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> On Fri, Jun 12, 2009 at 12:31 AM, Sridhar Ratnakumar wrote: > On Thu, Jun 4, 2009 at 3:22 AM, Srijayanth Sridhar wrote: > I don't know the reasons either, but would like to know too. > > I often think the best way to handle such posters is to momentarily > divert the topic of the conversation to their own interest-level, > curiosity and self-learning . .. I think it's best to ignore mails from users who do not care enough to use their real name/nick while asking questions. The user in question introduced himself as prasad, but we scan mail titles before reading mail content. Most people wouldn't care to read a mail from "testing123 test", let alone answer it. Online forums are just like real life communities, where people judge you by what you say and how you say it. It's hard to relate to a anonymous, faceless name like "testing 123". Use your real name. [1] If the same question is asked by some one who "appears" to be a real person, it might still be worth answering them, at the same time also pointing them to a net etiquette link [2]. In good faith, we can assume that the user in question is really new to using forums/mailing lists etc., Over time, most people do learn how to do their home work and in turn ask smart questions. I'll see whether our membership welcome messages can be improved to reflect this. Happy hacking, Pradeep [1] http://informationarchitects.jp/use-your-real-name-when-you-comment/ [2] http://catb.org/esr/faqs/smart-questions.html From srijayanth at gmail.com Fri Jun 12 08:16:54 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 11:46:54 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> Message-ID: <5ead360a0906112316s54d4d856h6cd1cfe68309bf8b@mail.gmail.com> Good points, but what I am most curious about is why this phenomenon is so prevalent in the Indian dev community and not as pervasive elsewhere. The ruby community is rife with apt examples. The average Indian developer will pop up and demand answers for a really silly Rails question or something. Jayanth On Fri, Jun 12, 2009 at 11:01 AM, Pradeep Gowda wrote: > On Fri, Jun 12, 2009 at 12:31 AM, Sridhar > Ratnakumar wrote: > > On Thu, Jun 4, 2009 at 3:22 AM, Srijayanth Sridhar > wrote: > > > I don't know the reasons either, but would like to know too. > > > > I often think the best way to handle such posters is to momentarily > > divert the topic of the conversation to their own interest-level, > > curiosity and self-learning . > .. > > I think it's best to ignore mails from users who do not care enough to > use their real name/nick while asking questions. The user in question > introduced himself as prasad, but we scan mail titles before reading > mail content. Most people wouldn't care to read a mail from > "testing123 test", let alone answer it. Online > forums are just like real life communities, where people judge you > by what you say and how you say it. It's hard to relate to a > anonymous, faceless name like "testing 123". Use your real name. [1] > > If the same question is asked by some one who "appears" to be a real > person, it might still be worth answering them, at the same time also > pointing them to a net etiquette > link [2]. In good faith, we can assume that the user in question is > really new to using forums/mailing lists etc., > > Over time, most people do learn how to do their home work and in turn > ask smart questions. > > I'll see whether our membership welcome messages can be improved to > reflect this. > > Happy hacking, > Pradeep > > [1] http://informationarchitects.jp/use-your-real-name-when-you-comment/ > [2] http://catb.org/esr/faqs/smart-questions.html > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stallomir at gmail.com Fri Jun 12 08:20:10 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Fri, 12 Jun 2009 11:50:10 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906112316s54d4d856h6cd1cfe68309bf8b@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <5ead360a0906112316s54d4d856h6cd1cfe68309bf8b@mail.gmail.com> Message-ID: Depends upon the focus of the thread as well right? I mean a lot of threads, like this one, will have an overwhelming prevalence of Indian people. Seems to me that labeling the average Indian developer that way just might be a tad unfair. On Fri, Jun 12, 2009 at 11:46 AM, Srijayanth Sridhar wrote: > Good points, but what I am most curious about is why this phenomenon is so > prevalent in the Indian dev community and not as pervasive elsewhere. The > ruby community is rife with apt examples. The average Indian developer will > pop up and demand answers for a really silly Rails question or something. > > Jayanth > > > On Fri, Jun 12, 2009 at 11:01 AM, Pradeep Gowda wrote: > >> On Fri, Jun 12, 2009 at 12:31 AM, Sridhar >> Ratnakumar wrote: >> > On Thu, Jun 4, 2009 at 3:22 AM, Srijayanth Sridhar >> wrote: >> >> > I don't know the reasons either, but would like to know too. >> > >> > I often think the best way to handle such posters is to momentarily >> > divert the topic of the conversation to their own interest-level, >> > curiosity and self-learning . >> .. >> >> I think it's best to ignore mails from users who do not care enough to >> use their real name/nick while asking questions. The user in question >> introduced himself as prasad, but we scan mail titles before reading >> mail content. Most people wouldn't care to read a mail from >> "testing123 test", let alone answer it. Online >> forums are just like real life communities, where people judge you >> by what you say and how you say it. It's hard to relate to a >> anonymous, faceless name like "testing 123". Use your real name. [1] >> >> If the same question is asked by some one who "appears" to be a real >> person, it might still be worth answering them, at the same time also >> pointing them to a net etiquette >> link [2]. In good faith, we can assume that the user in question is >> really new to using forums/mailing lists etc., >> >> Over time, most people do learn how to do their home work and in turn >> ask smart questions. >> >> I'll see whether our membership welcome messages can be improved to >> reflect this. >> >> Happy hacking, >> Pradeep >> >> [1] http://informationarchitects.jp/use-your-real-name-when-you-comment/ >> [2] http://catb.org/esr/faqs/smart-questions.html >> _______________________________________________ >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sridhar.ratna at gmail.com Fri Jun 12 08:20:34 2009 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Thu, 11 Jun 2009 23:20:34 -0700 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> Message-ID: <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> On Thu, Jun 11, 2009 at 10:31 PM, Pradeep Gowda wrote: > (...) it might still be worth answering them, In light of this conversation's topic, we certainly wouldn't spoon-feed them, would we? > at the same time also > pointing them to a net etiquette > link [2]. > [2] http://catb.org/esr/faqs/smart-questions.html Now do you think a person who is lazy to type a few characters in an Internet search engine (as evidenced by "Is there any tutorial. Should we include any library?") would be interested at all in reading a 60,000 words document? From aman.coe at gmail.com Fri Jun 12 08:25:26 2009 From: aman.coe at gmail.com (Aman Aggarwal) Date: Fri, 12 Jun 2009 11:55:26 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 9 In-Reply-To: References: Message-ID: <882494550906112325t2e6300b8gea5edeea98a4b36a@mail.gmail.com> On Thu, Jun 11, 2009 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. [New bie question ] Clarification on "Multiply" ? operator > ? ? ?applied to list(data structure) (Aman Aggarwal) > ? 2. Re: [New bie question ] Clarification on ?"Multiply" ? ? ?operator > ? ? ?applied to list(data structure) (Senthil Kumaran) > ? 3. Re: [New bie question ] Clarification on "Multiply" operator > ? ? ?applied to list(data structure) (Shivaraj M S) > ? 4. Re: [New bie question ] Clarification on "Multiply" operator > ? ? ?applied to list(data structure) (Shivaraj M S) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 10 Jun 2009 16:57:39 +0530 > From: Aman Aggarwal > To: bangpypers > Subject: [BangPypers] [New bie question ] Clarification on "Multiply" > ? ? ? ?operator applied to list(data structure) > Message-ID: > ? ? ? ?<882494550906100427x1a99ac60h9540f04cc656a13e at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hello there > > I am reading?"How to think like a computer scientist"?which is an > introductory test in Python. > > I wanna clarify the behaviour of multiply operator(*) when applied to > list(data structure). > > Consider the function?make_matrix > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > return [[0] * columns] * rows > > > > > The actual output is > > [[0, 7], [0, 7], [0, 7], [0, 7]] > > > > > The correct version of?make_matrix?is : > > > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(3, 5) > ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > matrix = [] > for row in range(rows): > ? ? matrix += [[0] * columns] > return matrix > > > The reason why first version of?make_matrix?fails ( as explained in > the book at 9.8 ) is that > > "...each row is an alias of the other rows..." > > I wonder why > > [[0] * columns] * rows > > causes?"...each row is an alias of the other rows..." > > but not > > [[0] * columns] > > i.e. why each [0] in a row is not an alias of other row element. > > > > > > /* > ?Everything worth doing is worth doing in excess > */ > > > ------------------------------ > > Message: 2 > Date: Wed, 10 Jun 2009 19:45:20 +0530 > From: Senthil Kumaran > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] [New bie question ] Clarification on > ? ? ? ?"Multiply" ? ? ?operator applied to list(data structure) > Message-ID: <20090610141520.GB14638 at ubuntu.ubuntu-domain> > Content-Type: text/plain; charset=iso-8859-1 > > On Wed, Jun 10, 2009 at 04:57:39PM +0530, Aman Aggarwal wrote: >> >> I am reading?"How to think like a computer scientist"?which is an >> introductory test in Python. >> >> I wanna clarify the behaviour of multiply operator(*) when applied to >> list(data structure). >> >> >> I wonder why >> >> [[0] * columns] * rows >> >> causes?"...each row is an alias of the other rows..." >> >> but not >> >> [[0] * columns] >> >> i.e. why each [0] in a row is not an alias of other row element. > > > It is bit tricky in that code.. > You have to understand that in the second option, the matrix is formed > row-by-row, wherein a new row (list) is created as [0] * columns. > > > This is what the second version essentially is doing: > >>>> rows = 2 >>>> cols = 2 >>>> mat = [] >>>> mat = [[0] * cols] # first row >>>> mat = mat + [[0] * cols] # second row >>>> mat > [[0, 0], [0, 0]] >>>> mat[0][0] = 'Spam' >>>> mat > [['Spam', 0], [0, 0]] >>>> > > This is the what the first version of the code was doing. > >>>> rows = 2 >>>> cols = 2 >>>> mat = [] >>>> mat = [[0] * cols] # first row >>>> mat = mat * 2 # second row >>>> mat > [[0, 0], [0, 0]] >>>> mat[0][0] = 'Spam' >>>> mat > [['Spam', 0], ['Spam', 0]] >>>> > > Does this clarify your doubt? > > -- > Senthil > > > > ------------------------------ > > Message: 3 > Date: Wed, 10 Jun 2009 06:07:27 -0700 (PDT) > From: Shivaraj M S > To: bangpypers at python.org > Subject: Re: [BangPypers] [New bie question ] Clarification on > ? ? ? ?"Multiply" operator applied to list(data structure) > Message-ID: <23961937.post at talk.nabble.com> > Content-Type: text/plain; charset=UTF-8 > > > The first one is a reference and second one is not. > case 1: >>>> m = [[0]*2]*4 >>>> m[1][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] > > case 2: >>>> m=[] >>>> for r in range(4): > ... ? ? m+=[[0]*2] > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> m[1][1]=7 >>>> m > [[0, 0], [0, 7], [0, 0], [0, 0]] > > We can make the second case look like first just by creating a reference to > [[0]*2] which is what was done implicitly when multiplication operator was > used. > > case 2 - modified for reference: >>>> m=[] >>>> mi = [[0]*2] >>>> for r in range(4): > ... ? ? m+=mi > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> mi[0][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] >>>> m[1][1]=1 >>>> m > [[0, 1], [0, 1], [0, 1], [0, 1]] >>>> mi > [[0, 1]] > > > > > Aman Aggarwal-4 wrote: >> >> Hello there >> >> I am reading?"How to think like a computer scientist"?which is an >> introductory test in Python. >> >> I wanna clarify the behaviour of multiply operator(*) when applied to >> list(data structure). >> >> Consider the function?make_matrix >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> return [[0] * columns] * rows >> >> >> >> >> The actual output is >> >> [[0, 7], [0, 7], [0, 7], [0, 7]] >> >> >> >> >> The correct version of?make_matrix?is : >> >> >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(3, 5) >> ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> matrix = [] >> for row in range(rows): >> ? ? matrix += [[0] * columns] >> return matrix >> >> >> The reason why first version of?make_matrix?fails ( as explained in >> the book at 9.8 ) is that >> >> "...each row is an alias of the other rows..." >> >> I wonder why >> >> [[0] * columns] * rows >> >> causes?"...each row is an alias of the other rows..." >> >> but not >> >> [[0] * columns] >> >> i.e. why each [0] in a row is not an alias of other row element. >> >> >> >> >> >> /* >> ?Everything worth doing is worth doing in excess >> */ >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > -- > View this message in context: http://www.nabble.com/-New-bie-question---Clarification-on-%22Multiply%22-operator-applied-to-list%28data-structure%29-tp23960277p23961937.html > Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. > > > > ------------------------------ > > Message: 4 > Date: Wed, 10 Jun 2009 06:09:16 -0700 (PDT) > From: Shivaraj M S > To: bangpypers at python.org > Subject: Re: [BangPypers] [New bie question ] Clarification on > ? ? ? ?"Multiply" operator applied to list(data structure) > Message-ID: <23961977.post at talk.nabble.com> > Content-Type: text/plain; charset=UTF-8 > > > The first one is a case of reference/alias and second one is not. > case 1: >>>> m = [[0]*2]*4 >>>> m[1][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] > > case 2: >>>> m=[] >>>> for r in range(4): > ... ? ? m+=[[0]*2] > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> m[1][1]=7 >>>> m > [[0, 0], [0, 7], [0, 0], [0, 0]] > > We can make the second case look like first just by creating a reference to > [[0]*2] which is what was done implicitly when multiplication operator was > used. > > case 2 - modified for reference: >>>> m=[] >>>> mi = [[0]*2] >>>> for r in range(4): > ... ? ? m+=mi > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> mi[0][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] >>>> m[1][1]=1 >>>> m > [[0, 1], [0, 1], [0, 1], [0, 1]] >>>> mi > [[0, 1]] > > > > > Aman Aggarwal-4 wrote: >> >> Hello there >> >> I am reading?"How to think like a computer scientist"?which is an >> introductory test in Python. >> >> I wanna clarify the behaviour of multiply operator(*) when applied to >> list(data structure). >> >> Consider the function?make_matrix >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> return [[0] * columns] * rows >> >> >> >> >> The actual output is >> >> [[0, 7], [0, 7], [0, 7], [0, 7]] >> >> >> >> >> The correct version of?make_matrix?is : >> >> >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(3, 5) >> ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> matrix = [] >> for row in range(rows): >> ? ? matrix += [[0] * columns] >> return matrix >> >> >> The reason why first version of?make_matrix?fails ( as explained in >> the book at 9.8 ) is that >> >> "...each row is an alias of the other rows..." >> >> I wonder why >> >> [[0] * columns] * rows >> >> causes?"...each row is an alias of the other rows..." >> >> but not >> >> [[0] * columns] >> >> i.e. why each [0] in a row is not an alias of other row element. >> >> >> >> >> >> /* >> ?Everything worth doing is worth doing in excess >> */ >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > -- > View this message in context: http://www.nabble.com/-New-bie-question---Clarification-on-%22Multiply%22-operator-applied-to-list%28data-structure%29-tp23960277p23961977.html > Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. > > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 22, Issue 9 > ***************************************** > Hi there thanks for the response. I posted the same question here : http://stackoverflow.com/questions/974931/multiply-operator-applied-to-listdata-structure Kindly read it. Thanks and kind regards Aman From noufal at gmail.com Fri Jun 12 08:36:51 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 12 Jun 2009 12:06:51 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 9 In-Reply-To: <882494550906112325t2e6300b8gea5edeea98a4b36a@mail.gmail.com> References: <882494550906112325t2e6300b8gea5edeea98a4b36a@mail.gmail.com> Message-ID: <9963e56e0906112336m58229557xdf89f110f6094934@mail.gmail.com> On Fri, Jun 12, 2009 at 11:55 AM, Aman Aggarwal wrote: [..] > thanks for the response. > > I posted the same question here : > > > http://stackoverflow.com/questions/974931/multiply-operator-applied-to-listdata-structure [..] You're welcome but please don't quote entire digests back to the list. :) -- ~noufal From sriramnrn at gmail.com Fri Jun 12 08:43:14 2009 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Fri, 12 Jun 2009 12:13:14 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> Message-ID: <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> On Fri, Jun 12, 2009 at 11:50 AM, Sridhar Ratnakumar wrote: > Now do you think a person who is lazy to type a few characters in an > Internet search engine (as evidenced by "Is there any tutorial. Should > we include any library?") would be interested at all in reading a > 60,000 words document? I've concluded that a vast number of our developers are actually incompetent, and also clueless on how to self-study and to conduct a search. Perhaps our education system has conditioned their minds to mug up and to read various study guides, and they are unaware that in the real world, self help is necessary. Having said that, I have felt it useful to reply to such posts with a google search url, than to merely ask them to buzz off. I've observed that with such replies, free loaders understand that they will get responses, but not free lunches. -- Sriram From srijayanth at gmail.com Fri Jun 12 08:51:34 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 12:21:34 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> Message-ID: <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> Yeah, I second your thoughts on incompetence. My company's conducting interviews of freshers, and you'll be amazed at the answers I get for "What is a hash table?". One bright bulb answered it with "It is a hash function table". My standard opening interview question is to ask them to write a simple C program that reverses a string. Most get that wrong. In two years, I've only seen about 10 candidates get that right. I've come to lament the factory like nature of IT in India. People learn extremely minimal subset of specialized skills. I've had chaps who can't see beyond .NET or Java very simply because these are industry idioms. I tell them stuff about perl, python or ruby and I get back "but those are scripting languages". Jayanth On Fri, Jun 12, 2009 at 12:13 PM, Sriram Narayanan wrote: > On Fri, Jun 12, 2009 at 11:50 AM, Sridhar > Ratnakumar wrote: > > Now do you think a person who is lazy to type a few characters in an > > Internet search engine (as evidenced by "Is there any tutorial. Should > > we include any library?") would be interested at all in reading a > > 60,000 words document? > > I've concluded that a vast number of our developers are actually > incompetent, and also clueless on how to self-study and to conduct a > search. Perhaps our education system has conditioned their minds to > mug up and to read various study guides, and they are unaware that in > the real world, self help is necessary. > > Having said that, I have felt it useful to reply to such posts with a > google search url, than to merely ask them to buzz off. I've observed > that with such replies, free loaders understand that they will get > responses, but not free lunches. > > -- Sriram > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aman.coe at gmail.com Fri Jun 12 08:51:51 2009 From: aman.coe at gmail.com (Aman Aggarwal) Date: Fri, 12 Jun 2009 12:21:51 +0530 Subject: [BangPypers] [New bie question ] Clarification on "Multiply" operator applied to list(data structure) Message-ID: <882494550906112351o1b5b857v8df919832674eee2@mail.gmail.com> On Thu, Jun 11, 2009 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. [New bie question ] Clarification on "Multiply" ? operator > ? ? ?applied to list(data structure) (Aman Aggarwal) > ? 2. Re: [New bie question ] Clarification on ?"Multiply" ? ? ?operator > ? ? ?applied to list(data structure) (Senthil Kumaran) > ? 3. Re: [New bie question ] Clarification on "Multiply" operator > ? ? ?applied to list(data structure) (Shivaraj M S) > ? 4. Re: [New bie question ] Clarification on "Multiply" operator > ? ? ?applied to list(data structure) (Shivaraj M S) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 10 Jun 2009 16:57:39 +0530 > From: Aman Aggarwal > To: bangpypers > Subject: [BangPypers] [New bie question ] Clarification on "Multiply" > ? ? ? ?operator applied to list(data structure) > Message-ID: > ? ? ? ?<882494550906100427x1a99ac60h9540f04cc656a13e at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hello there > > I am reading?"How to think like a computer scientist"?which is an > introductory test in Python. > > I wanna clarify the behaviour of multiply operator(*) when applied to > list(data structure). > > Consider the function?make_matrix > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > return [[0] * columns] * rows > > > > > The actual output is > > [[0, 7], [0, 7], [0, 7], [0, 7]] > > > > > The correct version of?make_matrix?is : > > > > def make_matrix(rows, columns): > """ > ? >>> make_matrix(3, 5) > ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] > ? >>> make_matrix(4, 2) > ? [[0, 0], [0, 0], [0, 0], [0, 0]] > ? >>> m = make_matrix(4, 2) > ? >>> m[1][1] = 7 > ? >>> m > ? [[0, 0], [0, 7], [0, 0], [0, 0]] > """ > matrix = [] > for row in range(rows): > ? ? matrix += [[0] * columns] > return matrix > > > The reason why first version of?make_matrix?fails ( as explained in > the book at 9.8 ) is that > > "...each row is an alias of the other rows..." > > I wonder why > > [[0] * columns] * rows > > causes?"...each row is an alias of the other rows..." > > but not > > [[0] * columns] > > i.e. why each [0] in a row is not an alias of other row element. > > > > > > /* > ?Everything worth doing is worth doing in excess > */ > > > ------------------------------ > > Message: 2 > Date: Wed, 10 Jun 2009 19:45:20 +0530 > From: Senthil Kumaran > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] [New bie question ] Clarification on > ? ? ? ?"Multiply" ? ? ?operator applied to list(data structure) > Message-ID: <20090610141520.GB14638 at ubuntu.ubuntu-domain> > Content-Type: text/plain; charset=iso-8859-1 > > On Wed, Jun 10, 2009 at 04:57:39PM +0530, Aman Aggarwal wrote: >> >> I am reading?"How to think like a computer scientist"?which is an >> introductory test in Python. >> >> I wanna clarify the behaviour of multiply operator(*) when applied to >> list(data structure). >> >> >> I wonder why >> >> [[0] * columns] * rows >> >> causes?"...each row is an alias of the other rows..." >> >> but not >> >> [[0] * columns] >> >> i.e. why each [0] in a row is not an alias of other row element. > > > It is bit tricky in that code.. > You have to understand that in the second option, the matrix is formed > row-by-row, wherein a new row (list) is created as [0] * columns. > > > This is what the second version essentially is doing: > >>>> rows = 2 >>>> cols = 2 >>>> mat = [] >>>> mat = [[0] * cols] # first row >>>> mat = mat + [[0] * cols] # second row >>>> mat > [[0, 0], [0, 0]] >>>> mat[0][0] = 'Spam' >>>> mat > [['Spam', 0], [0, 0]] >>>> > > This is the what the first version of the code was doing. > >>>> rows = 2 >>>> cols = 2 >>>> mat = [] >>>> mat = [[0] * cols] # first row >>>> mat = mat * 2 # second row >>>> mat > [[0, 0], [0, 0]] >>>> mat[0][0] = 'Spam' >>>> mat > [['Spam', 0], ['Spam', 0]] >>>> > > Does this clarify your doubt? > > -- > Senthil > > > > ------------------------------ > > Message: 3 > Date: Wed, 10 Jun 2009 06:07:27 -0700 (PDT) > From: Shivaraj M S > To: bangpypers at python.org > Subject: Re: [BangPypers] [New bie question ] Clarification on > ? ? ? ?"Multiply" operator applied to list(data structure) > Message-ID: <23961937.post at talk.nabble.com> > Content-Type: text/plain; charset=UTF-8 > > > The first one is a reference and second one is not. > case 1: >>>> m = [[0]*2]*4 >>>> m[1][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] > > case 2: >>>> m=[] >>>> for r in range(4): > ... ? ? m+=[[0]*2] > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> m[1][1]=7 >>>> m > [[0, 0], [0, 7], [0, 0], [0, 0]] > > We can make the second case look like first just by creating a reference to > [[0]*2] which is what was done implicitly when multiplication operator was > used. > > case 2 - modified for reference: >>>> m=[] >>>> mi = [[0]*2] >>>> for r in range(4): > ... ? ? m+=mi > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> mi[0][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] >>>> m[1][1]=1 >>>> m > [[0, 1], [0, 1], [0, 1], [0, 1]] >>>> mi > [[0, 1]] > > > > > Aman Aggarwal-4 wrote: >> >> Hello there >> >> I am reading?"How to think like a computer scientist"?which is an >> introductory test in Python. >> >> I wanna clarify the behaviour of multiply operator(*) when applied to >> list(data structure). >> >> Consider the function?make_matrix >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> return [[0] * columns] * rows >> >> >> >> >> The actual output is >> >> [[0, 7], [0, 7], [0, 7], [0, 7]] >> >> >> >> >> The correct version of?make_matrix?is : >> >> >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(3, 5) >> ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> matrix = [] >> for row in range(rows): >> ? ? matrix += [[0] * columns] >> return matrix >> >> >> The reason why first version of?make_matrix?fails ( as explained in >> the book at 9.8 ) is that >> >> "...each row is an alias of the other rows..." >> >> I wonder why >> >> [[0] * columns] * rows >> >> causes?"...each row is an alias of the other rows..." >> >> but not >> >> [[0] * columns] >> >> i.e. why each [0] in a row is not an alias of other row element. >> >> >> >> >> >> /* >> ?Everything worth doing is worth doing in excess >> */ >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > -- > View this message in context: http://www.nabble.com/-New-bie-question---Clarification-on-%22Multiply%22-operator-applied-to-list%28data-structure%29-tp23960277p23961937.html > Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. > > > > ------------------------------ > > Message: 4 > Date: Wed, 10 Jun 2009 06:09:16 -0700 (PDT) > From: Shivaraj M S > To: bangpypers at python.org > Subject: Re: [BangPypers] [New bie question ] Clarification on > ? ? ? ?"Multiply" operator applied to list(data structure) > Message-ID: <23961977.post at talk.nabble.com> > Content-Type: text/plain; charset=UTF-8 > > > The first one is a case of reference/alias and second one is not. > case 1: >>>> m = [[0]*2]*4 >>>> m[1][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] > > case 2: >>>> m=[] >>>> for r in range(4): > ... ? ? m+=[[0]*2] > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> m[1][1]=7 >>>> m > [[0, 0], [0, 7], [0, 0], [0, 0]] > > We can make the second case look like first just by creating a reference to > [[0]*2] which is what was done implicitly when multiplication operator was > used. > > case 2 - modified for reference: >>>> m=[] >>>> mi = [[0]*2] >>>> for r in range(4): > ... ? ? m+=mi > ... >>>> m > [[0, 0], [0, 0], [0, 0], [0, 0]] >>>> mi[0][1]=7 >>>> m > [[0, 7], [0, 7], [0, 7], [0, 7]] >>>> m[1][1]=1 >>>> m > [[0, 1], [0, 1], [0, 1], [0, 1]] >>>> mi > [[0, 1]] > > > > > Aman Aggarwal-4 wrote: >> >> Hello there >> >> I am reading?"How to think like a computer scientist"?which is an >> introductory test in Python. >> >> I wanna clarify the behaviour of multiply operator(*) when applied to >> list(data structure). >> >> Consider the function?make_matrix >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> return [[0] * columns] * rows >> >> >> >> >> The actual output is >> >> [[0, 7], [0, 7], [0, 7], [0, 7]] >> >> >> >> >> The correct version of?make_matrix?is : >> >> >> >> def make_matrix(rows, columns): >> """ >> ? >>> make_matrix(3, 5) >> ? [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] >> ? >>> make_matrix(4, 2) >> ? [[0, 0], [0, 0], [0, 0], [0, 0]] >> ? >>> m = make_matrix(4, 2) >> ? >>> m[1][1] = 7 >> ? >>> m >> ? [[0, 0], [0, 7], [0, 0], [0, 0]] >> """ >> matrix = [] >> for row in range(rows): >> ? ? matrix += [[0] * columns] >> return matrix >> >> >> The reason why first version of?make_matrix?fails ( as explained in >> the book at 9.8 ) is that >> >> "...each row is an alias of the other rows..." >> >> I wonder why >> >> [[0] * columns] * rows >> >> causes?"...each row is an alias of the other rows..." >> >> but not >> >> [[0] * columns] >> >> i.e. why each [0] in a row is not an alias of other row element. >> >> >> >> >> >> /* >> ?Everything worth doing is worth doing in excess >> */ >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> >> > > -- > View this message in context: http://www.nabble.com/-New-bie-question---Clarification-on-%22Multiply%22-operator-applied-to-list%28data-structure%29-tp23960277p23961977.html > Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. > > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 22, Issue 9 > ***************************************** > Hi there thanks for the response. I posted the same question here : http://stackoverflow.com/questions/974931/multiply-operator-applied-to-listdata-structure The discussions on that page clarify my doubt. Kindly read it. Thanks and kind regards Aman From srijayanth at gmail.com Fri Jun 12 09:04:18 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 12:34:18 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> Message-ID: <5ead360a0906120004n27ea7072n51e222d5b2413dc9@mail.gmail.com> Hello, wrt my earlier question, the following blog is a nice writeup. I realize its Ruby, but the general principles of posting on a newsgroup/forum apply. http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mom_too.html Thank you, Jayanth On Fri, Jun 12, 2009 at 12:21 PM, Srijayanth Sridhar wrote: > Yeah, I second your thoughts on incompetence. My company's conducting > interviews of freshers, and you'll be amazed at the answers I get for "What > is a hash table?". One bright bulb answered it with "It is a hash function > table". My standard opening interview question is to ask them to write a > simple C program that reverses a string. Most get that wrong. In two years, > I've only seen about 10 candidates get that right. > > I've come to lament the factory like nature of IT in India. People learn > extremely minimal subset of specialized skills. I've had chaps who can't see > beyond .NET or Java very simply because these are industry idioms. I tell > them stuff about perl, python or ruby and I get back "but those are > scripting languages". > > Jayanth > > > On Fri, Jun 12, 2009 at 12:13 PM, Sriram Narayanan wrote: > >> On Fri, Jun 12, 2009 at 11:50 AM, Sridhar >> Ratnakumar wrote: >> > Now do you think a person who is lazy to type a few characters in an >> > Internet search engine (as evidenced by "Is there any tutorial. Should >> > we include any library?") would be interested at all in reading a >> > 60,000 words document? >> >> I've concluded that a vast number of our developers are actually >> incompetent, and also clueless on how to self-study and to conduct a >> search. Perhaps our education system has conditioned their minds to >> mug up and to read various study guides, and they are unaware that in >> the real world, self help is necessary. >> >> Having said that, I have felt it useful to reply to such posts with a >> google search url, than to merely ask them to buzz off. I've observed >> that with such replies, free loaders understand that they will get >> responses, but not free lunches. >> >> -- Sriram >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lawgon at au-kbc.org Fri Jun 12 09:27:05 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Fri, 12 Jun 2009 12:57:05 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120004n27ea7072n51e222d5b2413dc9@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> <5ead360a0906120004n27ea7072n51e222d5b2413dc9@mail.gmail.com> Message-ID: <200906121257.05407.lawgon@au-kbc.org> On Friday 12 June 2009 12:34:18 Srijayanth Sridhar wrote: > wrt my earlier question, the following blog is a nice writeup. I realize > its Ruby, but the general principles of posting on a newsgroup/forum apply. > > http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mom_too.html including not top posting? -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From noufal at gmail.com Fri Jun 12 09:25:56 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 12 Jun 2009 12:55:56 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> Message-ID: <9963e56e0906120025i2195f475na5da987774010eb6@mail.gmail.com> On Fri, Jun 12, 2009 at 12:21 PM, Srijayanth Sridhar wrote: [..] > I've come to lament the factory like nature of IT in India. People learn > extremely minimal subset of specialized skills. I've had chaps who can't see > beyond .NET or Java very simply because these are industry idioms. I tell > them stuff about perl, python or ruby and I get back "but those are > scripting languages". [..] Code monkey culture. I know of atleast some companies that *look* for such people because they want them to do grunt work like fixing tiny bugs, 'resolving issues' and such. All the juicy work (if any) are done by competent people. The unwashed masses are used to oil the cogs. Even colleges are moving towards teaching vocational rather than technical skills. -- ~noufal From srijayanth at gmail.com Fri Jun 12 09:35:31 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 13:05:31 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <200906121257.05407.lawgon@au-kbc.org> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> <5ead360a0906120004n27ea7072n51e222d5b2413dc9@mail.gmail.com> <200906121257.05407.lawgon@au-kbc.org> Message-ID: <5ead360a0906120035g5b2084ccr29f65dad327a4dcb@mail.gmail.com> On Fri, Jun 12, 2009 at 12:57 PM, Kenneth Gonsalves wrote: > On Friday 12 June 2009 12:34:18 Srijayanth Sridhar wrote: > > wrt my earlier question, the following blog is a nice writeup. I realize > > its Ruby, but the general principles of posting on a newsgroup/forum > apply. > > > > http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mom_too.html > > including not top posting? > -- > regards > Kenneth Gonsalves > Associate > NRC-FOSS > http://nrcfosshelpline.in/web/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > Yeah that too :) Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmathews at gmail.com Fri Jun 12 10:29:09 2009 From: rmathews at gmail.com (Roshan Mathews) Date: Fri, 12 Jun 2009 13:59:09 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> Message-ID: <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> On Fri, Jun 12, 2009 at 12:13 PM, Sriram Narayanan wrote: > I've concluded that a vast number of our developers are actually > incompetent, and also clueless on how to self-study and to conduct a > search. Perhaps our education system has conditioned their minds to > mug up and to read various study guides, and they are unaware that in > the real world, self help is necessary. > That's too harsh. But there might be a kernel of truth in there, or it wouldn't have rankled anyone. Maybe if someone has found out enough to locate a mailing list and post to it, we should just answer their questions and tell them how to go about things in the future. I shouldn't talk, since I usually just ignore mails that are irritating, but if you care enough to reply, you might as well get your message across, and being snide isn't the way to go about that. :) Roshan From abpillai at gmail.com Fri Jun 12 10:32:41 2009 From: abpillai at gmail.com (Anand Balachandran) Date: Fri, 12 Jun 2009 14:02:41 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906112316s54d4d856h6cd1cfe68309bf8b@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <5ead360a0906112316s54d4d856h6cd1cfe68309bf8b@mail.gmail.com> Message-ID: <8548c5f30906120132q512458ben51f6f5b3daab6814@mail.gmail.com> On Fri, Jun 12, 2009 at 11:46 AM, Srijayanth Sridhar wrote: > Good points, but what I am most curious about is why this phenomenon is so > prevalent in the Indian dev community and not as pervasive elsewhere. The > ruby community is rife with apt examples. The average Indian developer will > pop up and demand answers for a really silly Rails question or something. Yes, this seems like a birth-right for a lot of Indian developers. It is as if they consider the effort to post in a forum to be less than the effort involved in googling and getting the answer directly. I have seen a lot of developers with Indian names getting flamed and burned at several comp.lang.* groups for posting stupid questions, which can often be just fu***ng googled. As someone posted previously, this seems to be a result of the kind of education system that thrives here which favors mugging up rather than original research and exploration. > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From stallomir at gmail.com Fri Jun 12 10:35:18 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Fri, 12 Jun 2009 14:05:18 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> Message-ID: Jayanth: I've come to lament the factory like nature of IT in India. People learn extremely minimal subset of specialized skills. I've had chaps who can't see beyond .NET or Java very simply because these are industry idioms. I tell them stuff about perl, python or ruby and I get back "but those are scripting languages". Just a slightly unrelated question here.......doesn't the industry follow .NET and Java more than Python/Perl as well? (I've heard this said by several people in the States as well.) So maybe a change in the industry mindset would help.. (Note, I haven't had *any *industry experience whatsoever, the thing about .NET/Java being more prevalent is based on second-hand knowledge. I myself use Python as a language for scientific purposes) -Mandar -------------- next part -------------- An HTML attachment was scrubbed... URL: From lawgon at au-kbc.org Fri Jun 12 10:39:52 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Fri, 12 Jun 2009 14:09:52 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> Message-ID: <200906121409.52556.lawgon@au-kbc.org> On Friday 12 June 2009 13:59:09 Roshan Mathews wrote: > On Fri, Jun 12, 2009 at 12:13 PM, Sriram Narayanan wrote: > > I've concluded that a vast number of our developers are actually > > incompetent, and also clueless on how to self-study and to conduct a > > search. Perhaps our education system has conditioned their minds to > > mug up and to read various study guides, and they are unaware that in > > the real world, self help is necessary. > > That's too harsh. ?But there might be a kernel of truth in there, or > it wouldn't have rankled anyone. ?Maybe if someone has found out > enough to locate a mailing list and post to it, we should just answer > their questions and tell them how to go about things in the future. ?I > shouldn't talk, since I usually just ignore mails that are irritating, > but if you care enough to reply, you might as well get your message > across, and being snide isn't the way to go about that. :) to add my 2 paise - I almost automatically recognise a fellow countryman on mailing lists and IRC by the fact that the post will be in SMS language, vague about the problem faced, often in the wrong forum and demanding 'plz send solution ASAP'. the problem is that our education systems teaches tools and not concepts. And industry also wants people who can use tools and cannot think for themselves. Remember that most of our so-called IT industry does not produce software, but just writes code. so when these poor souls venture into a world where creative thinking, self help, concept learning etc etc rules, they are as bewildered as a chicken trying to cross MG road. (or for that matter a small town guy like me trying to cross St Marks road) -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From srijayanth at gmail.com Fri Jun 12 10:47:27 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 14:17:27 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> Message-ID: <5ead360a0906120147m4d772458sa643aa36e48913df@mail.gmail.com> > > Just a slightly unrelated question here.......doesn't the industry follow > .NET and Java more than Python/Perl as well? (I've heard this said by > several people in the States as well.) So maybe a change in the industry > mindset would help.. > > True, but my larger point was about their unwillingness to discover or learn. Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Fri Jun 12 11:00:57 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 14:30:57 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <200906121409.52556.lawgon@au-kbc.org> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> Message-ID: <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> > > the problem is that our education systems teaches tools and not concepts. > And > industry also wants people who can use tools and cannot think for > themselves. > Remember that most of our so-called IT industry does not produce software, > but > just writes code. > While I agree that the problem lies fundamentally with the education system somewhere, I am not sure the problem is as simple as the system teaching tool usage as opposed to concepts. In fact, I would go so far as to argue that the system teaches them nothing. I've seen certain trends that I find interesting, not just at a technical but at a sociological level. You mentioned you are from a small city, and this is something that interests me tremendously. I work for a company which used to have 10-12 developers from small towns in AP. These 10-12 people formed an interesting community where they would help each other out. The first guy to come in, would have all the relevant ebooks downloaded and ready to serve to the next person who would come in and so on. I find it particularly interesting because this ladder scheme of theirs indicates a few things: a) Their education system didn't have them prepped for such a scenario b) They feel the need to stick to each other because they don't have outside help c) They have industrialized a certain process that works to their personal benefit. In other words, they are working the system. I don't entirely blame them since given their background, its only natural for them to seek out what they believe is a better life for them. I also don't want to be mean to them. What are your experiences as a person from a "small town"? My question is more directed towards your 'programming culture' now vis-a-vis to your programming culture from your small town? Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Fri Jun 12 11:12:53 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 14:42:53 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> Message-ID: <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> As we speak: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/339092 Jayanth On Fri, Jun 12, 2009 at 2:30 PM, Srijayanth Sridhar wrote: > the problem is that our education systems teaches tools and not concepts. >> And >> industry also wants people who can use tools and cannot think for >> themselves. >> Remember that most of our so-called IT industry does not produce software, >> but >> just writes code. >> > > While I agree that the problem lies fundamentally with the education system > somewhere, I am not sure the problem is as simple as the system teaching > tool usage as opposed to concepts. In fact, I would go so far as to argue > that the system teaches them nothing. I've seen certain trends that I find > interesting, not just at a technical but at a sociological level. > > You mentioned you are from a small city, and this is something that > interests me tremendously. I work for a company which used to have 10-12 > developers from small towns in AP. These 10-12 people formed an interesting > community where they would help each other out. The first guy to come in, > would have all the relevant ebooks downloaded and ready to serve to the next > person who would come in and so on. > > I find it particularly interesting because this ladder scheme of theirs > indicates a few things: > > a) Their education system didn't have them prepped for such a scenario > b) They feel the need to stick to each other because they don't have > outside help > c) They have industrialized a certain process that works to their personal > benefit. > > In other words, they are working the system. I don't entirely blame them > since given their background, its only natural for them to seek out what > they believe is a better life for them. I also don't want to be mean to > them. > > What are your experiences as a person from a "small town"? My question is > more directed towards your 'programming culture' now vis-a-vis to your > programming culture from your small town? > > Jayanth > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stallomir at gmail.com Fri Jun 12 11:22:57 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Fri, 12 Jun 2009 14:52:57 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> Message-ID: Okay, that was really hilarious. But I still believe the issue is not confined to Indian developers but *stupid* developers from everywhere. Maybe the sheer size of the software industry in India as well as the nature of a lot of work done in that industry creates a lot of people who want instant answers for their questions and do not bothering conforming to etiquette while requesting them. -Mandar -------------- next part -------------- An HTML attachment was scrubbed... URL: From stallomir at gmail.com Fri Jun 12 11:23:14 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Fri, 12 Jun 2009 14:53:14 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> Message-ID: *not bothering -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Fri Jun 12 11:30:01 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 15:00:01 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> Message-ID: <5ead360a0906120230t3b03666bp8e06c6a4a146b81b@mail.gmail.com> On Fri, Jun 12, 2009 at 2:52 PM, Mandar Gokhale wrote: > Okay, that was really hilarious. But I still believe the issue is not > confined to Indian developers but *stupid* developers from everywhere. Maybe > the sheer size of the software industry in India as well as the nature of a > lot of work done in that industry creates a lot of people who want instant > answers for their questions and do not bothering conforming to etiquette > while requesting them. > > -Mandar > I've considered this argument of a large working population being the reason for this. However this argument doesn't hold up because, if this supposition were true, then what would also be true is that the number of posts by people in the Indian developer community would be high. I find, very often, that this is not the case. Esp in the Ruby community. Nearly every Indian dev is somehow Rails connected, if at all, and nearly all of them ask poor questions. Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Fri Jun 12 11:47:15 2009 From: abpillai at gmail.com (Anand Balachandran) Date: Fri, 12 Jun 2009 15:17:15 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120230t3b03666bp8e06c6a4a146b81b@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <5ead360a0906120230t3b03666bp8e06c6a4a146b81b@mail.gmail.com> Message-ID: <8548c5f30906120247y3abb6627we539a6290d682934@mail.gmail.com> > > > > I've considered this argument of a large working population being the > reason for this. However this argument doesn't hold up because, if this > supposition were true, then what would also be true is that the number of > posts by people in the Indian developer community would be high. I find, > very often, that this is not the case. Esp in the Ruby community. Nearly > every Indian dev is somehow Rails connected, if at all, and nearly all of > them ask poor questions. > > Jayanth > I don't think this is an affliction peculiar to Ruby or Rails, but a common disease that seems to affect non-curious rookie Indian devs everywhere. I have seen a lot of questions, even worse than this, when I used to be active in the c.l.py forum about 3-4 years back. Posts like this would have been considered okay 9-10 years back when Internet penetration was much less, the number of forums not too high and Google just starting up. However, I fail to understand a developer posting such inane questions at this age, when the Internet is full of helpful postings done already by developers who have faced similar problems before. I typically search obscure error strings when I have some issue on Linux associated with my work. It could be a build error of some obscure library, a MySQL error or anything - Google has *never* failed to produce a result yet. Often I end up getting many hits from forums from people who have faced similar issues in the past. Anyway, this kind of questions are normally seen with devs who are just starting off and doesn't have either the curiosity or the time to devote some time to look at the issues, before asking for help. Most of the time they can be correct with a gentle nudge in the righ direction or tips on how to post in forums. > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at taupro.com Fri Jun 12 11:47:13 2009 From: jeff at taupro.com (Jeff Rush) Date: Fri, 12 Jun 2009 04:47:13 -0500 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> Message-ID: <4A322421.2060101@taupro.com> Mandar Gokhale wrote: > Okay, that was really hilarious. But I still believe the issue is not > confined to Indian developers but *stupid* developers from everywhere. It definitely is not confined to Indian developers - I see it from developers in the United States as well. I'd say it's more from the vocationally-oriented developers who are trying to solve a problem just because they have been told to (by employer or school), with no real desire to enjoy and benefit from the challenge. -Jeff From srijayanth at gmail.com Fri Jun 12 12:02:05 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 15:32:05 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <4A322421.2060101@taupro.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <4A322421.2060101@taupro.com> Message-ID: <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> On Fri, Jun 12, 2009 at 3:17 PM, Jeff Rush wrote: > Mandar Gokhale wrote: > > Okay, that was really hilarious. But I still believe the issue is not > > confined to Indian developers but *stupid* developers from everywhere. > > It definitely is not confined to Indian developers - I see it from > developers in the United States as well. I'd say it's more from the > vocationally-oriented developers who are trying to solve a problem just > because they have been told to (by employer or school), with no real > desire to enjoy and benefit from the challenge. > I don't doubt that its a global phenomenon, however, I am still curious about the reasons for its prevalence out here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Fri Jun 12 12:03:05 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 15:33:05 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <8548c5f30906120247y3abb6627we539a6290d682934@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <5ead360a0906120230t3b03666bp8e06c6a4a146b81b@mail.gmail.com> <8548c5f30906120247y3abb6627we539a6290d682934@mail.gmail.com> Message-ID: <5ead360a0906120303q6dcf5ff2g605d8f6a60e1f15@mail.gmail.com> > > > Anyway, this kind of questions are normally seen with devs who are > just starting off and doesn't have either the curiosity or the time to > devote some time to look at the issues, before asking for help. > Most of the time they can be correct with a gentle nudge in the righ > direction or tips on how to post in forums. > Agreed. Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamal.gs at gmail.com Fri Jun 12 13:15:04 2009 From: kamal.gs at gmail.com (Kamal govindraj) Date: Fri, 12 Jun 2009 16:45:04 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: Message-ID: <1244805304.6739.30.camel@kamal-laptop> > I've considered this argument of a large working population being the > reason > for this. However this argument doesn't hold up because, if this > supposition > were true, then what would also be true is that the number of posts by > people in the Indian developer community would be high. I find, very > often, > that this is not the case. Esp in the Ruby community. Nearly every > Indian > dev is somehow Rails connected, if at all, and nearly all of them ask > poor > questions. > I have worked with many people who are very reluctant to post to a forum asking for help. They will spend a whole day trying to figure out the issue all by themselves. It became so bad that we had to institute a 30 minutes rule (if you can't solve an issue in 30 minutes - seek help) to make sure too much time is not wasted on chasing issue which somebody else might have solved already. I often find myself violating this a lot of time, in all these years I have hardly posted half a dozen times, even that after spending considerable amount of time trying to solve it myself. Maybe this partially explains the limited number of posts. It is also probably another one of those "small town" afflictions - a lot of us are too scared to say anything in public that might make us sound silly/stupid. One other reason for posts like these is probably the inability to communicate in English. I have come across people for whom it takes a lot of effort to write a full sentence in English. I do agree that there are lot of incompetent developers - but I don't think this is a India specific phenomenon. For one most of the items on this - http://thedailywtf.com/ are not from India. I also feel that we need to either ignore such requests (unless the list gets inundated by those) are politely guide them to ways they can solve such issues on their own / better ways of asking questions. Being rude will not help anybody - it will probably scare away a few more people who would have posted a better question & found help. Regards, Kamal From srijayanth at gmail.com Fri Jun 12 13:35:53 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 17:05:53 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <1244805304.6739.30.camel@kamal-laptop> References: <1244805304.6739.30.camel@kamal-laptop> Message-ID: <5ead360a0906120435x37ed03fcg2004d3f896043bc0@mail.gmail.com> > > I have worked with many people who are very reluctant to post to a forum > asking for help. They will spend a whole day trying to figure out the > issue all by themselves. It became so bad that we had to institute a 30 > minutes rule (if you can't solve an issue in 30 minutes - seek help) to > make sure too much time is not wasted on chasing issue which somebody > else might have solved already. I often find myself violating this a lot > of time, in all these years I have hardly posted half a dozen times, > even that after spending considerable amount of time trying to solve it > myself. Maybe this partially explains the limited number of posts. > Could be. > > It is also probably another one of those "small town" afflictions - a > lot of us are too scared to say anything in public that might make us > sound silly/stupid. > Very true. Not just a small town affliction per se. I think its symptomatic of the education system at large which doesn't encourage active questioning. > One other reason for posts like these is probably the inability to > communicate in English. I have come across people for whom it takes a > lot of effort to write a full sentence in English. > Same as above. > > I also feel that we need to either ignore such requests (unless the list > gets inundated by those) are politely guide them to ways they can solve > such issues on their own / better ways of asking questions. Being rude > will not help anybody - it will probably scare away a few more people > who would have posted a better question & found help. > > Completely agree with you on all points. Excellent post. Thank you, Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From vid at svaksha.com Fri Jun 12 13:43:21 2009 From: vid at svaksha.com (vid) Date: Fri, 12 Jun 2009 17:13:21 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> Message-ID: <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> On Fri, Jun 12, 2009 at 11:01, Pradeep Gowda wrote: > On Fri, Jun 12, 2009 at 12:31 AM, Sridhar > Ratnakumar wrote: >> I often think the best way to handle such posters is to momentarily >> divert the topic of the conversation to their own interest-level, >> curiosity and self-learning . ... a nicer method :) > > I think it's best to ignore mails from users who do not care enough to > use their real name/nick while asking questions. The user in question > ?introduced himself as prasad, but we scan mail titles before reading > mail content. Most people wouldn't care to ?read a mail from > "testing123 test", let alone answer it. [snip] > by what you say and how you say it. ?It's hard to relate to a > anonymous, faceless name like "testing 123". ?Use your real name. [1] hmm.... kindly define "real name"[0], "real identity" with respect to the online world. If the owner of had used "Manmohan Singh" or "Rita Rai" instead of "testing123 test", would you trust them more ? [0] i've been using a nick, for years and dont bother with the whois, the domain belongs to someone else :) > If the same question is asked by some one who "appears" to be a real > person, it might still be worth answering them, at the same time also > pointing them to a net etiquette > link [2]. In good faith, we can assume that the user in question is > really new to using forums/mailing lists etc., [snip] > [2] http://catb.org/esr/faqs/smart-questions.html The faq may be relevant for the developed nations which have much better infrastructure and resources than ours. IMPO, i find the faq rude, presumptuous and insensitive, especially when talking of a "community" (isnt that what linux, python, ruby, foo, foo-bar, is all about?) that wants to spread and exchange knowledge. As for the, "Don't ask people to reply by private e-mail....Hackers....... public, transparent process..." - try posting online with a "real name" like "Rita Rai". Besides being an interesting experience, your perception of humans might change and hopefully you would rethink about quoting ESR as a reference on etiquette. -- thanks vid, who "appears" to be a real person ;) From pradeep at btbytes.com Fri Jun 12 14:42:39 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 12 Jun 2009 08:42:39 -0400 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> Message-ID: <3e3294b70906120542y55277ee9v8867c8c09247b414@mail.gmail.com> On Fri, Jun 12, 2009 at 7:43 AM, vid wrote: > hmm.... kindly define "real name"[0], "real identity" with respect to > the online world. If the owner of had used > "Manmohan Singh" or "Rita Rai" instead of "testing123 test", would you > trust them more ? > > [0] ?i've been using a nick, for years and dont bother with the whois, > the domain ?belongs to someone else :) While a name like "Manmohan Singh Ph.D(oxford econ)" may be treated with suspicion, I see no problem with a name like Rita Rai. I do not care for real names, as long as the nick you use is acts as smart you are in real life. > The faq may be relevant for the developed nations which have much > better infrastructure and resources than ours. IMPO, i find the faq > rude, presumptuous and insensitive, especially when talking of a > "community" (isnt that what linux, python, ruby, foo, foo-bar, is all > about?) that wants to spread and exchange knowledge. The best thing about computers is there are no geographical boundaries. I cannot and will not wait till somebody gives my country a certificate saying "you are now a developed nation". By your own argument, you should start talking with a "developing nation" slant to show solidarity. Obviously, you are not. What made you be better than that? A privileged education, smart friends, patient mentors, your own hard work and patience? My reply to the OP was in good faith, while assuming no incompetence on the part of the poster in question, while it was my first reaction to it too. I have interacted with enough young Indian developers (just out of college etc) to understand that for every `n` developers who write "plz help" there are a `k` who go on to become very good. While `k< References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> <3e3294b70906120542y55277ee9v8867c8c09247b414@mail.gmail.com> Message-ID: <5ead360a0906120557j249584cembe61c451d97b8d4d@mail.gmail.com> On Fri, Jun 12, 2009 at 6:12 PM, Pradeep Gowda wrote: > On Fri, Jun 12, 2009 at 7:43 AM, vid wrote: > > hmm.... kindly define "real name"[0], "real identity" with respect to > > the online world. If the owner of had used > > "Manmohan Singh" or "Rita Rai" instead of "testing123 test", would you > > trust them more ? > > > > [0] i've been using a nick, for years and dont bother with the whois, > > the domain belongs to someone else :) > > While a name like "Manmohan Singh Ph.D(oxford econ)" may be treated > with suspicion, I see no problem > with a name like Rita Rai. I do not care for real names, as long as > the nick you use is acts as smart you are in real life. > What's in a name? Everything? Nothing? Irrelevant? > > > > The faq may be relevant for the developed nations which have much > > better infrastructure and resources than ours. IMPO, i find the faq > > rude, presumptuous and insensitive, especially when talking of a > > "community" (isnt that what linux, python, ruby, foo, foo-bar, is all > > about?) that wants to spread and exchange knowledge. > > The best thing about computers is there are no geographical boundaries. > I cannot and will not wait till somebody gives my country a > certificate saying "you are now a developed nation". Actually, I disagree. You might be right if you are trying to imply that there might be no *implied* regionalism in this context. However, several things, as in life, assume the properties of the person/place where it comes from, and several standards often indicate that. I do agree with you on the fact that when one posts on a forum not limited by geographic boundaries, one ought to try and adhere to certain basic principles that govern that forum. > > By your own argument, you should start talking with a "developing > nation" slant to show solidarity. > Obviously, you are not. What made you be better than that? A > privileged education, smart friends, patient mentors, > your own hard work and patience? > Right. All are factors no doubt. Which is why we are having this discussion I suppose :D > > My reply to the OP was in good faith, while assuming no incompetence > on the part of the poster in question, > while it was my first reaction to it too. I have interacted with > enough young Indian developers (just out of college etc) > to understand that for every `n` developers who write "plz help" there > are a `k` who go on to become very good. > While `k< Correct and good on both counts. You say your piece and back it up by the best references you can find. That > is > the accepted way of academia, industry and arts. > Actually, with the arts, that mightn't be always true ;) > > You may not agree with the reference I quote, but that's your prerogative. > You are free to do your own research on the topic and share your findings. > > By your own admission, you are trying to be borderline anonymous. > I recommend you to read the 1st reference on using real names, if you > haven't. > May be you wouldn't have replied the way you have if you had to put > your real name behind it. Names are irrelevant on the internet, so I agree with both of you in a certain way. Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Fri Jun 12 15:02:32 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 12 Jun 2009 18:32:32 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120557j249584cembe61c451d97b8d4d@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> <3e3294b70906120542y55277ee9v8867c8c09247b414@mail.gmail.com> <5ead360a0906120557j249584cembe61c451d97b8d4d@mail.gmail.com> Message-ID: <8548c5f30906120602m14fdff57xdf033082d3a893@mail.gmail.com> On Fri, Jun 12, 2009 at 6:27 PM, Srijayanth Sridhar wrote: > > > On Fri, Jun 12, 2009 at 6:12 PM, Pradeep Gowda wrote: > >> On Fri, Jun 12, 2009 at 7:43 AM, vid wrote: >> > >> > Great discussion... the next time someone posts a "non-curious" question in this list, let us be wise like Solomon and point him to this thread as education :) > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Fri Jun 12 15:05:01 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Fri, 12 Jun 2009 18:35:01 +0530 Subject: [BangPypers] BangPypers Digest, Vol 22, Issue 9 In-Reply-To: <882494550906112325t2e6300b8gea5edeea98a4b36a@mail.gmail.com> References: <882494550906112325t2e6300b8gea5edeea98a4b36a@mail.gmail.com> Message-ID: <8548c5f30906120605r1d73b88ctdfb78420dfb424c5@mail.gmail.com> On Fri, Jun 12, 2009 at 11:55 AM, Aman Aggarwal wrote: > On Thu, Jun 11, 2009 at 3:30 PM, wrote: > > ... > > > I posted the same question here : > > > > http://stackoverflow.com/questions/974931/multiply-operator-applied-to-listdata-structure > > > > Kindly read it. > > Thanks and kind regards > Aman > Your post almost caused a "Scrolloverflow" in my browser email window... It is a good idea to avoid quoting entire digests in your replies. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From pradeep at btbytes.com Fri Jun 12 15:36:45 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 12 Jun 2009 09:36:45 -0400 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120557j249584cembe61c451d97b8d4d@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> <3e3294b70906120542y55277ee9v8867c8c09247b414@mail.gmail.com> <5ead360a0906120557j249584cembe61c451d97b8d4d@mail.gmail.com> Message-ID: <3e3294b70906120636tb2a4d9ata813555a1c6b7bd@mail.gmail.com> On Fri, Jun 12, 2009 at 8:57 AM, Srijayanth Sridhar wrote: > Names are irrelevant on the internet, so I agree with both of you in a > certain way. Well, there is one way to be relevant in programming circles, which is often condensed to -- "show your code or GTFO". Ruby language recently lost a prodigal programmer. See _why's euology here [1] The programmer Guy Decoux was mostly known by his famous shell prompt pigeon% and `ts`, the prefix he used for his functions. His code was his communication. Of course, this is an ideal worth striving to :) Names do not matter, however identities still do. In the absence of an established identity, people will be weary about you. Your real name or an already established nick elsewhere is a good start. > You say your piece and back it up by the best references you can find. That is > the accepted way of academia, industry and arts. Good call. I thought so too about it on my way to work. I will stick to what I know. Art, not much :) [1] http://hackety.org/2008/09/25/legendNeverToBeSolved.html From pradeep at btbytes.com Fri Jun 12 15:40:55 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 12 Jun 2009 09:40:55 -0400 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <3e3294b70906120636tb2a4d9ata813555a1c6b7bd@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> <3e3294b70906120542y55277ee9v8867c8c09247b414@mail.gmail.com> <5ead360a0906120557j249584cembe61c451d97b8d4d@mail.gmail.com> <3e3294b70906120636tb2a4d9ata813555a1c6b7bd@mail.gmail.com> Message-ID: <3e3294b70906120640q667e0feamfa4a046a8bb8b9ea@mail.gmail.com> On Fri, Jun 12, 2009 at 9:36 AM, Pradeep Gowda wrote: > On Fri, Jun 12, 2009 at 8:57 AM, Srijayanth Sridhar wrote: >> Names are irrelevant on the internet, so I agree with both of you in a >> certain way. > > Well, there is one way to be relevant ? in programming circles, > which is often condensed to -- "show your code or GTFO". > > Ruby language recently lost a prodigal programmer. See _why's euology here [1] > The programmer Guy Decoux was mostly ?known by his famous shell prompt > pigeon% and > `ts`, the prefix he used for his functions. > > His code was his communication. Of course, this is an ideal worth striving to :) > > Names do not matter, however identities still do. > In the absence of an established identity, people will be weary about you. > Your real name or an already established nick elsewhere ?is a good start. > >> You say your piece and back it up by the best references you can find. That is >> the accepted way of academia, industry and arts. > Good call. I thought so too about it on my way to work. > I will stick to what I know. Art, not much :) > > [1] http://hackety.org/2008/09/25/legendNeverToBeSolved.html > Please read the first line as "please read _why's euology of Guy Decoux [1]" . The original sentence might parse differently than I thought initially. +PG From pradeep at btbytes.com Fri Jun 12 15:44:36 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 12 Jun 2009 09:44:36 -0400 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> Message-ID: <3e3294b70906120644w3ebf7f99rb3c75f8af83e41a0@mail.gmail.com> On Fri, Jun 12, 2009 at 2:20 AM, Sridhar Ratnakumar wrote: > Now do you think a person who is lazy to type a few characters in an > Internet search engine (as evidenced by "Is there any tutorial. Should > we include any library?") would be interested at all in reading a > 60,000 words document? One never knows :) I learnt about this doc while being a passive participant on linux-bangalore list years ago. While I had read some other works of ESR, the repeated references to this doc on LB prompted me to read it. +PG From noufal at gmail.com Fri Jun 12 15:56:32 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 12 Jun 2009 19:26:32 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <1244805304.6739.30.camel@kamal-laptop> References: <1244805304.6739.30.camel@kamal-laptop> Message-ID: <9963e56e0906120656j44560425j24241ac2418d5034@mail.gmail.com> On Fri, Jun 12, 2009 at 4:45 PM, Kamal govindraj wrote: [..] > I also feel that we need to either ignore such requests (unless the list > gets inundated by those) are politely guide them to ways they can solve > such issues on their own / better ways of asking questions. ?Being rude > will not help anybody - it will probably scare away a few more people > who would have posted a better question & found help. While I don't think I've posted anything in SMSese on a newsgroup ever, I do have some old mails that I'm not particularly proud if. If I were shooed off back then, I think it would have been quite a slap in the face. -- ~noufal From vid at svaksha.com Fri Jun 12 16:22:40 2009 From: vid at svaksha.com (vid) Date: Fri, 12 Jun 2009 19:52:40 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <3e3294b70906120542y55277ee9v8867c8c09247b414@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <12470af00906120443k25e6d492v70c9607faca9bbac@mail.gmail.com> <3e3294b70906120542y55277ee9v8867c8c09247b414@mail.gmail.com> Message-ID: <12470af00906120722w44a43469nc1a95904e3009b08@mail.gmail.com> On Fri, Jun 12, 2009 at 18:12, Pradeep Gowda wrote: > > While a name like "Manmohan Singh Ph.D(oxford econ)" may be treated > with suspicion, I see no problem > with a name like Rita Rai. I do not care for real names, as long as > the nick you use is acts as smart you are in real life. ah, now you are contradicting your earlier statement : "I think it's best to ignore mails from users who do not care enough to use their real name/nick while asking questions." [/unquote] As for knowing if someone is smart in real life, the 'RFC 1855 in a Nutshell' says it better : Ideas can be foolish; people are not fools simply for expressing a foolish idea. At this point, i wonder how the internet, geographical disconnect will even give us a glimpse of the real life of an OP, and why does it even matter !! > The best thing about computers is there are no geographical boundaries. > I cannot and will not wait till somebody gives my country a > certificate saying "you are now a developed nation". Since you missed my point, here is what i meant by "infrastructure resources" - better education system, better internet connectivity, a city/village with a better power grid that does not shut down for the better part of the day/night, etc..... IIRC, even Bangalore , the silicon valley of India, has regular power cuts and it must be worse in a small city or the village(s). Echoing Kamal's thoughts on the newbie aspect, lack of language/social skills, etc, i'd add that good infrastructure does matter in the smaller scheme of things atleast with respect to the amount of time a person gets to spend online to research these things. Ofcourse, the above is no excuse for 'do my homework now' demands. > By your own argument, you should start talking with a "developing > nation" slant to show solidarity. > Obviously, you are not. What made you be better than that? ?A > privileged education, smart friends, patient mentors, > your own hard work and patience? err... i am not sure what is the point you are trying to make here. care to explain? > My reply to the OP was in good faith, while assuming no incompetence > on the part of the poster in question, > while it was my ?first reaction to it too. I have interacted with > enough young Indian developers (just out of college etc) > to understand that for every `n` developers who write "plz help" there > are a `k` who go on to become very good. > While `k< You may not agree with the reference I ?quote, but that's your prerogative. Absolutely. I've never found RTFM polite and was thinking out loud on why that FAQ is not my choice for introducing someone to online netiquette. If 'basic questions' were so annoying i'd rather spend my time elsewhere than subscribe to a *-user or *-help list and shoo away newbies with snark. > By your own admission, you are trying to be borderline anonymous. > I recommend you to read the 1st reference on using real names, if you haven't. > May be you wouldn't have replied the way you have if you had to put > your real name behind it. .... since you contradict yourself twice (in this mail and the earlier one) and jump to conclusions (about me :)), i'll pass. Nothing personal. -- thanks || vid || http://www.svaksha.com || From anandology at gmail.com Fri Jun 12 17:42:43 2009 From: anandology at gmail.com (Anand Chitipothu) Date: Fri, 12 Jun 2009 08:42:43 -0700 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> Message-ID: <41139fcb0906120842qa9c1114lf22b5e0be17e18ee@mail.gmail.com> 2009/6/12 Srijayanth Sridhar : > As we speak: > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/339092 > > Jayanth Don't blame the poor chap here. Blame microsoft for that cryptic error message. "'nmake' is not recognized as an internal or external command, operable program or batch file." Does it mean 'nmake' is there and recognized as something else like a text file? How can a newbie understand that nmake is not installed. I have seen so many people not staring at the error messages just because they think they can't make a sense of the error messages. Which is true to some extent. I remember some case like this in when I was doing my engineering. After installing linux and using it for some days, it used to get boot error "fsck: check forced". I didn't know what "check forced" means and that was like a road block for me and all I could do was reinstall linux from scratch again. I didn't had access to internet then, otherwise I could have asked similar foolish(?) questions. I think we should be kind for people asking such questions and show them the right way instead of flaming. Anand From srijayanth at gmail.com Fri Jun 12 20:09:28 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Fri, 12 Jun 2009 23:39:28 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <41139fcb0906120842qa9c1114lf22b5e0be17e18ee@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <41139fcb0906120842qa9c1114lf22b5e0be17e18ee@mail.gmail.com> Message-ID: <5ead360a0906121109j792fde55t3888e879decd56eb@mail.gmail.com> On Fri, Jun 12, 2009 at 9:12 PM, Anand Chitipothu wrote: > 2009/6/12 Srijayanth Sridhar : > > As we speak: > > > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/339092 > > > > Jayanth > > Don't blame the poor chap here. Blame microsoft for that cryptic error > message. > > "'nmake' is not recognized as an internal or external command, > operable program or batch file." > > Does it mean 'nmake' is there and recognized as something else like a > text file? How can a newbie understand that nmake is not installed. > > I have seen so many people not staring at the error messages just > because they think they can't make a sense of the error messages. > Which is true to some extent. > > I remember some case like this in when I was doing my engineering. > After installing linux and using it for some days, it used to get boot > error "fsck: check forced". I didn't know what "check forced" means > and that was like a road block for me and all I could do was reinstall > linux from scratch again. I didn't had access to internet then, > otherwise I could have asked similar foolish(?) questions. > > I think we should be kind for people asking such questions and show > them the right way instead of flaming. > Boy have I opened a pandora's box or what?! Great thread so far. What you say is true, perhaps I should be kinder to him. However, I am not sure what I can tell him at the moment. I've no clue what exactly is up with his nmake :D Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From lawgon at au-kbc.org Sat Jun 13 02:38:26 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Sat, 13 Jun 2009 06:08:26 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> Message-ID: <200906130608.26833.lawgon@au-kbc.org> On Friday 12 June 2009 14:30:57 Srijayanth Sridhar wrote: > What are your experiences as a person from a "small town"? My question is > more directed towards your 'programming culture' now vis-a-vis to your > programming culture from your small town? I am both 'from' and mostly 'in' a small town. My experience is that one has to be totally self reliant and solely dependent on the internet. For example, I started programming python circa 2002, but the first time I met and discussed with a real live python developer was in late 2006. I _did_ see Pradeep G and swaroop in a conference in 2004, but was too scared to talk to them ;-) Till date I have _never_ asked anyone F2F about any problem in programming - there is no one available. The same goes for sysadmin and practically every other computer related task. Strangely enough, the same goes for golfers in small towns - I have yet to get even a tip from a coach. That is also why I prefer to recruit from small towns and non-elite colleges. The people are more self- reliant and not so cynical. -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From lawgon at au-kbc.org Sat Jun 13 02:40:35 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Sat, 13 Jun 2009 06:10:35 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <3e3294b70906120644w3ebf7f99rb3c75f8af83e41a0@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <7c73a13a0906112320i41d5105am3c485e360cb41fea@mail.gmail.com> <3e3294b70906120644w3ebf7f99rb3c75f8af83e41a0@mail.gmail.com> Message-ID: <200906130610.35973.lawgon@au-kbc.org> On Friday 12 June 2009 19:14:36 Pradeep Gowda wrote: > On Fri, Jun 12, 2009 at 2:20 AM, Sridhar > > Ratnakumar wrote: > > Now do you think a person who is lazy to type a few characters in an > > Internet search engine (as evidenced by "Is there any tutorial. Should > > we include any library?") would be interested at all in reading a > > 60,000 words document? > > One never knows :) > > I learnt about this doc while being a passive participant on > linux-bangalore list years ago. > While I had read some other works of ESR, the repeated references to > this doc on LB > prompted me to read it. strangely enough, I switched to python after reading an article by ESR on the language. And for a long time - 1995 to 2005, I thought ESR was a good guy ;-) -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From pradeep at btbytes.com Sat Jun 13 03:07:00 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Fri, 12 Jun 2009 21:07:00 -0400 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <200906130608.26833.lawgon@au-kbc.org> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <200906130608.26833.lawgon@au-kbc.org> Message-ID: <3e3294b70906121807g32835d8fi64224835f13b44f2@mail.gmail.com> On Fri, Jun 12, 2009 at 8:38 PM, Kenneth Gonsalves wrote: > On Friday 12 June 2009 14:30:57 Srijayanth Sridhar wrote: >> What are your experiences as a person from a "small town"? My question is >> more directed towards your 'programming culture' now vis-a-vis to your >> programming culture from your small town? > > I am both 'from' and mostly 'in' a small town. My experience is that one has > to be totally self reliant and solely dependent on the internet. For example, > I started programming python circa 2002, but the first time I met and discussed > with a real live python developer was in late 2006. I _did_ see Pradeep G and > swaroop in a conference in 2004, but was too scared to talk to them ;-) Till > date I have _never_ asked anyone F2F about any problem in programming - there > is no one available. The same goes for sysadmin and practically every other > computer related task. Strangely enough, the same goes for golfers in small > towns - I have yet to get even a tip from a coach. That is also why I prefer > to recruit from small towns and non-elite colleges. The people are more self- > reliant and not so cynical. Kenneth, I remember that LB 2004 moment. You were sitting in the first row and me & Swaroop were sitting right behind you and gabbing away about some python stuff. You turned and started talking to us (something about plone /zope, I think). The "scared" feeling was mutual :D About asking people F2F about programming/linux, my own first experience bears repeating. This happened during the very first Bangalore-IT.com which had the Linux pavilion (1997/98?). I I had recently discovered linux and having a hard time getting SiS graphics card working on my PC. So, during one of the conf. days I boldly walked (after talking myself into it for couple of minutes) to this well known Linux person and asked him "how do I get this SiS card working?". What my "scared-but-practicing-to-be-bold" self failed to notice is that he was talking to some one else already. He laughed and said, "you should stop using that card then". Yeah, very "cold-water-in-the-face" moment there. I have survived. +PG From lawgon at au-kbc.org Sat Jun 13 04:00:14 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Sat, 13 Jun 2009 07:30:14 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> Message-ID: <200906130730.14568.lawgon@au-kbc.org> On Friday 12 June 2009 14:05:18 Mandar Gokhale wrote: > Jayanth: I've come to lament the factory like nature of IT in India. People > learn extremely minimal subset of specialized skills. I've had chaps who > can't see beyond .NET or Java very simply because these are industry > idioms. I tell them stuff about perl, python or ruby and I get back "but > those are scripting languages". > > > Just a slightly unrelated question here.......doesn't the industry follow > .NET and Java more than Python/Perl as well? (I've heard this said by > several people in the States as well.) So maybe a change in the industry > mindset would help.. there is a pecking order - generally Java programmers are at the top of the heap. They usually would not even condescend to _talk_ to a non-java programmer. If you cannot write 5000 lines of UML to generate 10000 lines of XML to generate 50000 lines of java code, you are no one. the next in the food chain are DOTNET guys - ability to click, drag and drop is essential. Ability to think is optional (at times actionable). and at the bottom of the food chain are the scripting guys - also useful to send round the corner for coffee. but the moment these guys leave industry - guess what language they choose? and why do the corporates not change? Take TCS, they have 50K java programmers - they can't afford to retrain them. So it is not a question of Java is best for enterprise (we all know python is the best), but a question of enterprise has invested too much in java programmers and cannot afford to shift from java (or dotnet as the case may be) -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From jace at pobox.com Sat Jun 13 12:37:42 2009 From: jace at pobox.com (Kiran Jonnalagadda) Date: Sat, 13 Jun 2009 16:07:42 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <4A322421.2060101@taupro.com> <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> Message-ID: 2009/6/12 Srijayanth Sridhar : > I don't doubt that its a global phenomenon, however, I am still curious > about the reasons for its prevalence out here. I will add my little theory to this discussion. If you are from a middle class background with no appetite for entrepreneurial risk, but want a better life than your parents did, there are few professional career options. Doctor? Architect? Lawyer? They require dedicating a serious chunk of your life and are one-way streets. But programmer... excuse me, software developer? By gosh, a big company will make a software developer out of anyone in just three months, plus you get to go abroad and settle down. If it doesn't work, no big deal. You didn't invest five years and half your parents' savings to realise that. Ergo, we get a lot of people trying out to be programmers but not entirely sure this is what they want, and bringing in that one key habit that got them through life: when you need to know something, ask someone. You have a leak in your bathroom and need a plumber? Ask someone if they know a good plumber! Whoever heard of the yellow pages? And the same thing online. Need help? Ask someone! They say there are these things called mailing lists where knowledgeable people hang out? Go there and ask someone! Does this mean they are mindless? No. It means they simply haven't had the incentive to understand how this stuff works. They are not trying to be good programmers. They're trying to have good careers with respect to the visible hierarchy around them. Someone actually had the same problem and the answer is recorded in web pages, which one can discover by typing key phrases into a search engine? Gee, what a novel concept! Whoever knew search engines could be used for anything more than popular keywords? -- Kiran Jonnalagadda http://jace.zaiki.in/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From scorpion032 at gmail.com Sat Jun 13 13:21:31 2009 From: scorpion032 at gmail.com (Lakshman Prasad) Date: Sat, 13 Jun 2009 16:51:31 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <4A322421.2060101@taupro.com> <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> Message-ID: This is not the first time someone has questioned, why it is Indians most often caught asking questions without a little basic research. There has been an interesting discussion on this topic on reddit recently. http://www.reddit.com/r/programming/comments/7wnha/more_hword_confusion_a_blog_post_about_clever/c07m4ci Incidentally the tone expressed in this email is exactly same as the discussion there! On Sat, Jun 13, 2009 at 4:07 PM, Kiran Jonnalagadda wrote: > 2009/6/12 Srijayanth Sridhar : > > I don't doubt that its a global phenomenon, however, I am still curious > > about the reasons for its prevalence out here. > > I will add my little theory to this discussion. > > If you are from a middle class background with no appetite for > entrepreneurial risk, but want a better life than your parents did, there > are few professional career options. > > Doctor? Architect? Lawyer? They require dedicating a serious chunk of your > life and are one-way streets. But programmer... excuse me, software > developer? By gosh, a big company will make a software developer out of > anyone in just three months, plus you get to go abroad and settle down. If > it doesn't work, no big deal. You didn't invest five years and half your > parents' savings to realise that. > > Ergo, we get a lot of people trying out to be programmers but not entirely > sure this is what they want, and bringing in that one key habit that got > them through life: when you need to know something, ask someone. > > You have a leak in your bathroom and need a plumber? Ask someone if they > know a good plumber! Whoever heard of the yellow pages? > > And the same thing online. Need help? Ask someone! They say there are these > things called mailing lists where knowledgeable people hang out? Go there > and ask someone! > > Does this mean they are mindless? No. It means they simply haven't had the > incentive to understand how this stuff works. They are not trying to be good > programmers. They're trying to have good careers with respect to the visible > hierarchy around them. > > Someone actually had the same problem and the answer is recorded in web > pages, which one can discover by typing key phrases into a search engine? > Gee, what a novel concept! Whoever knew search engines could be used for > anything more than popular keywords? > > > -- > Kiran Jonnalagadda > http://jace.zaiki.in/ > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- Regards, Lakshman becomingguru.com lakshmanprasad.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From scorpion032 at gmail.com Sat Jun 13 13:30:29 2009 From: scorpion032 at gmail.com (Lakshman Prasad) Date: Sat, 13 Jun 2009 17:00:29 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <200906130730.14568.lawgon@au-kbc.org> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <5ead360a0906112351x7f24cecfg441c5003ec5013bb@mail.gmail.com> <200906130730.14568.lawgon@au-kbc.org> Message-ID: > Take TCS, they have 50K java programmers- they can't afford to retrain them. It is not so much the effort involved to retrain in a particular programming language as it is to change the prevelant culture. I am curious to see how they change and adapt, as I am skeptical that the cost difference advantage will sustain them for a much longer time. On Sat, Jun 13, 2009 at 7:30 AM, Kenneth Gonsalves wrote: > On Friday 12 June 2009 14:05:18 Mandar Gokhale wrote: > > Jayanth: I've come to lament the factory like nature of IT in India. > People > > learn extremely minimal subset of specialized skills. I've had chaps who > > can't see beyond .NET or Java very simply because these are industry > > idioms. I tell them stuff about perl, python or ruby and I get back "but > > those are scripting languages". > > > > > > Just a slightly unrelated question here.......doesn't the industry follow > > .NET and Java more than Python/Perl as well? (I've heard this said by > > several people in the States as well.) So maybe a change in the industry > > mindset would help.. > > there is a pecking order - generally Java programmers are at the top of the > heap. They usually would not even condescend to _talk_ to a non-java > programmer. If you cannot write 5000 lines of UML to generate 10000 lines > of > XML to generate 50000 lines of java code, you are no one. > > the next in the food chain are DOTNET guys - ability to click, drag and > drop > is essential. Ability to think is optional (at times actionable). > > and at the bottom of the food chain are the scripting guys - also useful to > send round the corner for coffee. > > but the moment these guys leave industry - guess what language they choose? > > and why do the corporates not change? Take TCS, they have 50K java > programmers > - they can't afford to retrain them. So it is not a question of Java is > best > for enterprise (we all know python is the best), but a question of > enterprise > has invested too much in java programmers and cannot afford to shift from > java > (or dotnet as the case may be) > > -- > regards > Kenneth Gonsalves > Associate > NRC-FOSS > http://nrcfosshelpline.in/web/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Regards, Lakshman becomingguru.com lakshmanprasad.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmathews at gmail.com Sun Jun 14 05:24:30 2009 From: rmathews at gmail.com (Roshan Mathews) Date: Sun, 14 Jun 2009 08:54:30 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <4A322421.2060101@taupro.com> <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> Message-ID: <1c4dc2780906132024g2647c765ocb595254c01cb9f5@mail.gmail.com> On Sat, Jun 13, 2009 at 4:07 PM, Kiran Jonnalagadda wrote: > I will add my little theory to this discussion. > Hahahaha .... :D Nice writeup. From sriramnrn at gmail.com Sun Jun 14 07:14:57 2009 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Sun, 14 Jun 2009 10:44:57 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <49977f270906112343i3645db81n3d57fff5b2836e7d@mail.gmail.com> <1c4dc2780906120129m561b80ebk536a3e90271dd651@mail.gmail.com> <200906121409.52556.lawgon@au-kbc.org> <5ead360a0906120200t2dc81ec7jcf69a117ce1b9914@mail.gmail.com> <5ead360a0906120212p30d8fe73q8e04e646b6f704a6@mail.gmail.com> <4A322421.2060101@taupro.com> <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> Message-ID: <49977f270906132214r1b711e44t4491cadd3430122a@mail.gmail.com> On Sat, Jun 13, 2009 at 4:07 PM, Kiran Jonnalagadda wrote: > 2009/6/12 Srijayanth Sridhar : >> I don't doubt that its a global phenomenon, however, I am still curious >> about the reasons for its prevalence out here. > > I will add my little theory to this discussion. > > If you are from a middle class background with no appetite for > entrepreneurial risk, but want a better life than your parents did, there > are few professional career options. > > Doctor? Architect? Lawyer? They require dedicating a serious chunk of your > life and are one-way streets. But programmer... excuse me, software > developer? By gosh, a big company will make a software developer out of > anyone in just three months, plus you get to go abroad and settle down. If > it doesn't work, no big deal. You didn't invest five years and half your > parents' savings to realise that. +1 to your theory. Around 1997, I used to work as a lab assistant at Aptech (A computer education chain.) in Mumbai. I've seen parents visit the Aptech centre with their supposedly good for nothing sons, learn about the course options, get swayed by the glorious future that the "career counsellors" promise them, and then say to their sons, "Since you don't seem to be good at anything else, at least do a computer course". -- Sriram From lawgon at au-kbc.org Sun Jun 14 07:45:41 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Sun, 14 Jun 2009 11:15:41 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> Message-ID: <200906141115.42055.lawgon@au-kbc.org> On Saturday 13 June 2009 16:07:42 Kiran Jonnalagadda wrote: > Doctor? Architect? Lawyer? They require dedicating a serious chunk of your > life and are one-way streets. not so. I am just back from interviewing over a hundred would-be programmers whose parents have dedicated a serious chunk of their cash to put them through and engineering degree. And now they are jobless and unemployable. It is also not true that Doctor? Architect? Lawyer? are one-way streets. I know an architect who is now an IT professional, and a lawyer who is on his way there. And several doctors who have done serious programming. If you really analyse things you will find that the people who embarrass us are almost invariably engineering or MCA graduates from the formal stream. The people from the informal stream - like aptech/NIIT graduates very rarely stray away from the tools they are taught. I find, in India anyway, the best programmers seem to be people who have _not_ formally studied programming. Even from engineering the EEE and ECE guys seem far more likely to go the self-learning path that we are looking at. Again there is a clear distinction between people who are taught and people who learn. Most of those who are taught expect to be taught their whole lives - and those who learn ... -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From abpillai at gmail.com Sun Jun 14 08:00:49 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Sun, 14 Jun 2009 11:30:49 +0530 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <200906141115.42055.lawgon@au-kbc.org> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <5ead360a0906120302k1158c78el51934b8f961e0e3@mail.gmail.com> <200906141115.42055.lawgon@au-kbc.org> Message-ID: <8548c5f30906132300h23d99464m9b380c5889273731@mail.gmail.com> On Sun, Jun 14, 2009 at 11:15 AM, Kenneth Gonsalves wrote: > On Saturday 13 June 2009 16:07:42 Kiran Jonnalagadda wrote: > > Doctor? Architect? Lawyer? They require dedicating a serious chunk of > your > > life and are one-way streets. > > not so. I am just back from interviewing over a hundred would-be > programmers > whose parents have dedicated a serious chunk of their cash to put them > through > and engineering degree. And now they are jobless and unemployable. It is > also > not true that Doctor? Architect? Lawyer? are one-way streets. I know an > architect who is now an IT professional, and a lawyer who is on his way > there. > And several doctors who have done serious programming. > > If you really analyse things you will find that the people who embarrass us > are > almost invariably engineering or MCA graduates from the formal stream. The > people from the informal stream - like aptech/NIIT graduates very rarely > stray > away from the tools they are taught. > > I find, in India anyway, the best programmers seem to be people who have > _not_ > formally studied programming. Even from engineering the EEE and ECE guys > seem > far more likely to go the self-learning path that we are looking at. > > Again there is a clear distinction between people who are taught and people > who learn. Most of those who are taught expect to be taught their whole > lives > - and those who learn ... I am a Mech. Engineer by degree but a self-taught developer/software engineer (I won't call myself just a "programmer", to me it is someone who writes code when given specs, I am more than that). I taught myself C while in 3rd sem at college. I got my first job through campus and since then I have been through 6-7 jobs, jumping from one to next when there was no "fun" in the project any more. I taught myself C++ in my 2nd year at work, Java in my 4th year and Python about the same time, after a fruitless wrestling with Perl where I was retired hurt. I have never sat on a Python course, but has conducted a couple of Python trainings abroad in universities to CS professors with more than 15-20 yrs of experience. I am still a student of CS languages, trying out everything from Ruby, groovy, erlang to D. I think there is still fire within me to learn and master a couple of languages more though time is a problem right now... I completely agree with Kenneth. Those who teach themselves things, continue to learn, those who are taught always expect to be taught and stop learning quickly. But then it is another fact that the former continue to be successful engineers and the latter become managers, who go on to prove Peter's principle true in their careers. > -- > regards > Kenneth Gonsalves > Associate > NRC-FOSS > http://nrcfosshelpline.in/web/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Mon Jun 15 09:05:23 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Mon, 15 Jun 2009 12:35:23 +0530 Subject: [BangPypers] Good Python training in blr Message-ID: <5ead360a0906150005s2b694f02g1ca4179a7cc167bd@mail.gmail.com> Hello, Are there any good python training programs in Bangalore? Can anybody point me in the right direction? This isn't for me, its for colleagues who might need to learn Python for an upcoming project. Thank you, Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at taupro.com Mon Jun 15 10:15:53 2009 From: jeff at taupro.com (Jeff Rush) Date: Mon, 15 Jun 2009 03:15:53 -0500 Subject: [BangPypers] How to create Debug and Release code in Python In-Reply-To: References: Message-ID: <4A360339.5060809@taupro.com> Vishal wrote: > > *Is there a way to create a conditionally compilable Python script > ?* Some facility that would prevent from code getting compiled into > ".pyc"....something like the old #ifdef #endif preprocessor > directives....is there a Python preprocessory available :) The way to create conditionally compiled Python is to use Python. ;-) You can place if-then statements in places you might not expect if you are coming from something like C/C++. if PRODUCTION: def function(): pass else: def function(): pass The if-then is executed only once at the time the module is imported, minimizing the overhead cost. If you place the if-then -inside- a function, then of course you pay the price each time the function is called, which you expressed a wish to avoid. You can use this also with class methods: class SomeClass: if PRODUCTION: def __init__(self): pass else: def __init__(self): pass This case is also only performed at module import time, not each time the class is used. For some kinds of changes it can be useful to apply decorators conditionally, either method decorators: class SomeClass: def methodA(self): pass def methodB(self): pass if not PRODUCTION: methodA = DebuggingWrapper(methodA) methodB = DebuggingWrapper(methodB) Or class decorators: class SomeClass: def methodA(self): pass def methodB(self): pass if not PRODUCTION: SomeClass = DebuggingWrapper(SomeClass) An example of a wrapper for a class could be: import inspect def memoize_get_methods(klass): for _, method in inspect.getmembers(klass, inspect.ismethod): if method.__name__.startswith('get'): setattr(klass, method.__name__, memoized_method(method)) Such a wrapper could manipulate or register selected methods, functions or attributes, one time at import time. An example of this is a memoizer, where if you call a method with the same arguments it remembers what it returned last time and just returns that instead of re-calculating the result each time. def memoized_method(method): def wrapped(self, *args, **kw): key = tuple(args) + tuple(kw) try: return method.cache[key] except KeyError: result = method(self, *args, **kw) method.cache[key] = result return result method.im_func.cache = {} return wrapped These are just some ideas of what is possible since I'm not familiar with what kind of changes your developers experiment with, whether high-level (which these approaches are good for) or low-level (where #ifdef works better). I gave a talk at PyCon 2009 about namespaces and code blocks that use diagrams to illustrate the difference in Python between import time and run time. You can find the video, slides and tools used at: http://us.pycon.org/2009/conference/schedule/event/7/ > if thats doable I can ask them to make all experimental modifications > within the conditional directives. I could still ask them to do that > using simple if's and bool parameters, however, putting too many ifs > might degrade the performance of these scripts. ("the lesser the > branches the better it is for processor performance...more so for super > scalar processors") The "less branches the better" concept is not really relevant for an interpreted language like Python. The interpreter is doing a lot of subroutine calling and branching for you as it executes each bytecode in software. Less branching is only relevant when the code is executed in hardware. You will have a performance overhead in Python if your if-then clauses are sprinkled through the bodies of functions/methods, just because they are executed each time control passes through that point. It is best though from a maintainability viewpoint not to do that. There are many books about programming, some of the C/C++ programming philosophy books, that talk about how adding such small debug-specific logic pieces make it hard to remove them later without introducing bugs. > We cannot use the, often unknown, __debug__ flag, because our users > would like to simply double-click on a python file, which means to use > the -O or -OO options (which sets __debug__ to False) we'd have to make > windows python command line have these, and then double clicking would > be of no use if you want the run stuff inside the __debug__. I'm confused - the "production" users want to click on an icon to start the program but then they don't need the "debug" flag so that isn't a problem. Your developers however run from the command-line so they -can- specify a debug or other flag at the time they invoke it. Each are happy so what is the problem with using the __debug__ flag again? -Jeff From orsenthil at gmail.com Tue Jun 16 04:26:08 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Tue, 16 Jun 2009 07:56:08 +0530 Subject: [BangPypers] Good Python training in blr Message-ID: <20090616022608.GA4284@ubuntu.ubuntu-domain> On Mon, Jun 15, 2009 at 12:35:23PM +0530, Srijayanth Sridhar wrote: > Hello, > > Are there any good python training programs in Bangalore? Can anybody point me > in the right direction? This isn't for me, its for colleagues who might need to > learn Python for an upcoming project. Please search the archives of the group, few of the members had listed their training programmes. You might want to contact them (if they have not contacted you already). There are good freelancers who can take up the training too. -- Senthil From lawgon at au-kbc.org Tue Jun 16 06:43:02 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 16 Jun 2009 10:13:02 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: <20090616022608.GA4284@ubuntu.ubuntu-domain> References: <20090616022608.GA4284@ubuntu.ubuntu-domain> Message-ID: <200906161013.02583.lawgon@au-kbc.org> On Tuesday 16 June 2009 07:56:08 Senthil Kumaran wrote: > On Mon, Jun 15, 2009 at 12:35:23PM +0530, Srijayanth Sridhar wrote: > > Hello, > > > > Are there any good python training programs in Bangalore? Can anybody > > point me in the right direction? This isn't for me, its for colleagues > > who might need to learn Python for an upcoming project. > > Please search the archives of the group, few of the members had listed > their training programmes. You might want to contact them (if they > have not contacted you already). frankly people who need to be _trained_ in python can't be of much calibre. I can understand using python to train people in programming, but not the other way around. -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From banibrata.dutta at gmail.com Tue Jun 16 06:53:04 2009 From: banibrata.dutta at gmail.com (Banibrata Dutta) Date: Tue, 16 Jun 2009 10:23:04 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: <200906161013.02583.lawgon@au-kbc.org> References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> Message-ID: <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> On Tue, Jun 16, 2009 at 10:13 AM, Kenneth Gonsalves wrote: > On Tuesday 16 June 2009 07:56:08 Senthil Kumaran wrote: > > On Mon, Jun 15, 2009 at 12:35:23PM +0530, Srijayanth Sridhar wrote: > > > Hello, > > > > > > Are there any good python training programs in Bangalore? Can anybody > > > point me in the right direction? This isn't for me, its for colleagues > > > who might need to learn Python for an upcoming project. > > > > Please search the archives of the group, few of the members had listed > > their training programmes. You might want to contact them (if they > > have not contacted you already). > > frankly people who need to be _trained_ in python can't be of much calibre. > I > can understand using python to train people in programming, but not the > other > way around. Isn't that too much of -ve assumption and generalisation ? I've known excellent programmers adept at using other languages, but a training helped them a lot with getting them quickly started. Of course, the mileage did vary, but the above generalisation is completely unfounded. -- regards, Banibrata http://www.linkedin.com/in/bdutta -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhananjay.nene at gmail.com Tue Jun 16 06:57:33 2009 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Tue, 16 Jun 2009 10:27:33 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: <200906161013.02583.lawgon@au-kbc.org> References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> Message-ID: On Tue, Jun 16, 2009 at 10:13 AM, Kenneth Gonsalves wrote: > > On Tuesday 16 June 2009 07:56:08 Senthil Kumaran wrote: > > On Mon, Jun 15, 2009 at 12:35:23PM +0530, Srijayanth Sridhar wrote: > > > Hello, > > > > > > Are there any good python training programs in Bangalore? Can anybody > > > point me in the right direction? This isn't for me, its for colleagues > > > who might need to learn Python for an upcoming project. > > > > Please search the archives of the group, few of the members had listed > > their training programmes. You might want to contact them (if they > > have not contacted you already). > > frankly people who need to be _trained_ in python can't be of much calibre. I > can understand using python to train people in programming, but not the other > way around. > -- > regards > Kenneth Gonsalves > Associate > NRC-FOSS > http://nrcfosshelpline.in/web/ I respect your calibre in training yourself. But cannot respect every organisation has the same luxury of waiting for programmers to train themselves so that they can eventually start using python. I trained myself in C and even parts of C++. But when I attended a training programme by one of the core C++ team members, it substantially expanded my capabilities on C++. Can't see how calibre is linked to being trained .. every one of us has the potential to be trained further - low, medium or high calibre. Dhananjay -- -------------------------------------------------------- blog: http://blog.dhananjaynene.com twitter: http://twitter.com/dnene From jayasimha.makineni at gmail.com Tue Jun 16 07:12:25 2009 From: jayasimha.makineni at gmail.com (jayasimha makineni) Date: Tue, 16 Jun 2009 10:42:25 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> Message-ID: Hi all, I have not touched Python for some time now. But I am willing to train any kind of people on a freelance basis. jayasimha -------------- next part -------------- An HTML attachment was scrubbed... URL: From lawgon at au-kbc.org Tue Jun 16 07:14:34 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Tue, 16 Jun 2009 10:44:34 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> Message-ID: <200906161044.35177.lawgon@au-kbc.org> On Tuesday 16 June 2009 10:23:04 Banibrata Dutta wrote: > > frankly people who need to be _trained_ in python can't be of much > > calibre. I > > can understand using python to train people in programming, but not the > > other > > way around. > > Isn't that too much of -ve assumption and generalisation ? I've known > excellent programmers adept at using other languages, but a training helped > them a lot with getting them quickly started. Of course, the mileage did > vary, but the above generalisation is completely unfounded. I was expressing a personal opinion. My experience in the few python trainings that I have done was that I ended up training people in programming rather than in python as such. And since I am not much of a programmer, I have given up conducting python training. The most I am willing to do is a ten minute session with the python shell and make sure people know the 'dir' and 'help' commands. I also found that most of the people I had 'trained' in python migrated back to the languages they came from (php or dotnet). As for languages like C, training makes more sense as it is a tough language - I have never managed to learn it. And training in perl makes even less sense as there are so many ways to do things that trainer and trainee will never see eye to eye. -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From ramdas at developeriq.com Tue Jun 16 07:29:19 2009 From: ramdas at developeriq.com (Ramdas S) Date: Tue, 16 Jun 2009 10:59:19 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: <200906161044.35177.lawgon@au-kbc.org> References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> <200906161044.35177.lawgon@au-kbc.org> Message-ID: <6e38f9f00906152229i4a6587c4if1fdb98652c784a0@mail.gmail.com> IMHO, even an experienced hand in C/C++ or Java need not take to Python easily, because of the baggage they carry, and they expect certain things to work the way their favorite language works. This can be quite frustrating if learning Python is for a project they need to start next Monday. This is where a trainer can help, because the trainer can guide and point out potential pitfalls, and get a developer through the basics in a jiffy. While most of us in this group are self taught Python developers and has perhaps enjoyed from the joys of self learning, it wont be a nice experience if someone targets that "I am going to be a Python developer by next week"! I guess getting trained is also more about productivity, also if the trainer is really good, then even an experienced Python developer can learn one or two new tips and tricks. On Tue, Jun 16, 2009 at 10:44 AM, Kenneth Gonsalves wrote: > On Tuesday 16 June 2009 10:23:04 Banibrata Dutta wrote: > > > frankly people who need to be _trained_ in python can't be of much > > > calibre. I > > > can understand using python to train people in programming, but not the > > > other > > > way around. > > > > Isn't that too much of -ve assumption and generalisation ? I've known > > excellent programmers adept at using other languages, but a training > helped > > them a lot with getting them quickly started. Of course, the mileage did > > vary, but the above generalisation is completely unfounded. > > I was expressing a personal opinion. My experience in the few python > trainings > that I have done was that I ended up training people in programming rather > than in python as such. And since I am not much of a programmer, I have > given > up conducting python training. The most I am willing to do is a ten minute > session with the python shell and make sure people know the 'dir' and > 'help' > commands. I also found that most of the people I had 'trained' in python > migrated back to the languages they came from (php or dotnet). > > As for languages like C, training makes more sense as it is a tough > language - > I have never managed to learn it. And training in perl makes even less > sense > as there are so many ways to do things that trainer and trainee will never > see > eye to eye. > -- > regards > Kenneth Gonsalves > Associate > NRC-FOSS > http://nrcfosshelpline.in/web/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Ramdas S +91 9342 583 065 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayasimha.makineni at gmail.com Tue Jun 16 07:32:07 2009 From: jayasimha.makineni at gmail.com (jayasimha makineni) Date: Tue, 16 Jun 2009 11:02:07 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: <200906161044.35177.lawgon@au-kbc.org> References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> <200906161044.35177.lawgon@au-kbc.org> Message-ID: Kenneth, You have been hitting the nail on its head repeatedly. I enjoy watching (reading) that. Let us train more programmers who can truly be *programmers*. Python is perhaps the best vehicle for that journey. My understanding is that those who claim to be good programmers do not like it if they are told on their face that they still learning to be just programmers. (What is wrong with life long learning anyway ? It is never late to learn). And their managers have an even worse feeling to face facts because they have to justify their salaries and other bills too. jayasimha -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmathews at gmail.com Tue Jun 16 08:03:29 2009 From: rmathews at gmail.com (Roshan Mathews) Date: Tue, 16 Jun 2009 11:33:29 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> Message-ID: <1c4dc2780906152303i19e582fax5af06b362e339112@mail.gmail.com> On Tue, Jun 16, 2009 at 10:27 AM, Dhananjay Nene wrote: > I respect your calibre in training yourself. But cannot respect every > organisation has the same luxury of waiting for programmers to train > themselves so that they can eventually start using python. I trained > myself in C and even parts of C++. But when I attended a training > programme by one of the core C++ team members, it substantially > expanded my capabilities on C++. Can't see how calibre is linked to > being trained .. every one of us has the potential to be trained > further - low, medium or high calibre. > What C++ core team member? :-/ Roshan From jeff at taupro.com Tue Jun 16 08:27:35 2009 From: jeff at taupro.com (Jeff Rush) Date: Tue, 16 Jun 2009 01:27:35 -0500 Subject: [BangPypers] How to create Debug and Release code in Python In-Reply-To: References: Message-ID: <4A373B57.6060706@taupro.com> Vishal wrote: > > *Is there a way to create a conditionally compilable Python script > ?* Some facility that would prevent from code getting compiled into > ".pyc"....something like the old #ifdef #endif preprocessor > directives....is there a Python preprocessory available :) I've given this more thought. In the April 2009 issue of Python Magazine is a wonderful article by Paul McGuire on writing Domain Specific Languages. It shows how to intercept the import of specific types of files to preprocess the source before compiling it into bytecode. I played with those ideas to see what could be done for your case. So say you had a module marked up with special commenting like: --- cut here --- abc.pyp def main(): print "Hello" #? DEBUG print "There" #? DEBUG2 print "World" --- cut here --- abc.pyp Then in your main module you could do the following: --- cut here --- demo.py import cond_importer # can put in site.py for global application import abc abc.main() --- cut here --- demo.py Now you run the program normally and get: $ python2.5 demo.py Hello There World or you can filter out lines using: $ EXCLUDES=DEBUG python2.5 demo.py There World or even: $ EXCLUDES=DEBUG:DEBUG2 python2.5 demo.py World The magic to make this happen is just: --- cut here --- cond_import.py from __future__ import with_statement # for Python < 2.6 import os import imputil import re patt = re.compile(r".*#\? (?P[_a-zA-Z][_a-zA-Z0-9]*)$") try: # construct a set of tags to exclude in .py source pyexcludes = frozenset(os.environ['EXCLUDES'].split(':')) except Exception: pyexcludes = frozenset() def preprocess_source(filepath, fileinfo, filename): src = [] with file(filepath, 'r') as f: for line in f: m = patt.match(line) if m is None or m.group('tag') not in pyexcludes: src.append(line) src = '\n'.join(src) codeobj = compile(src, filepath, 'exec') # create return tuple: # import flag (0=module, 1=package) # code object # dictionary of variable definitions return 0, codeobj, {} importer = imputil.ImportManager() importer.add_suffix('.pyp', preprocess_source) importer.install() --- cut here --- cond_import.py I arbitrarily chose a file extension of .pyp for files to preprocess but you could use anything. And the tags to exclude could instead be tags to include. For handling packages (dirs) instead of modules you'd have to add a test for file or directory and change the code a bit. Anyway it raises some interesting possibilities of preprocessing. Python is just so cool. -Jeff From jayasimha.makineni at gmail.com Tue Jun 16 08:34:10 2009 From: jayasimha.makineni at gmail.com (jayasimha makineni) Date: Tue, 16 Jun 2009 12:04:10 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> <200906161044.35177.lawgon@au-kbc.org> Message-ID: Sorry folks. Some editing on what i just typed. still learning >> still are learning to face >> when encouraged to face On Tue, Jun 16, 2009 at 11:02 AM, jayasimha makineni < jayasimha.makineni at gmail.com> wrote: > Kenneth, > > You have been hitting the nail on its head repeatedly. I enjoy watching > (reading) that. > > Let us train more programmers who can truly be *programmers*. Python is > perhaps the best vehicle for that journey. My understanding is that those > who claim to be good programmers do not like it if they are told on their > face that they still learning to be just programmers. (What is wrong with > life long learning anyway ? It is never late to learn). And their managers > have an even worse feeling to face facts because they have to justify their > salaries and other bills too. > > jayasimha > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sriramnrn at gmail.com Tue Jun 16 08:46:28 2009 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Tue, 16 Jun 2009 12:16:28 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: <6e38f9f00906152229i4a6587c4if1fdb98652c784a0@mail.gmail.com> References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> <200906161044.35177.lawgon@au-kbc.org> <6e38f9f00906152229i4a6587c4if1fdb98652c784a0@mail.gmail.com> Message-ID: <49977f270906152346w517350b0tcfff539907743fa5@mail.gmail.com> On Tue, Jun 16, 2009 at 10:59 AM, Ramdas S wrote: > IMHO, even an experienced hand in C/C++ or Java need not take to Python > easily, because of the baggage they carry, and they expect certain things to > work the way their favorite language works. This can be quite frustrating if > learning Python is for a project they need to start next Monday. This is > where a trainer can help, because the trainer can guide and point out > potential pitfalls, and get a developer through the basics in a jiffy. > This baggage is indeed an issue. Thinking in terms of a new language would require reading a lot of code written using that language, and then too, one cannot be certain. To give you my own example, I learned my Object Oriented Programming from really senior Smalltalkers, and I developed and sold components based on excellent IBM business object frameworks. After I joined Thoughtworks, I was exposed to a different world where dependency injection was proposed as an alternative to getters and setters (accessors, as some of us may call them), where the line between "do the simplest thing possible" and "do what ever is necessary to complete just _your_ work for the day" can be a fine line, and where the same Java language that I had used for six years, was now being used in a different way. I had a lot of excess luggage, some of which I still lug around with me - and all this was on the same language that I had been using. When you move to a different language, there would have to be paradigm shifts, new ways of thinking, and even pitfalls that one may not recognize to be a pitfall. In such cases, I feel that it can help if one has something like "Python for Java programmers" - either as a book, as a series of sample code and or web page articles, or even a training session. -- Sriram From sriramnrn at gmail.com Tue Jun 16 08:48:11 2009 From: sriramnrn at gmail.com (Sriram Narayanan) Date: Tue, 16 Jun 2009 12:18:11 +0530 Subject: [BangPypers] How to create Debug and Release code in Python In-Reply-To: <4A373B57.6060706@taupro.com> References: <4A373B57.6060706@taupro.com> Message-ID: <49977f270906152348w1f895bf7jee20e178885e613d@mail.gmail.com> On Tue, Jun 16, 2009 at 11:57 AM, Jeff Rush wrote: > I've given this more thought. ?In the April 2009 issue of Python > Magazine is a wonderful article by Paul McGuire on writing Domain > Specific Languages. ?It shows how to intercept the import of specific > types of files to preprocess the source before compiling it into > bytecode. ?I played with those ideas to see what could be done for your > case. > This was informative. Thank you ! -- Sriram From srijayanth at gmail.com Tue Jun 16 09:35:03 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Tue, 16 Jun 2009 13:05:03 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> <200906161044.35177.lawgon@au-kbc.org> Message-ID: <5ead360a0906160035n7fb4645bodd951109e1ff1c24@mail.gmail.com> On Tue, Jun 16, 2009 at 11:02 AM, jayasimha makineni < jayasimha.makineni at gmail.com> wrote: > Kenneth, > > You have been hitting the nail on its head repeatedly. I enjoy watching > (reading) that. > > Let us train more programmers who can truly be *programmers*. Python is > perhaps the best vehicle for that journey. My understanding is that those > who claim to be good programmers do not like it if they are told on their > face that they still learning to be just programmers. (What is wrong with > life long learning anyway ? It is never late to learn). And their managers > have an even worse feeling to face facts because they have to justify their > salaries and other bills too. > > jayasimha > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > You seem to be questioning the wrong problem. What you state might be entirely true but is irrelevant in this context. Any given company has a million kabillion things to do. Resources are precious, and allowing them to self-learn on company time is not exactly a wise financial decision. There is no easy way to monitor them and measure their progress if they do self-learn. A lot of people might not take to the decision seriously enough and as mentioned by other posters, might carry around serious paradigm based baggage. Several C/C++ people I've known take their time to find their footing with perl, esp with using Hash as an important data structure. While specific corporate training might not be any better at improving this than self help, a training course could be structured well enough to stress on idiomatic concepts that they might never find out by reading certain books or looking at certain sites. Also, while I do advocate self-help, I honestly believe that a sense of curiosity is > than the sources you learn from. Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From banibrata.dutta at gmail.com Tue Jun 16 10:33:45 2009 From: banibrata.dutta at gmail.com (Banibrata Dutta) Date: Tue, 16 Jun 2009 14:03:45 +0530 Subject: [BangPypers] Good Python training in blr In-Reply-To: References: <20090616022608.GA4284@ubuntu.ubuntu-domain> <200906161013.02583.lawgon@au-kbc.org> <3de8e1f70906152153o44f1ce44r3a618a639f31646b@mail.gmail.com> <200906161044.35177.lawgon@au-kbc.org> Message-ID: <3de8e1f70906160133x4c6e660tf7bf5dc829a76eaf@mail.gmail.com> On Tue, Jun 16, 2009 at 11:02 AM, jayasimha makineni < jayasimha.makineni at gmail.com> wrote: > > Let us train more programmers who can truly be *programmers*. Python is How do you make that decision ? Is there an objective set of criterion ? > perhaps the best vehicle for that journey. My understanding is that those > who Advocacy isn't the subject matter, I believe ! :-) There is "a best tool" for every job, and very rarely, "one best tool" for every job !! > And their managers have an even worse feeling to face facts because they > have to justify their salaries and other bills too. > First thing is for the managers to justify their own salaries. IMHO, talking of lacunae, we are riddled with a defunct hierarchy of managers who switched tracks because they could no longer keep up with the productivity and smartness of younger, smarter and more agile bunch of engineers !! of course, that is generalisation streched too far... but i doubt, too detached from reality. -- regards, Banibrata http://www.linkedin.com/in/bdutta -------------- next part -------------- An HTML attachment was scrubbed... URL: From tiwariabhishekin at gmail.com Tue Jun 16 15:52:55 2009 From: tiwariabhishekin at gmail.com (Abhishek Tiwari) Date: Tue, 16 Jun 2009 19:22:55 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> Message-ID: <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> *Question :* The first list contains some items, and the second list contains their value (higher is better). items = [apple, car, town, phone] values = [5, 2, 7, 1] Show how to sort the 'items' list based on the 'values' list so that you end up with the following two lists: items = [town, apple, car, phone] values = [7, 5, 2, 1] *Ans. 1* values, items = list(zip(*sorted(zip(values,items), reverse=True))) *Ans. 2* new_values = sorted(values, reverse=True) new_items = [items[x] for x in map(values.index,new_values)] I would like to know which method is better and why? -- With Regards, Abhishek Tiwari -------------- next part -------------- An HTML attachment was scrubbed... URL: From pradeep at btbytes.com Tue Jun 16 16:42:15 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Tue, 16 Jun 2009 10:42:15 -0400 Subject: [BangPypers] which is better solution of the question In-Reply-To: <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> Message-ID: <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> On Tue, Jun 16, 2009 at 9:52 AM, Abhishek Tiwari wrote: > I would like to know which method is better and why? Better for what purpose? 1. speed of execution? 2. elegance? More importantly, which method do you think is better and why? +PG From pradeep at btbytes.com Tue Jun 16 16:48:29 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Tue, 16 Jun 2009 10:48:29 -0400 Subject: [BangPypers] which is better solution of the question In-Reply-To: <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> Message-ID: <3e3294b70906160748h7ac83994uaa64d3441902ce01@mail.gmail.com> On Tue, Jun 16, 2009 at 9:52 AM, Abhishek Tiwari wrote: > I would like to know which method is better and why? Looks like this exact question was discussed earlier here: http://www.nabble.com/sorting-two-corresponding-lists--td23139787.html From pradeep at btbytes.com Tue Jun 16 17:58:32 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Tue, 16 Jun 2009 11:58:32 -0400 Subject: [BangPypers] which is better solution of the question In-Reply-To: <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> Message-ID: <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> On Tue, Jun 16, 2009 at 10:42 AM, Pradeep Gowda wrote: > On Tue, Jun 16, 2009 at 9:52 AM, Abhishek > Tiwari wrote: >> I would like to know which method is better and why? > > Better for what purpose? > 1. speed of execution? > 2. elegance? The list comprehension solution is slightly more approachable (many are not familiar with the zip() function. I don't use zip on the first go, if at all.) The zip solution is succinct. Also, by the virtue of being a built-in function zip() should be faster than the second approach. I wrote a script to test this hypothesis : http://dpaste.com/55994/ The zip() version is 100 times faster on average than the other solution. # avg time taken for ans1 : 0.0035585308075 # avg time taken for ans2 : 0.306885209084 (averaged over 50 runs) +PG From anandology at gmail.com Tue Jun 16 18:39:32 2009 From: anandology at gmail.com (Anand Chitipothu) Date: Tue, 16 Jun 2009 22:09:32 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> Message-ID: <41139fcb0906160939v6aabce37w92cf613774d0ab46@mail.gmail.com> 2009/6/16 Abhishek Tiwari : > Question : > The first list contains some items, and the second list contains their value > (higher is better). > > items = [apple, car, town, phone] > values = [5, 2, 7, 1] > > Show how to sort the 'items' list based on the 'values' list so that you end > up with the following two lists: > > items = [town, apple, car, phone] > values = [7, 5, 2, 1] > > Ans. 1 > > values, items = list(zip(*sorted(zip(values,items), reverse=True))) > > Ans. 2 > new_values = sorted(values, reverse=True) > new_items = [items[x] for x in map(values.index,new_values)] > > > I would like to know which method is better and why? How about this? d = dict(zip(items, values)) new_items = sorted(items, key=d.__getitem__, reverse=True) From anandology at gmail.com Tue Jun 16 18:35:38 2009 From: anandology at gmail.com (Anand Chitipothu) Date: Tue, 16 Jun 2009 22:05:38 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> Message-ID: <41139fcb0906160935k26c1119n2edbc38b89b61d2e@mail.gmail.com> > The zip solution is succinct. > > Also, by the virtue of being a built-in function zip() should be > faster than the second approach. Complexity of first solution is O(n) and complexity of second solution is O(n^2) because it using values.index function, which is O(n). From orsenthil at gmail.com Tue Jun 16 18:40:49 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Tue, 16 Jun 2009 22:10:49 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> Message-ID: <20090616164049.GA17884@ubuntu.ubuntu-domain> On Tue, Jun 16, 2009 at 11:58:32AM -0400, Pradeep Gowda wrote: > > On Tue, Jun 16, 2009 at 9:52 AM, Abhishek > > Tiwari wrote: > >> I would like to know which method is better and why? Abhishek, whichever you understand best is better. > I wrote a script to test this hypothesis : http://dpaste.com/55994/ > The zip() version is 100 times faster on average than the other solution. Pradeep: Here is a surprise: http://dpaste.com/hold/56023/ -- Senthil From pradeep at btbytes.com Tue Jun 16 18:55:28 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Tue, 16 Jun 2009 12:55:28 -0400 Subject: [BangPypers] which is better solution of the question In-Reply-To: <20090616164049.GA17884@ubuntu.ubuntu-domain> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> <20090616164049.GA17884@ubuntu.ubuntu-domain> Message-ID: <3e3294b70906160955v183e012cje568e8777514731a@mail.gmail.com> On Tue, Jun 16, 2009 at 12:40 PM, Senthil Kumaran wrote: > > On Tue, Jun 16, 2009 at 11:58:32AM -0400, Pradeep Gowda wrote: > >> > On Tue, Jun 16, 2009 at 9:52 AM, Abhishek >> > Tiwari wrote: >> >> I would like to know which method is better and why? > > > Abhishek, whichever you understand best is better. > > >> I wrote a script to test this hypothesis : http://dpaste.com/55994/ >> The zip() version is 100 times faster on average than the other solution. > > Pradeep: > Here is a surprise: > http://dpaste.com/hold/56023/ I know about the timeit module. Was too lazy to look up the docs. From orsenthil at gmail.com Tue Jun 16 19:42:01 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Tue, 16 Jun 2009 23:12:01 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <3e3294b70906160955v183e012cje568e8777514731a@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> <20090616164049.GA17884@ubuntu.ubuntu-domain> <3e3294b70906160955v183e012cje568e8777514731a@mail.gmail.com> Message-ID: <20090616174201.GA4314@ubuntu.ubuntu-domain> On Tue, Jun 16, 2009 at 12:55:28PM -0400, Pradeep Gowda wrote: > >> I wrote a script to test this hypothesis : http://dpaste.com/55994/ > >> The zip() version is 100 times faster on average than the other solution. > > > > Pradeep: > > Here is a surprise: > > http://dpaste.com/hold/56023/ > > I know about the timeit module. Was too lazy to look up the docs. The surprise was in the results obtained. -- Senthil From pradeep at btbytes.com Tue Jun 16 19:57:20 2009 From: pradeep at btbytes.com (Pradeep Gowda) Date: Tue, 16 Jun 2009 13:57:20 -0400 Subject: [BangPypers] which is better solution of the question In-Reply-To: <20090616174201.GA4314@ubuntu.ubuntu-domain> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> <20090616164049.GA17884@ubuntu.ubuntu-domain> <3e3294b70906160955v183e012cje568e8777514731a@mail.gmail.com> <20090616174201.GA4314@ubuntu.ubuntu-domain> Message-ID: <3e3294b70906161057x61400af0m477dcb0b8d7eae2e@mail.gmail.com> On Tue, Jun 16, 2009 at 1:42 PM, Senthil Kumaran wrote: > On Tue, Jun 16, 2009 at 12:55:28PM -0400, Pradeep Gowda wrote: >> >> I wrote a script to test this hypothesis : http://dpaste.com/55994/ >> >> The zip() version is 100 times faster on average than the other solution. >> > >> > Pradeep: >> > Here is a surprise: >> > http://dpaste.com/hold/56023/ >> >> I know about the timeit module. Was too lazy to look up the docs. > > The surprise was in the results obtained. Oops, did not notice that :) Doesn't that contradict the time complexity explanation given by Anand? Mind running your tests with a larger dataset like the one I used and sharing the results? +PG From jeff at taupro.com Tue Jun 16 20:31:54 2009 From: jeff at taupro.com (Jeff Rush) Date: Tue, 16 Jun 2009 13:31:54 -0500 Subject: [BangPypers] which is better solution of the question In-Reply-To: <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> Message-ID: <4A37E51A.3080803@taupro.com> Abhishek Tiwari wrote: > > *Ans. 1* > > values, items = list(zip(*sorted(zip(values,items), reverse=True))) > > *Ans. 2* > new_values = sorted(values, reverse=True) > new_items = [items[x] for x in map(values.index,new_values)] > > I would like to know which method is better and why? The first one is better because the second one has a bug. ;-) Because of the way the second one uses values.index, it assumes there is a unique mapping between items and values. When a duplicate integer appears in values, the second solution returns the wrong answer. -Jeff From vsapre80 at gmail.com Tue Jun 16 21:59:30 2009 From: vsapre80 at gmail.com (Vishal) Date: Wed, 17 Jun 2009 01:29:30 +0530 Subject: [BangPypers] How to create Debug and Release code in Python In-Reply-To: <4A373B57.6060706@taupro.com> References: <4A373B57.6060706@taupro.com> Message-ID: Cool....While I was using preprocessor directives in C/C++...the usual internet rant I've always heard, is "preprocessor is bad, using preprocessor is bad habit.". Somehow I feel that preprocessing is not all that bad. It can and does solve important problems. May be these rants mostly referred to the 'macro' side of things... Thanks a lot Jeff, this was really informative. Vishal On Tue, Jun 16, 2009 at 11:57 AM, Jeff Rush wrote: > Vishal wrote: > > > > *Is there a way to create a conditionally compilable Python script > > ?* Some facility that would prevent from code getting compiled into > > ".pyc"....something like the old #ifdef #endif preprocessor > > directives....is there a Python preprocessory available :) > > I've given this more thought. In the April 2009 issue of Python > Magazine is a wonderful article by Paul McGuire on writing Domain > Specific Languages. It shows how to intercept the import of specific > types of files to preprocess the source before compiling it into > bytecode. I played with those ideas to see what could be done for your > case. > > So say you had a module marked up with special commenting like: > > --- cut here --- abc.pyp > def main(): > print "Hello" #? DEBUG > print "There" #? DEBUG2 > print "World" > --- cut here --- abc.pyp > > Then in your main module you could do the following: > > --- cut here --- demo.py > import cond_importer # can put in site.py for global application > > import abc > abc.main() > --- cut here --- demo.py > > Now you run the program normally and get: > > $ python2.5 demo.py > Hello > There > World > > or you can filter out lines using: > > $ EXCLUDES=DEBUG python2.5 demo.py > There > World > > or even: > > $ EXCLUDES=DEBUG:DEBUG2 python2.5 demo.py > World > > The magic to make this happen is just: > > --- cut here --- cond_import.py > from __future__ import with_statement # for Python < 2.6 > > import os > import imputil > import re > > patt = re.compile(r".*#\? (?P[_a-zA-Z][_a-zA-Z0-9]*)$") > > try: # construct a set of tags to exclude in .py source > pyexcludes = frozenset(os.environ['EXCLUDES'].split(':')) > except Exception: > pyexcludes = frozenset() > > def preprocess_source(filepath, fileinfo, filename): > > src = [] > with file(filepath, 'r') as f: > for line in f: > m = patt.match(line) > if m is None or m.group('tag') not in pyexcludes: > src.append(line) > > src = '\n'.join(src) > codeobj = compile(src, filepath, 'exec') > > # create return tuple: > # import flag (0=module, 1=package) > # code object > # dictionary of variable definitions > return 0, codeobj, {} > > importer = imputil.ImportManager() > importer.add_suffix('.pyp', preprocess_source) > importer.install() > --- cut here --- cond_import.py > > I arbitrarily chose a file extension of .pyp for files to preprocess but > you could use anything. And the tags to exclude could instead be tags > to include. For handling packages (dirs) instead of modules you'd have > to add a test for file or directory and change the code a bit. > > Anyway it raises some interesting possibilities of preprocessing. > Python is just so cool. > > -Jeff > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsapre80 at gmail.com Tue Jun 16 22:09:42 2009 From: vsapre80 at gmail.com (Vishal) Date: Wed, 17 Jun 2009 01:39:42 +0530 Subject: [BangPypers] How to create Debug and Release code in Python In-Reply-To: References: <4A373B57.6060706@taupro.com> Message-ID: I had come across two separate modules that did something on the same lines.one is 'pypp' and the other is 'preprocess.py' from ActiveState. in the former, if the file contains a comment '#pypp" somewhere in the file...it gets preprocessed....but it only uses MakoTemplates for preprocessing..and so you need to have Mako on your machine. the later, preprocess.py is a script that looks for specific tagged comments like #ifdef, #ifndef etc and creates another file...after preprocessing. A marriage between the two seems to be this Imputil thing from Paul McGuire :)) One of the things that needs to be done...is, if a upper layer import is working like this: # ---- topMod.py --- import something.onething as one import something.anotherthing as another And 'onething.py' and 'anotherthing.py' contain the preprocessor directives...the new file that gets made and is loaded....should now be loaded with their respective module names(i.e. 'one' and 'another'). Need to do something for this.... Python is certainly...cool. Enjoy, Vishal On Wed, Jun 17, 2009 at 1:29 AM, Vishal wrote: > Cool....While I was using preprocessor directives in C/C++...the usual > internet rant I've always heard, is "preprocessor is bad, using preprocessor > is bad habit.". Somehow I feel that preprocessing is not all that bad. It > can and does solve important problems. May be these rants mostly referred to > the 'macro' side of things... > > Thanks a lot Jeff, this was really informative. > > Vishal > > On Tue, Jun 16, 2009 at 11:57 AM, Jeff Rush wrote: > >> Vishal wrote: >> > >> > *Is there a way to create a conditionally compilable Python script >> > ?* Some facility that would prevent from code getting compiled into >> > ".pyc"....something like the old #ifdef #endif preprocessor >> > directives....is there a Python preprocessory available :) >> >> I've given this more thought. In the April 2009 issue of Python >> Magazine is a wonderful article by Paul McGuire on writing Domain >> Specific Languages. It shows how to intercept the import of specific >> types of files to preprocess the source before compiling it into >> bytecode. I played with those ideas to see what could be done for your >> case. >> >> So say you had a module marked up with special commenting like: >> >> --- cut here --- abc.pyp >> def main(): >> print "Hello" #? DEBUG >> print "There" #? DEBUG2 >> print "World" >> --- cut here --- abc.pyp >> >> Then in your main module you could do the following: >> >> --- cut here --- demo.py >> import cond_importer # can put in site.py for global application >> >> import abc >> abc.main() >> --- cut here --- demo.py >> >> Now you run the program normally and get: >> >> $ python2.5 demo.py >> Hello >> There >> World >> >> or you can filter out lines using: >> >> $ EXCLUDES=DEBUG python2.5 demo.py >> There >> World >> >> or even: >> >> $ EXCLUDES=DEBUG:DEBUG2 python2.5 demo.py >> World >> >> The magic to make this happen is just: >> >> --- cut here --- cond_import.py >> from __future__ import with_statement # for Python < 2.6 >> >> import os >> import imputil >> import re >> >> patt = re.compile(r".*#\? (?P[_a-zA-Z][_a-zA-Z0-9]*)$") >> >> try: # construct a set of tags to exclude in .py source >> pyexcludes = frozenset(os.environ['EXCLUDES'].split(':')) >> except Exception: >> pyexcludes = frozenset() >> >> def preprocess_source(filepath, fileinfo, filename): >> >> src = [] >> with file(filepath, 'r') as f: >> for line in f: >> m = patt.match(line) >> if m is None or m.group('tag') not in pyexcludes: >> src.append(line) >> >> src = '\n'.join(src) >> codeobj = compile(src, filepath, 'exec') >> >> # create return tuple: >> # import flag (0=module, 1=package) >> # code object >> # dictionary of variable definitions >> return 0, codeobj, {} >> >> importer = imputil.ImportManager() >> importer.add_suffix('.pyp', preprocess_source) >> importer.install() >> --- cut here --- cond_import.py >> >> I arbitrarily chose a file extension of .pyp for files to preprocess but >> you could use anything. And the tags to exclude could instead be tags >> to include. For handling packages (dirs) instead of modules you'd have >> to add a test for file or directory and change the code a bit. >> >> Anyway it raises some interesting possibilities of preprocessing. >> Python is just so cool. >> >> -Jeff >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > Thanks and best regards, > Vishal Sapre > > --- > > "So say...Day by day, in every way, I am getting better, better and better > !!!" > "A Strong and Positive attitude creates more miracles than anything else. > Because...Life is 10% how you make it, and 90% how you take it" > "Diamond is another piece of coal that did well under pressure? > "Happiness keeps u Sweet, Trials keep u Strong, > Sorrow keeps u Human, Failure Keeps u Humble, > Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." > -- Thanks and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Wed Jun 17 08:29:05 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 17 Jun 2009 11:59:05 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <4A37E51A.3080803@taupro.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> Message-ID: <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> On Wed, Jun 17, 2009 at 12:01 AM, Jeff Rush wrote: > Abhishek Tiwari wrote: > > > > *Ans. 1* > > > > values, items = list(zip(*sorted(zip(values,items), reverse=True))) > > > > *Ans. 2* > > new_values = sorted(values, reverse=True) > > new_items = [items[x] for x in map(values.index,new_values)] > > > > I would like to know which method is better and why? > > The first one is better because the second one has a bug. ;-) > > Because of the way the second one uses values.index, it assumes there is > a unique mapping between items and values. When a duplicate integer > appears in values, the second solution returns the wrong answer. Here is a 4th solution. [item[1] for item in sorted(zip(values, items))][-1::-1] If you are too lazy to write a timeit function, you can use my timeit wrapper script at ASPN cookbook. http://code.activestate.com/recipes/389767/ I timed all the solutions provided so far. def f1(): list(zip(*sorted(zip(values,items), reverse=True))) def f2(): new_values = sorted(values, reverse=True); [items[x] for x map(values.index,new_values)] def f3(): [item[1] for item in sorted(zip(values, items))][-1::-1] def f4(): d = dict(zip(items, values)) new_items = sorted(items, key=d.__getitem__, reverse=True) Here are the times printed in order of f1...f4 for 10,000 passes. [anand at localhost python]$ python listsort.py 6.97 usec/pass 6.95 usec/pass 4.65 usec/pass 9.27 usec/pass Don't use sorted(..., reverse=True), it is a killer in terms of time. This is the reason why f4(...) does not work anywhere close to what is expected out of a dict(...) solution and why f1(...) performs much below par. For example, let us change f4(...) to not to use sorted(..., reverse=True) def f4(): d = dict(zip(items, values)) new_items = sorted(items, key=d.__getitem__)[-1::-1] The performance improves a bit, [anand at localhost python]$ python listsort.py 7.06 usec/pass 7.04 usec/pass 4.61 usec/pass 9.04 usec/pass To see the real effect of sorted(..., reverse=True), let us modify f3(...) to use it instead of reversing the list at the end. def f3(): [item[1] for item in sorted(zip(values, items), reverse=True)] [anand at localhost python]$ python listsort.py 7.19 usec/pass 7.13 usec/pass 6.39 usec/pass* 9.72 usec/pass The function f3() slows down almost 1.3 times. Don't use sorted(..., reverse=True). Instead reverse the list in place by using reverse slicing of l[-1::-1], which is about 1.5 times faster. > > -Jeff > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Wed Jun 17 08:31:50 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 17 Jun 2009 12:01:50 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> Message-ID: <8548c5f30906162331s2aab632ds7a0c69d45497a556@mail.gmail.com> I have put my test code here. http://dpaste.com/hold/56288/ For it to work, you need to save recipe http://code.activestate.com/recipes/389767/ as mytimeit.py . On Wed, Jun 17, 2009 at 11:59 AM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > > > > > >> >> -Jeff >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > -Anand > > > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From anandology at gmail.com Wed Jun 17 09:24:45 2009 From: anandology at gmail.com (Anand Chitipothu) Date: Wed, 17 Jun 2009 12:54:45 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> Message-ID: <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> > > Don't use sorted(..., reverse=True). Instead reverse the list in place > by using reverse slicing of l[-1::-1], which is about 1.5 times faster. Why are you using [-1::-1] for reversing? Isn't [::-1] the python idiom for reversing a list? From abpillai at gmail.com Wed Jun 17 10:27:23 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 17 Jun 2009 13:57:23 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> Message-ID: <8548c5f30906170127y240ee981te1d036ad802501c7@mail.gmail.com> On Wed, Jun 17, 2009 at 12:54 PM, Anand Chitipothu wrote: > > > > Don't use sorted(..., reverse=True). Instead reverse the list in place > > by using reverse slicing of l[-1::-1], which is about 1.5 times faster. > > Why are you using [-1::-1] for reversing? Isn't [::-1] the python > idiom for reversing a list? I am used to [-1::-1] and "Explicit is better than implicit". [::-1] gives (at least to me) the impression that it is equal to [0::-1] which it is not. > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Wed Jun 17 12:45:52 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Wed, 17 Jun 2009 16:15:52 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <8548c5f30906170127y240ee981te1d036ad802501c7@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> <8548c5f30906170127y240ee981te1d036ad802501c7@mail.gmail.com> Message-ID: <5ead360a0906170345o14661eacs9f14c1c82456ad1d@mail.gmail.com> On Wed, Jun 17, 2009 at 1:57 PM, Anand Balachandran Pillai < abpillai at gmail.com> wrote: > > > On Wed, Jun 17, 2009 at 12:54 PM, Anand Chitipothu wrote: > >> > >> > Don't use sorted(..., reverse=True). Instead reverse the list in place >> > by using reverse slicing of l[-1::-1], which is about 1.5 times faster. >> >> Why are you using [-1::-1] for reversing? Isn't [::-1] the python >> idiom for reversing a list? > > > I am used to [-1::-1] and "Explicit is better than implicit". > [::-1] gives (at least to me) the impression that it is equal to [0::-1] > which it is not. > > >> >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > -Anand > > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > As a python newbie, I find this a bit annoying. It would be nicer to have a simple reverse method in the str class. name="The world according to Garp" # name.reverse() or str.reverse(name) sure beats the hell out of name[-1::-1] or name[::-1] Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Wed Jun 17 15:36:48 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 17 Jun 2009 19:06:48 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <5ead360a0906170345o14661eacs9f14c1c82456ad1d@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> <8548c5f30906170127y240ee981te1d036ad802501c7@mail.gmail.com> <5ead360a0906170345o14661eacs9f14c1c82456ad1d@mail.gmail.com> Message-ID: <8548c5f30906170636g3e14c068y9d72ae4cf86dc7e8@mail.gmail.com> On Wed, Jun 17, 2009 at 4:15 PM, Srijayanth Sridhar wrote: > > >> > As a python newbie, I find this a bit annoying. It would be nicer to have a > simple reverse method in the str class. > > name="The world according to Garp" > # name.reverse() or str.reverse(name) sure beats the hell out of > name[-1::-1] or name[::-1] > Unfortunately, this would violate the "immutability" of the str object. As you may know, a string object is immutable, i.e it cannot be modified in place. The 'reverse' as implemented on the list container modifies it in place. So a similar method on the 'str' container would also have to have a similar effect. But 'str' is immutable, so this is not possible. Otherwise 'reverse' on str has to return a new string object, reversed but then it violates the Python idiom that container types, when having similar methods, should work similarly. If you don't like s[::-1], then the closest would be ''.join([item for item in reversed(s)]), but that ain't close enough :) > > Jayanth > > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From anandology at gmail.com Wed Jun 17 15:41:39 2009 From: anandology at gmail.com (Anand Chitipothu) Date: Wed, 17 Jun 2009 19:11:39 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <8548c5f30906170636g3e14c068y9d72ae4cf86dc7e8@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> <8548c5f30906170127y240ee981te1d036ad802501c7@mail.gmail.com> <5ead360a0906170345o14661eacs9f14c1c82456ad1d@mail.gmail.com> <8548c5f30906170636g3e14c068y9d72ae4cf86dc7e8@mail.gmail.com> Message-ID: <41139fcb0906170641k2255d61dp86b0966648430a29@mail.gmail.com> > ?If you don't like s[::-1], then the closest would be > ''.join([item for item in reversed(s)]), but that ain't close enough :) No, the closest would be "".join(reversed(s)) From srijayanth at gmail.com Wed Jun 17 15:44:39 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Wed, 17 Jun 2009 19:14:39 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <41139fcb0906170641k2255d61dp86b0966648430a29@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> <8548c5f30906170127y240ee981te1d036ad802501c7@mail.gmail.com> <5ead360a0906170345o14661eacs9f14c1c82456ad1d@mail.gmail.com> <8548c5f30906170636g3e14c068y9d72ae4cf86dc7e8@mail.gmail.com> <41139fcb0906170641k2255d61dp86b0966648430a29@mail.gmail.com> Message-ID: <5ead360a0906170644m6b09bdfdq75fdb3691cb56570@mail.gmail.com> On Wed, Jun 17, 2009 at 7:11 PM, Anand Chitipothu wrote: > > If you don't like s[::-1], then the closest would be > > ''.join([item for item in reversed(s)]), but that ain't close enough :) > I don't hate it enough to not use it. I am just saying it from a perspective of readability I suppose. Coming from Ruby you get used to string methods(or for that matter Java) Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From harish.mallipeddi at gmail.com Wed Jun 17 16:20:37 2009 From: harish.mallipeddi at gmail.com (Harish Mallipeddi) Date: Wed, 17 Jun 2009 19:50:37 +0530 Subject: [BangPypers] which is better solution of the question In-Reply-To: <5ead360a0906170644m6b09bdfdq75fdb3691cb56570@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <4A37E51A.3080803@taupro.com> <8548c5f30906162329h68bbe967yca330f66a25b18c3@mail.gmail.com> <41139fcb0906170024t739c5cdfmfb53b2cc13164eda@mail.gmail.com> <8548c5f30906170127y240ee981te1d036ad802501c7@mail.gmail.com> <5ead360a0906170345o14661eacs9f14c1c82456ad1d@mail.gmail.com> <8548c5f30906170636g3e14c068y9d72ae4cf86dc7e8@mail.gmail.com> <41139fcb0906170641k2255d61dp86b0966648430a29@mail.gmail.com> <5ead360a0906170644m6b09bdfdq75fdb3691cb56570@mail.gmail.com> Message-ID: On Wed, Jun 17, 2009 at 7:14 PM, Srijayanth Sridhar wrote: > On Wed, Jun 17, 2009 at 7:11 PM, Anand Chitipothu wrote: > >> > If you don't like s[::-1], then the closest would be >> > ''.join([item for item in reversed(s)]), but that ain't close enough :) >> > > I don't hate it enough to not use it. I am just saying it from a > perspective of readability I suppose. Coming from Ruby you get used to > string methods(or for that matter Java) > > Jayanth > > Well in Ruby: 1) Strings are mutable (Ruby has symbols which are essentially immutable strings). 2) All built-in classes are open. -- Harish Mallipeddi http://blog.poundbang.in -------------- next part -------------- An HTML attachment was scrubbed... URL: From sridhar.ratna at gmail.com Thu Jun 18 04:44:12 2009 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Wed, 17 Jun 2009 19:44:12 -0700 Subject: [BangPypers] which is better solution of the question In-Reply-To: <41139fcb0906160935k26c1119n2edbc38b89b61d2e@mail.gmail.com> References: <50d982690906160650u5f55781dted45a6478644c40@mail.gmail.com> <50d982690906160652x33e04650t62ac44141fab8202@mail.gmail.com> <3e3294b70906160742k219708b7j98a221e7201c99e6@mail.gmail.com> <3e3294b70906160858n1408ca31x500ec35dd43ec2d5@mail.gmail.com> <41139fcb0906160935k26c1119n2edbc38b89b61d2e@mail.gmail.com> Message-ID: <7c73a13a0906171944g349236eaqe163b2d448c777f5@mail.gmail.com> On Tue, Jun 16, 2009 at 9:35 AM, Anand Chitipothu wrote: >> The zip solution is succinct. >> >> Also, by the virtue of being a built-in function zip() should be >> faster than the second approach. > > Complexity of first solution is O(n) > values, items = list(zip(*sorted(zip(values,items), reverse=True))) Must be O(n lg n) .. due to the use of 'sorted(...)' From srijayanth at gmail.com Thu Jun 18 11:54:40 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Thu, 18 Jun 2009 15:24:40 +0530 Subject: [BangPypers] Testing for documentation as a release criterion Message-ID: <5ead360a0906180254j5eaa92c7sefe5a6a3ac374101@mail.gmail.com> Hello, I am currently thinking about enforcing the following standard for a small demo project that might evolve into something larger pending approval(which was why the request for training programmes). Every module, every class and every function should have documentation. To enforce this, I write a unit test that basically does something as follows: undocumented = [obj for obj in dir(module) if obj.__doc__ == None] assertEqual (undocumented, []) Of course, I'd have to make it recursive for all classes defined in module etc. I just wanted to know what people thought of this and whether somebody else has experiences with such a standard being enforced and what they think the pros/cons might be? Thank you, Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From noufal at gmail.com Thu Jun 18 12:07:21 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 18 Jun 2009 15:37:21 +0530 Subject: [BangPypers] Testing for documentation as a release criterion In-Reply-To: <5ead360a0906180254j5eaa92c7sefe5a6a3ac374101@mail.gmail.com> References: <5ead360a0906180254j5eaa92c7sefe5a6a3ac374101@mail.gmail.com> Message-ID: <9963e56e0906180307u70b25096g239d5d5baf7f4469@mail.gmail.com> I'm doing something similar for a nascent project at my workplace. My plan was to enforce some kind of structure as well. I'm not familar enough with Restructured Text and any of the other Python text processing libraries so I'm not sure what to do yet. You could perhaps also mandate an example for all API functions and then test then with doctest. As a concept, I think it's swell. From vsapre80 at gmail.com Thu Jun 18 16:47:39 2009 From: vsapre80 at gmail.com (Vishal) Date: Thu, 18 Jun 2009 20:17:39 +0530 Subject: [BangPypers] Testing for documentation as a release criterion In-Reply-To: <9963e56e0906180307u70b25096g239d5d5baf7f4469@mail.gmail.com> References: <5ead360a0906180254j5eaa92c7sefe5a6a3ac374101@mail.gmail.com> <9963e56e0906180307u70b25096g239d5d5baf7f4469@mail.gmail.com> Message-ID: If you run PyLint on any Python file...it gives you documentation percentage of functions, methods, class, modules in your code tree. it prints that out as a table. if you can scrap that info from the resulting file...that should help as well... basically it should be 100% for all the above..if not, someone needs to complete the documentation. http://www.logilab.org/857 please do remember that, PyLint depends on two more packages from logilab. useslogilab-astng , logilab-common Hope this might be of some help. As far as running tests are concerned: It would be better if a test can get the __doc__ string, and search for specific things in that string..such as 'input', 'output', 'description' and make sure that these are not empty. How about enforcing that these documentation strings should follow YAML format :)) that should make it so much easier to examine them. __doc__ should be: """ - description: blah, blah, blah - Inputs: blah, blah, blah - output: blah, blah, blah """ Best regards, Vishal Sapre On Thu, Jun 18, 2009 at 3:37 PM, Noufal Ibrahim wrote: > I'm doing something similar for a nascent project at my workplace. My > plan was to enforce some kind of structure as well. I'm not familar > enough with Restructured Text and any of the other Python text > processing libraries so I'm not sure what to do yet. You could perhaps > also mandate an example for all API functions and then test then with > doctest. > > As a concept, I think it's swell. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Thanks and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." -------------- next part -------------- An HTML attachment was scrubbed... URL: From srijayanth at gmail.com Thu Jun 18 17:17:33 2009 From: srijayanth at gmail.com (Srijayanth Sridhar) Date: Thu, 18 Jun 2009 20:47:33 +0530 Subject: [BangPypers] Testing for documentation as a release criterion In-Reply-To: References: <5ead360a0906180254j5eaa92c7sefe5a6a3ac374101@mail.gmail.com> <9963e56e0906180307u70b25096g239d5d5baf7f4469@mail.gmail.com> Message-ID: <5ead360a0906180817j70f89c0bu99671eb60c13118f@mail.gmail.com> On Thu, Jun 18, 2009 at 8:17 PM, Vishal wrote: > If you run PyLint on any Python file...it gives you documentation > percentage of functions, methods, class, modules in your code tree. > it prints that out as a table. if you can scrap that info from the > resulting file...that should help as well... > basically it should be 100% for all the above..if not, someone needs to > complete the documentation. > > http://www.logilab.org/857 > > please do remember that, PyLint depends on > two more packages from logilab. > uses logilab-astng , > logilab-common > > > Hope this might be of some help. > PyLint seems useful, however... > > As far as running tests are concerned: > It would be better if a test can get the __doc__ string, and search for > specific things in that string..such as 'input', 'output', 'description' and > make sure that these are not empty. How about enforcing that these > documentation strings should follow YAML format :)) > that should make it so much easier to examine them. > > __doc__ should be: > """ > - description: > blah, blah, blah > - Inputs: > blah, blah, blah > - output: > blah, blah, blah > """ > ..this is nicer since I can plug yaml right into PyYaml. Very nice suggestion. Thank you, Jayanth -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsapre80 at gmail.com Thu Jun 18 19:38:34 2009 From: vsapre80 at gmail.com (Vishal) Date: Thu, 18 Jun 2009 23:08:34 +0530 Subject: [BangPypers] Testing for documentation as a release criterion In-Reply-To: <5ead360a0906180817j70f89c0bu99671eb60c13118f@mail.gmail.com> References: <5ead360a0906180254j5eaa92c7sefe5a6a3ac374101@mail.gmail.com> <9963e56e0906180307u70b25096g239d5d5baf7f4469@mail.gmail.com> <5ead360a0906180817j70f89c0bu99671eb60c13118f@mail.gmail.com> Message-ID: Nice to now you felt good on this suggestion..it just occurred sort of :)my experience with YAML says that, its best to use: load from syck and dump from yaml. if you are not going to dump YAML, and not going to work on complex YAML stuff...use syck for loading....you'll be much happier with that. Best of Luck... Vishal On Thu, Jun 18, 2009 at 8:47 PM, Srijayanth Sridhar wrote: > > > On Thu, Jun 18, 2009 at 8:17 PM, Vishal wrote: > >> If you run PyLint on any Python file...it gives you documentation >> percentage of functions, methods, class, modules in your code tree. >> it prints that out as a table. if you can scrap that info from the >> resulting file...that should help as well... >> basically it should be 100% for all the above..if not, someone needs to >> complete the documentation. >> >> http://www.logilab.org/857 >> >> please do remember that, PyLint depends on >> two more packages from logilab. >> uses logilab-astng , >> logilab-common >> >> >> Hope this might be of some help. >> > > PyLint seems useful, however... > > >> >> As far as running tests are concerned: >> It would be better if a test can get the __doc__ string, and search for >> specific things in that string..such as 'input', 'output', 'description' and >> make sure that these are not empty. How about enforcing that these >> documentation strings should follow YAML format :)) >> that should make it so much easier to examine them. >> >> __doc__ should be: >> """ >> - description: >> blah, blah, blah >> - Inputs: >> blah, blah, blah >> - output: >> blah, blah, blah >> """ >> > > > ..this is nicer since I can plug yaml right into PyYaml. > > Very nice suggestion. > > Thank you, > > Jayanth > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- Thanks and best regards, Vishal Sapre --- "So say...Day by day, in every way, I am getting better, better and better !!!" "A Strong and Positive attitude creates more miracles than anything else. Because...Life is 10% how you make it, and 90% how you take it" "Diamond is another piece of coal that did well under pressure? "Happiness keeps u Sweet, Trials keep u Strong, Sorrow keeps u Human, Failure Keeps u Humble, Success keeps u Glowing, But only God Keeps u Going.....Keep Going....." -------------- next part -------------- An HTML attachment was scrubbed... URL: From learningpython at aol.com Mon Jun 22 13:35:35 2009 From: learningpython at aol.com (learningpython) Date: Mon, 22 Jun 2009 04:35:35 -0700 (PDT) Subject: [BangPypers] calling instance of the other class. Message-ID: <24145716.post@talk.nabble.com> Dear Python experts, Please can you help in a following scenario.. I have some classes each for a Protocol Data Unit which you could consider as a structures of elements example class ex1: class usr_mac(MAC_PDU): ''' Group Voice Channel User ''' def __init__(self): self.protectFlag = BV.Bit1.new() self.reserved = BV.Bit1.new() self.flco = BV.Bit6.new() self.grpAddr = BV.Bit24.new() self.srcAddr = BV.Bit24.new() self.order = ['protectFlag', 'reserved', 'flco', 'grpAddr', 'srcAddr'] Now i have a another message which i need to create similar but now it contains the above class instance as one of the members. Please can you tell me how to pass instance of above class as a member of the new message created in similar lines with one of the elements is the complete data above (instance of above class). I am encapsulating above message in a transport layer message. 2. Now similarly, i would like given a choice to choose the instance of other class as the i would like to pass in other instance of class similarly. Your kind help will be greatly appreciated. Please let me know if there are clarifications i can give, I am posting this in a hurry. I am sure there could be questions. Thanks in advance anand -- View this message in context: http://www.nabble.com/calling-instance-of-the-other-class.-tp24145716p24145716.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From tnhashmi at gmail.com Mon Jun 22 13:57:06 2009 From: tnhashmi at gmail.com (Tahir Hashmi) Date: Mon, 22 Jun 2009 17:27:06 +0530 Subject: [BangPypers] [JOBS] Opening for Tech Lead at weRead Message-ID: Hi weRead (http://www.weread.com) is the world's largest social book discovery site in the world with its presence on top Social Networks including Facebook, Orkut, MySpace and Yahoo!, among others. We have some really exciting tasks cut for us as we challenge ourselves to get the attention of each and every book lover in the world and then some. To accomplish that, we need some solid engineering talent to add to our small but really smart team of engineers. If you have strong CS fundamentals, 7+ years of engineering experience and have delivered on building highly scalable applications for the web, do send in your resume to careers at weread.com. Of course, Python programming skills would be a valuable asset! Please visit http://weread.com/current_openings.php for more details regarding the open position. Thanks -- Tahir Hashmi We, the rest of humanity, wish GNU luck and Godspeed From orsenthil at gmail.com Mon Jun 22 15:11:14 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 22 Jun 2009 18:41:14 +0530 Subject: [BangPypers] calling instance of the other class. In-Reply-To: <24145716.post@talk.nabble.com> References: <24145716.post@talk.nabble.com> Message-ID: <20090622131114.GB4143@ubuntu.ubuntu-domain> On Mon, Jun 22, 2009 at 04:35:35AM -0700, learningpython wrote: > Please can you tell me how to pass instance of above class as a member of > the new message created in similar lines with one of the elements is the > complete data above (instance of above class). > > I am encapsulating above message in a transport layer message. > 2. Now similarly, i would like given a choice to choose the instance of > other class as the i would like to pass in other instance of class > similarly. I am totally confused by the description. :( If you still not very comfortable with Class terminologies in Python, I would suggest you read any basic book (2-3 hours on the topic would be enough) and perhaps you may find, what you are trying to do is easy? -- Senthil I do not find in orthodox Christianity one redeeming feature. -- Thomas Jefferson From vnbang2003 at yahoo.com Mon Jun 22 15:44:21 2009 From: vnbang2003 at yahoo.com (VIJAY KUMAR) Date: Mon, 22 Jun 2009 19:14:21 +0530 (IST) Subject: [BangPypers] Django connection problem Message-ID: <367629.70851.qm@web95312.mail.in2.yahoo.com> Hi ?????? Need a help for below error. ?????? ??? from django.contrib.auth.models import User ????????????? File "c:\python26\lib\site-packages\django-1.0.2_final-?????? py2.6.egg\django\contrib\auth\models.py", line 3, in ?????????? from django.db import models ????????? ? File "c:\python26\lib\site-packages\django-1.0.2_final-py2.6.egg\django\db\models\__init__.py", line 3, in ??????? ??? from django.db import connection ???????? ImportError: cannot import name connection ? ??when i looked in django.db there is no module by name connection. Can some one help to know more on this problem and how can i overcome this. ? With Thanks VIjay ? ? Cricket on your mind? Visit the ultimate cricket website. Enter http://cricket.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gora at srijan.in Mon Jun 22 18:19:28 2009 From: gora at srijan.in (Gora Mohanty) Date: Mon, 22 Jun 2009 21:49:28 +0530 Subject: [BangPypers] Django connection problem In-Reply-To: <367629.70851.qm@web95312.mail.in2.yahoo.com> References: <367629.70851.qm@web95312.mail.in2.yahoo.com> Message-ID: <20090622214928.209a7d3c@anubis> On Mon, 22 Jun 2009 19:14:21 +0530 (IST) VIJAY KUMAR wrote: > Hi > ?????? Need a help for below error. > ?????? ??? from django.contrib.auth.models import User > ????????????? File "c:\python26\lib\site-packages\django-1.0.2_final-?????? py2.6.egg\django\contrib\auth\models.py", line 3, in > ?????????? from django.db import models > ????????? ? File "c:\python26\lib\site-packages\django-1.0.2_final-py2.6.egg\django\db\models\__init__.py", line 3, in > ??????? ??? from django.db import connection > ???????? ImportError: cannot import name connection What are you doing when you get this error. > ? > ??when i looked in django.db there is no module by name connection. Can some one help to know more on this problem and how can i overcome this. [...] There is definitely a "connection" variable in django/db/__init.py__ which is where django/db/models/__init.py__ is importing from. I suspect that this is some other issue, maybe a problem with connecting to the database. What database are you using? Can you connect to the database, using some other tool, but with the same username/password as in Django's settings.py? Regards, Gora From learningpython at aol.com Mon Jun 22 22:32:39 2009 From: learningpython at aol.com (learningpython) Date: Mon, 22 Jun 2009 13:32:39 -0700 (PDT) Subject: [BangPypers] calling instance of the other class. In-Reply-To: <20090622131114.GB4143@ubuntu.ubuntu-domain> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> Message-ID: <24154873.post@talk.nabble.com> Sorry Senthil and all, I am sure, it's pretty easy but don't i am not able to catch it. In C, i just pass the & of the another structure in the structure element, some thing close. Here is what i do .. a class is defined as mentioned, now this class is element of another class class Send_Msg_req(msg): def __init__(self): self.usr_mac =< Earlier class defined > self.msgtype = self.msgsize = self.order = ['usr_mac', 'msgtype ', 'msgsize '] Now i like your expertize in giving me tips so that i have to declare and keep sending above this message over serial port, but each time with different class. I hope i made it bit more clear. Sorry for the confusion. Senthil Kumaran-6 wrote: > > On Mon, Jun 22, 2009 at 04:35:35AM -0700, learningpython wrote: > >> Please can you tell me how to pass instance of above class as a member of >> the new message created in similar lines with one of the elements is the >> complete data above (instance of above class). >> >> I am encapsulating above message in a transport layer message. >> 2. Now similarly, i would like given a choice to choose the instance of >> other class as the i would like to pass in other instance of class >> similarly. > > I am totally confused by the description. :( > > If you still not very comfortable with Class terminologies in Python, > I would suggest you read any basic book (2-3 hours on the topic would be > enough) and perhaps you may find, what you are trying to do is > easy? > > > > -- > Senthil > I do not find in orthodox Christianity one redeeming feature. > -- Thomas Jefferson > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- View this message in context: http://www.nabble.com/calling-instance-of-the-other-class.-tp24145716p24154873.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From vnbang2003 at yahoo.com Tue Jun 23 05:50:04 2009 From: vnbang2003 at yahoo.com (VIJAY KUMAR) Date: Tue, 23 Jun 2009 09:20:04 +0530 (IST) Subject: [BangPypers] Django connection problem Message-ID: <535146.73198.qm@web95305.mail.in2.yahoo.com> Hi, ?????????? Am pressently using sqlite . ?????????? The problem is in the django\db\__init__.py where it is importing connection module ??????????? from django.db import connection ? Thanks Vijay --- On Mon, 22/6/09, Gora Mohanty wrote: From: Gora Mohanty Subject: Re: [BangPypers] Django connection problem To: bangpypers at python.org Date: Monday, 22 June, 2009, 9:49 PM On Mon, 22 Jun 2009 19:14:21 +0530 (IST) VIJAY KUMAR wrote: > Hi > ?????? Need a help for below error. > ?????? ??? from django.contrib.auth.models import User > ????????????? File "c:\python26\lib\site-packages\django-1.0.2_final-?????? py2.6.egg\django\contrib\auth\models.py", line 3, in > ?????????? from django.db import models > ????????? ? File "c:\python26\lib\site-packages\django-1.0.2_final-py2.6.egg\django\db\models\__init__.py", line 3, in > ??????? ??? from django.db import connection > ???????? ImportError: cannot import name connection What are you doing when you get this error. > ? > ??when i looked in django.db there is no module by name connection. Can some one help to know more on this problem and how can i overcome this. [...] There is definitely a "connection" variable in django/db/__init.py__ which is where django/db/models/__init.py__ is importing from. I suspect that this is some other issue, maybe a problem with connecting to the database. What database are you using? Can you connect to the database, using some other tool, but with the same username/password as in Django's settings.py? Regards, Gora _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers ICC World Twenty20 England '09 exclusively on YAHOO! CRICKET http://cricket.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From praveen.python.plone at gmail.com Tue Jun 23 09:35:43 2009 From: praveen.python.plone at gmail.com (Praveen Kumar) Date: Tue, 23 Jun 2009 13:05:43 +0530 Subject: [BangPypers] Django connection problem In-Reply-To: <535146.73198.qm@web95305.mail.in2.yahoo.com> References: <535146.73198.qm@web95305.mail.in2.yahoo.com> Message-ID: <6305ec600906230035i70f27388n3f35f5d8f496cff2@mail.gmail.com> Hi, it seems there is something wrong in your django installation.. you can check with import django and try with django shell. Thanks Praveen On Tue, Jun 23, 2009 at 9:20 AM, VIJAY KUMAR wrote: > Hi, > Am pressently using sqlite . > The problem is in the django\db\__init__.py where it is > importing connection module > from django.db import connection > > > > Thanks > Vijay > > > > --- On *Mon, 22/6/09, Gora Mohanty * wrote: > > > From: Gora Mohanty > Subject: Re: [BangPypers] Django connection problem > To: bangpypers at python.org > Date: Monday, 22 June, 2009, 9:49 PM > > > On Mon, 22 Jun 2009 19:14:21 +0530 (IST) > VIJAY KUMAR > > wrote: > > > Hi > > Need a help for below error. > > from django.contrib.auth.models import User > > File > "c:\python26\lib\site-packages\django-1.0.2_final- > py2.6.egg\django\contrib\auth\models.py", line 3, in > > from django.db import models > > File > "c:\python26\lib\site-packages\django-1.0.2_final-py2.6.egg\django\db\models\__init__.py", > line 3, in > > from django.db import connection > > ImportError: cannot import name connection > > What are you doing when you get this error. > > > > > when i looked in django.db there is no module by name connection. Can > some one help to know more on this problem and how can i overcome this. > [...] > > There is definitely a "connection" variable in django/db/__init.py__ > which is where django/db/models/__init.py__ is importing from. > > I suspect that this is some other issue, maybe a problem with > connecting to the database. What database are you using? Can > you connect to the database, using some other tool, but with > the same username/password as in Django's settings.py? > > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > ------------------------------ > Cricket on your mind? Visit the ultimate cricket website. Enter now! > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- Praveen Kumar +91 9739854134 http://praveensunsetpoint.wordpress.com Bangalore -------------- next part -------------- An HTML attachment was scrubbed... URL: From harpreetsingh101 at hotmail.com Tue Jun 23 10:13:00 2009 From: harpreetsingh101 at hotmail.com (Harpreet) Date: Tue, 23 Jun 2009 13:43:00 +0530 Subject: [BangPypers] Turbogears Pydev debugging in Eclipse In-Reply-To: <49A7BECC.9090700@gmail.com> References: <6305ec600902262357h17e08b40s2010d1d16a06e052@mail.gmail.com> <49A7BECC.9090700@gmail.com> Message-ID: -----Original Message----- From: bangpypers-bounces+harpreetsingh101=hotmail.com at python.org [mailto:bangpypers-bounces+harpreetsingh101=hotmail.com at python.org] On Behalf Of Parthan SR Sent: Friday, February 27, 2009 3:52 PM To: Bangalore Python Users Group - India Subject: Re: [BangPypers] Turbogears Pydev debugging in Eclipse Harpreet Singh wrote: > Hi, > I come from the .Net/visual studio environment and i am pretty new to > the Turbogears 1.0.4.4 and/or python world. > I would like to know if pydev in Eclipse 3.2 supports breakpoint > debugging of a Turbogears web application? > If yes, this would mean setting a break point in the .py file and > doing a step through/step into of the code, while the web page is > displayed in the browser. Am i correct? I am not sure how to do it in an IDE (for the fact I never used anything other than Emacs) but you should still be able to make use of pdb. It might not be as good as break point function you are looking for, but yes it allows you to step through the code (from the point you call pdb.set_trace()) in an web app. I have used it with Django and Pylons. -- With Regards, Parthan SR "technofreak" GPG Key 2FF01026 Fingerprint 5707 ECBD 8D8D 8E6E 28F8 DFA5 938B D861 2FF0 1026 Weblog http://blog.technofreak.in _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers _______________________________________________ Figured out, that it is possible to set break points, step through and debug. Some of the things were not very obvious. Others who face problems could check up this link: http://rowsandcolumns.blogspot.com/2009/06/turbogears-debugging-in-eclipse.h tml I have tried to put down some things to check up. Regards, Harpreet From jeff at taupro.com Tue Jun 23 10:50:42 2009 From: jeff at taupro.com (Jeff Rush) Date: Tue, 23 Jun 2009 03:50:42 -0500 Subject: [BangPypers] calling instance of the other class. In-Reply-To: <24154873.post@talk.nabble.com> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> Message-ID: <4A409762.1080005@taupro.com> learningpython wrote: > Sorry Senthil and all, > I am sure, it's pretty easy but don't i am not able to catch it. In C, i > just pass the & of the another structure in the structure element, some > thing close. The equivalent to the & operator in C is just an object reference in Python. > class Send_Msg_req(msg): > def __init__(self): > self.usr_mac =< Earlier class defined > > self.msgtype = > self.msgsize = > self.order = ['usr_mac', > 'msgtype ', > 'msgsize '] so the line becomes just: self.usr.mac = usr_mac() where you declared usr_mac as a class in your prior email. If the usr_mac() call needs arguments, provide them in the __init__ for Send_MSG_req and pass them through: class Send_Msg_req(msg): def __init__(self, a, b): self.usr_mac = usr_mac(a, b) self.msgtype = BV.Bit24.new() You haven't mentioned it but from here you'll need a flattener. From your code I presume you have the idea for one already, in that: > self.msgtype = > self.msgsize = > self.order = ['usr_mac', > 'msgtype ', > 'msgsize '] at some point you have a method defined for the base 'msg' class that uses the self.order list to construct the actual bitstream going out the serial port from the various object attributes. So your BV.Bit24 class has some method that gives you back the 24-bits that make it up. The method that walks self.order and returns the raw bits is a flattener. Now with the declaring of self.usr_mac referencing an earlier class, you just need to extend the idea of a flattener a bit further. So when you call: msg = Send_Msg_req(MSG_A, 34) serial.output(msg.flatten()) that .flatten method, upon encountering the self.usr_mac attribute, calls the .flatten method of the usr_mac class and merges those bits into the stream it is building for the Send_Msg_req class. This is why it is called a flattener -- it walks a tree of msg fragments and constructs a flat sequence of bits making up a single message. Another example of the use of a flattener is the STAN DOM used in the Nevow templating module used with the Twisted web framework. http://www.kieranholland.com/code/documentation/nevow-stan/ It takes an object graph of nested lists and attributes and returns a flat string of HTML. It goes a bit further in that it has an extensible registry of adapters for teaching the system to handle new kinds of object graph nodes. -Jeff From orsenthil at gmail.com Tue Jun 23 18:05:30 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Tue, 23 Jun 2009 21:35:30 +0530 Subject: [BangPypers] calling instance of the other class. In-Reply-To: <4A409762.1080005@taupro.com> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> Message-ID: <20090623160529.GA4808@ubuntu.ubuntu-domain> On Tue, Jun 23, 2009 at 03:50:42AM -0500, Jeff Rush wrote: > > just pass the & of the another structure in the structure element, some > > thing close. > > The equivalent to the & operator in C is just an object reference in Python. > Yes, the Original Poster (learningpython): When you have: class MyClass: def __init__(self): self.attr1 = 'Hello' Foo = MyClass Obj = Foo() print Obj.attr1 This will show that class was assigned using the reference. Original Poster again, just try to understand this session >>> class MyClass1: ... def __init__(self): ... self.attr1 = 'Hello' ... >>> class MyClass2: ... def __init__(self): ... self.attr2 = MyClass1() ... >>> obj = MyClass2() >>> print obj.attr2 <__main__.MyClass1 instance at 0x7fe2061b1488> >>> print obj.attr2.attr1 Hello >>> I hope you have a bit of clarity now. Jeff: you seem to have got what he was trying to do with message sending. Is this some standard way over serial port, as you went upto the mention or flatteners. But, exposing the learner to twisted and flatteners would be bit too much of a high dose IMHO. -- Senthil the kind of landscape that laughs at "AWD" vehicles and sends them tumbling into ravines From learningpython at aol.com Tue Jun 23 23:00:47 2009 From: learningpython at aol.com (learningpython) Date: Tue, 23 Jun 2009 14:00:47 -0700 (PDT) Subject: [BangPypers] calling instance of the other class. In-Reply-To: <4A409762.1080005@taupro.com> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> Message-ID: <24174373.post@talk.nabble.com> Thank you Jeff, Thanks a ton. Yes also about the flatnner. I am using the library given already. I am asked to use a pack command which i presume is what you try to explain me. I am long way to go, learning at a very slow pace. Maybe i should speed up of this delivery. The pack i am using is very similar to concatenation actually. Like i was explained example: "11100" +"1111" = 111001111 will be sent on serial. Please can you confirm me, python sends the big endian model. I mean MSB first. Thank you again Jeff. Jeff Rush wrote: > > learningpython wrote: >> Sorry Senthil and all, >> I am sure, it's pretty easy but don't i am not able to catch it. In C, i >> just pass the & of the another structure in the structure element, some >> thing close. > > The equivalent to the & operator in C is just an object reference in > Python. > >> class Send_Msg_req(msg): >> def __init__(self): >> self.usr_mac =< Earlier class defined > >> self.msgtype = >> self.msgsize = >> self.order = ['usr_mac', >> 'msgtype ', >> 'msgsize '] > > so the line becomes just: > > self.usr.mac = usr_mac() > > where you declared usr_mac as a class in your prior email. If the > usr_mac() call needs arguments, provide them in the __init__ for > Send_MSG_req and pass them through: > > class Send_Msg_req(msg): > def __init__(self, a, b): > self.usr_mac = usr_mac(a, b) > self.msgtype = BV.Bit24.new() > > You haven't mentioned it but from here you'll need a flattener. From > your code I presume you have the idea for one already, in that: > >> self.msgtype = >> self.msgsize = >> self.order = ['usr_mac', >> 'msgtype ', >> 'msgsize '] > > at some point you have a method defined for the base 'msg' class that > uses the self.order list to construct the actual bitstream going out the > serial port from the various object attributes. So your BV.Bit24 class > has some method that gives you back the 24-bits that make it up. The > method that walks self.order and returns the raw bits is a flattener. > > Now with the declaring of self.usr_mac referencing an earlier class, you > just need to extend the idea of a flattener a bit further. So when you > call: > > msg = Send_Msg_req(MSG_A, 34) > serial.output(msg.flatten()) > > that .flatten method, upon encountering the self.usr_mac attribute, > calls the .flatten method of the usr_mac class and merges those bits > into the stream it is building for the Send_Msg_req class. > > This is why it is called a flattener -- it walks a tree of msg fragments > and constructs a flat sequence of bits making up a single message. > > Another example of the use of a flattener is the STAN DOM used in the > Nevow templating module used with the Twisted web framework. > > http://www.kieranholland.com/code/documentation/nevow-stan/ > > It takes an object graph of nested lists and attributes and returns a > flat string of HTML. It goes a bit further in that it has an extensible > registry of adapters for teaching the system to handle new kinds of > object graph nodes. > > -Jeff > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- View this message in context: http://www.nabble.com/calling-instance-of-the-other-class.-tp24145716p24174373.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From learningpython at aol.com Tue Jun 23 23:07:31 2009 From: learningpython at aol.com (learningpython) Date: Tue, 23 Jun 2009 14:07:31 -0700 (PDT) Subject: [BangPypers] calling instance of the other class. In-Reply-To: <20090623160529.GA4808@ubuntu.ubuntu-domain> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> <20090623160529.GA4808@ubuntu.ubuntu-domain> Message-ID: <24174494.post@talk.nabble.com> Thank you Senthil. It's been a learning exp for me.. I must pace up, i promise if given continued opportunity to code, i will learn soon. This is a running project, so the flattner is very much needed. I hope i learn more. Actually created a system wherein later i can use it at ease to send various other instances of class in the same way depending on context. How about i create each of the them and assign a name, like #define and just call them in scripts. Please any one feel free to suggest any better way of doing. With Thanks Anand Senthil Kumaran-6 wrote: > > On Tue, Jun 23, 2009 at 03:50:42AM -0500, Jeff Rush wrote: >> > just pass the & of the another structure in the structure element, some >> > thing close. >> >> The equivalent to the & operator in C is just an object reference in >> Python. >> > > Yes, the Original Poster (learningpython): > > When you have: > > class MyClass: > def __init__(self): > self.attr1 = 'Hello' > > Foo = MyClass > Obj = Foo() > print Obj.attr1 > > This will show that class was assigned using the reference. > > Original Poster again, just try to understand this session > >>>> class MyClass1: > ... def __init__(self): > ... self.attr1 = 'Hello' > ... >>>> class MyClass2: > ... def __init__(self): > ... self.attr2 = MyClass1() > ... >>>> obj = MyClass2() >>>> print obj.attr2 > <__main__.MyClass1 instance at 0x7fe2061b1488> >>>> print obj.attr2.attr1 > Hello >>>> > > > I hope you have a bit of clarity now. > > > Jeff: you seem to have got what he was trying to do with message > sending. Is this some standard way over serial port, as you went > upto the mention or flatteners. > > But, exposing the learner to twisted and flatteners would be bit too > much of a high dose IMHO. > > -- > Senthil > the kind of landscape that laughs at "AWD" vehicles and > sends them tumbling into ravines > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- View this message in context: http://www.nabble.com/calling-instance-of-the-other-class.-tp24145716p24174494.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From learningpython at aol.com Wed Jun 24 01:16:34 2009 From: learningpython at aol.com (learningpython) Date: Tue, 23 Jun 2009 16:16:34 -0700 (PDT) Subject: [BangPypers] calling instance of the other class. In-Reply-To: <4A409762.1080005@taupro.com> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> Message-ID: <24176174.post@talk.nabble.com> Hi Jeff, Can i ask you a related question. Long shot .. but since you have good idea of area i am working ( which is communications, sending, decoding, encoding) data over a serial interface. I have a problem, i am facing.. Like in ASN format.. I have a Data Unit ( am defining a class for each ) 1. msg type ( 8 bits ) 2. Identity(8 bits) 3. ADESC ( 8 bits) 4. Address ( Now this depends on value of ADESC ) so the other elements, i am allocating the memory, but how can i allocate Address, the number of fields ( i mean size) depends on the ASESC value so it could be any value .. how can i say reserve memory . The only idea i get is to have a function within the class of this definition where, i read the ADESC and then allocate value in address. Any other good ideas, please can you let me know. I really appreciate your links. Jeff Rush wrote: > > learningpython wrote: >> Sorry Senthil and all, >> I am sure, it's pretty easy but don't i am not able to catch it. In C, i >> just pass the & of the another structure in the structure element, some >> thing close. > > The equivalent to the & operator in C is just an object reference in > Python. > >> class Send_Msg_req(msg): >> def __init__(self): >> self.usr_mac =< Earlier class defined > >> self.msgtype = >> self.msgsize = >> self.order = ['usr_mac', >> 'msgtype ', >> 'msgsize '] > > so the line becomes just: > > self.usr.mac = usr_mac() > > where you declared usr_mac as a class in your prior email. If the > usr_mac() call needs arguments, provide them in the __init__ for > Send_MSG_req and pass them through: > > class Send_Msg_req(msg): > def __init__(self, a, b): > self.usr_mac = usr_mac(a, b) > self.msgtype = BV.Bit24.new() > > You haven't mentioned it but from here you'll need a flattener. From > your code I presume you have the idea for one already, in that: > >> self.msgtype = >> self.msgsize = >> self.order = ['usr_mac', >> 'msgtype ', >> 'msgsize '] > > at some point you have a method defined for the base 'msg' class that > uses the self.order list to construct the actual bitstream going out the > serial port from the various object attributes. So your BV.Bit24 class > has some method that gives you back the 24-bits that make it up. The > method that walks self.order and returns the raw bits is a flattener. > > Now with the declaring of self.usr_mac referencing an earlier class, you > just need to extend the idea of a flattener a bit further. So when you > call: > > msg = Send_Msg_req(MSG_A, 34) > serial.output(msg.flatten()) > > that .flatten method, upon encountering the self.usr_mac attribute, > calls the .flatten method of the usr_mac class and merges those bits > into the stream it is building for the Send_Msg_req class. > > This is why it is called a flattener -- it walks a tree of msg fragments > and constructs a flat sequence of bits making up a single message. > > Another example of the use of a flattener is the STAN DOM used in the > Nevow templating module used with the Twisted web framework. > > http://www.kieranholland.com/code/documentation/nevow-stan/ > > It takes an object graph of nested lists and attributes and returns a > flat string of HTML. It goes a bit further in that it has an extensible > registry of adapters for teaching the system to handle new kinds of > object graph nodes. > > -Jeff > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- View this message in context: http://www.nabble.com/calling-instance-of-the-other-class.-tp24145716p24176174.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From jeff at taupro.com Wed Jun 24 04:05:29 2009 From: jeff at taupro.com (Jeff Rush) Date: Tue, 23 Jun 2009 21:05:29 -0500 Subject: [BangPypers] calling instance of the other class. In-Reply-To: <20090623160529.GA4808@ubuntu.ubuntu-domain> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> <20090623160529.GA4808@ubuntu.ubuntu-domain> Message-ID: <4A4189E9.4020007@taupro.com> Senthil Kumaran wrote: > On Tue, Jun 23, 2009 at 03:50:42AM -0500, Jeff Rush wrote: >>> just pass the & of the another structure in the structure element, some > > Jeff: you seem to have got what he was trying to do with message > sending. Is this some standard way over serial port, as you went > upto the mention or flatteners. Flattening is not specific to message sending, just data structures in general. Over the years I have developed several protocol applications, some serial I/O, some network packets and I recognized what he trying to do. The principles of layering your message fragments so you deal with one abstraction at a time is common. It is also a fascinating area in which to use Python's introspection and metadata capabilities to greatly simplify something that is rather complicated when written in a procedural language like C. See my next email for an example. > But, exposing the learner to twisted and flatteners would be bit too > much of a high dose IMHO. You're probably right but I thought the docs for STAN were well-written and would be useful reading at least. STAN itself is actually a small part of Twisted, about 25 KB of source. I just happened to be reading the source earlier this week as I was trying to use it as an alternative template language with the Grok web framework. It won't just drop into Grok because of Twisted's way of using zope.interface and their own adapter registry. Therefore I'm working to split STAN out as a separate egg usable with Grok. I wish the Twisted folk would cooperate better with the setuptools world. -Jeff From jeff at taupro.com Wed Jun 24 04:12:33 2009 From: jeff at taupro.com (Jeff Rush) Date: Tue, 23 Jun 2009 21:12:33 -0500 Subject: [BangPypers] calling instance of the other class. In-Reply-To: <24176174.post@talk.nabble.com> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> <24176174.post@talk.nabble.com> Message-ID: <4A418B91.3010206@taupro.com> learningpython wrote: > Hi Jeff, > Can i ask you a related question. Long shot .. > but since you have good idea of area i am working ( which is communications, > sending, decoding, encoding) data over a serial interface. > I have a problem, i am facing.. Like in ASN format.. > I have a Data Unit ( am defining a class for each ) > > 1. msg type ( 8 bits ) > 2. Identity(8 bits) > 3. ADESC ( 8 bits) > 4. Address ( Now this depends on value of ADESC ) > so the other elements, i am allocating the memory, but how can i allocate > Address, the number of fields ( i mean size) depends on the ASESC value so > it could be any value .. how can i say reserve memory . > > The only idea i get is to have a function within the class of this > definition where, i read the ADESC and then allocate value in address. Any > other good ideas, please can you let me know. I really appreciate your > links. The important module for bit manipulation in Python in the struct module. If you haven't come across it before, you should read the docs. It is part of the Python standard library. http://docs.python.org/library/struct.html Once you've done that, check out this cool module that does much of what you are trying to do. Fair warning though, it uses very advanced Python coding including metaclasses. You'll learn a lot by carefully figuring out how it does what it does. For example it avoids the need for a self.order list to sequence the fields of a class definition in a rather clever fashion. http://code.activestate.com/recipes/498149/ I'm probably going to do a source code walkthrough of this module with the Dallas usergroup this Saturday because of its interesting parts. -Jeff From abpillai at gmail.com Wed Jun 24 09:15:52 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Wed, 24 Jun 2009 12:45:52 +0530 Subject: [BangPypers] calling instance of the other class. In-Reply-To: <4A418B91.3010206@taupro.com> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> <24176174.post@talk.nabble.com> <4A418B91.3010206@taupro.com> Message-ID: <8548c5f30906240015t10f5d57rd595661c2e92a930@mail.gmail.com> On Wed, Jun 24, 2009 at 7:42 AM, Jeff Rush wrote: > learningpython wrote: > > Hi Jeff, > > Can i ask you a related question. Long shot .. > > but since you have good idea of area i am working ( which is > communications, > > sending, decoding, encoding) data over a serial interface. > > I have a problem, i am facing.. Like in ASN format.. > > I have a Data Unit ( am defining a class for each ) > > > > 1. msg type ( 8 bits ) > > 2. Identity(8 bits) > > 3. ADESC ( 8 bits) > > 4. Address ( Now this depends on value of ADESC ) > > so the other elements, i am allocating the memory, but how can i allocate > > Address, the number of fields ( i mean size) depends on the ASESC value > so > > it could be any value .. how can i say reserve memory . > > > > The only idea i get is to have a function within the class of this > > definition where, i read the ADESC and then allocate value in address. > Any > > other good ideas, please can you let me know. I really appreciate your > > links. > > The important module for bit manipulation in Python in the struct > module. If you haven't come across it before, you should read the docs. > It is part of the Python standard library. > > http://docs.python.org/library/struct.html I was just scanning the replies wondering why someone has not mentioned "struct" so far! "struct" is very useful to pack data structures in/out of the wire. In fact if you want to convert your data structure to a bytestream, you should first investigate the possiblity of using "struct" before writing custom code or searching other solutions. > > Once you've done that, check out this cool module that does much of what > you are trying to do. Fair warning though, it uses very advanced Python > coding including metaclasses. You'll learn a lot by carefully figuring > out how it does what it does. For example it avoids the need for a > self.order list to sequence the fields of a class definition in a rather > clever fashion. > > http://code.activestate.com/recipes/498149/ This seems like a very useful recipe. Often one requres something which can handle nested objects which struct cannot do, since it wants things to be presented to it as basic data types. > > > I'm probably going to do a source code walkthrough of this module with > the Dallas usergroup this Saturday because of its interesting parts. > > -Jeff > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From learningpython at aol.com Wed Jun 24 11:33:17 2009 From: learningpython at aol.com (learningpython) Date: Wed, 24 Jun 2009 02:33:17 -0700 (PDT) Subject: [BangPypers] calling instance of the other class. In-Reply-To: <8548c5f30906240015t10f5d57rd595661c2e92a930@mail.gmail.com> References: <24145716.post@talk.nabble.com> <20090622131114.GB4143@ubuntu.ubuntu-domain> <24154873.post@talk.nabble.com> <4A409762.1080005@taupro.com> <24176174.post@talk.nabble.com> <4A418B91.3010206@taupro.com> <8548c5f30906240015t10f5d57rd595661c2e92a930@mail.gmail.com> Message-ID: <24181538.post@talk.nabble.com> bangpyper wrote: > > On Wed, Jun 24, 2009 at 7:42 AM, Jeff Rush wrote: > >> learningpython wrote: >> > Hi Jeff, >> > Can i ask you a related question. Long shot .. >> > but since you have good idea of area i am working ( which is >> communications, >> > sending, decoding, encoding) data over a serial interface. >> > I have a problem, i am facing.. Like in ASN format.. >> > I have a Data Unit ( am defining a class for each ) >> > >> > 1. msg type ( 8 bits ) >> > 2. Identity(8 bits) >> > 3. ADESC ( 8 bits) >> > 4. Address ( Now this depends on value of ADESC ) >> > so the other elements, i am allocating the memory, but how can i >> allocate >> > Address, the number of fields ( i mean size) depends on the ASESC value >> so >> > it could be any value .. how can i say reserve memory . >> > >> > The only idea i get is to have a function within the class of this >> > definition where, i read the ADESC and then allocate value in address. >> Any >> > other good ideas, please can you let me know. I really appreciate your >> > links. >> >> The important module for bit manipulation in Python in the struct >> module. If you haven't come across it before, you should read the docs. >> It is part of the Python standard library. >> >> http://docs.python.org/library/struct.html > > > I was just scanning the replies wondering why someone has not > mentioned "struct" so far! > > "struct" is very useful to pack data structures in/out of the wire. > In fact if you want to convert your data structure to a bytestream, you > should first investigate the possiblity of using "struct" before writing > custom code or searching other solutions. > > > > >> >> Once you've done that, check out this cool module that does much of what >> you are trying to do. Fair warning though, it uses very advanced Python >> coding including metaclasses. You'll learn a lot by carefully figuring >> out how it does what it does. For example it avoids the need for a >> self.order list to sequence the fields of a class definition in a rather >> clever fashion. >> >> http://code.activestate.com/recipes/498149/ > > > This seems like a very useful recipe. Often one requres something > which can handle nested objects which struct cannot do, since it wants > things to be presented to it as basic data types. > > >> >> >> I'm probably going to do a source code walkthrough of this module with >> the Dallas usergroup this Saturday because of its interesting parts. >> >> -Jeff > > Hi Jeff, Thanks a lot. Much appreciated. Is the code walkthrough a video > session or a group meeting > at some place. If there is a any link to uploaded of your presentation. > Please request you to send me one. I will surely follow your links > meanwhile. Thanks a lot. >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > > > > -- > -Anand > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > > -- View this message in context: http://www.nabble.com/calling-instance-of-the-other-class.-tp24145716p24181538.html Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com. From ssquery at gmail.com Fri Jun 26 06:37:03 2009 From: ssquery at gmail.com (sudhakar s) Date: Fri, 26 Jun 2009 10:07:03 +0530 Subject: [BangPypers] py2exe with pmw...help needed Message-ID: <1528d2590906252137p10f9d634h71f0a0056fe0c2a3@mail.gmail.com> Hi Everyone, This is sudhakar,i want to covert my pmw application into an executable on Windows and ".dmg or .app" on Mac. while i was trying i am able to convert but unable to run my application. After coverting Menubar.py into Menubar.exe using py2exe and when i run it i get the ERROR: C:\Python25\dist>MenuBar.exe Traceback (most recent call last): File "MenuBar.py", line 160, in File "Pmw\Pmw_1_3\lib\PmwLoader.pyc", line 134, in __getattr__ File "Pmw\Pmw_1_3\lib\PmwLoader.pyc", line 113, in _initialise IOError: [Errno 2] No such file or directory: 'C:\\Python25\\dist\\.\\Pmw\\Pmw_1_3\\lib\\Pmw.def' Please help me how to solve the error and make an executable... I was using the setup.py script as below: from distutils.core import setup import py2exe setup( console=['MenuBar.py'], options={ 'py2exe': { 'packages':['Pmw', 'Pmw.Pmw_1_3', 'Pmw.Pmw_1_3.lib',], 'skip_archive': True, 'dll_excludes': ['MSVCR71.dll'] } } ) With Regards S Sudhakar. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sridhar.ratna at gmail.com Mon Jun 29 01:32:45 2009 From: sridhar.ratna at gmail.com (Sridhar Ratnakumar) Date: Sun, 28 Jun 2009 16:32:45 -0700 Subject: [BangPypers] Responding to people who lack the curiosity In-Reply-To: <5ead360a0906112316s54d4d856h6cd1cfe68309bf8b@mail.gmail.com> References: <7c73a13a0906112131r72e6887i8f4c29e54e7dad95@mail.gmail.com> <3e3294b70906112231n6478b876y74ded56c70d0fa69@mail.gmail.com> <5ead360a0906112316s54d4d856h6cd1cfe68309bf8b@mail.gmail.com> Message-ID: <4A47FD9D.7000106@gmail.com> Some interesting comments from reddit (alluding to authority and a servile attitude): [quote]'(...)he found Indian programmers to be very reluctant to speak up to management. He said they would rarely, if ever, say they were overburdened with too much work, and instead of asking for help, or saying they couldn't accomplish a task in a given period of time, they'd work themselves to death.'[endquote] [quote]'It's more because they're used to authority figures that treat feedback as criticism.'[endquote] [quote]'I have an Indian roommate who is currently in the CS program at UCLA. He's probably one of the smartest guys I know (...) However, he regards me as $deity{CS} (...), and so working with him on any project is a pain, because he seems to believe that whatever I come up with that approximates a design is The Way To Do Things (TM). However, as soon as I coerce him into designing something on his own, without prior input, he comes up with great stuff.'[endquote] - http://www.reddit.com/r/programming/comments/8uiuq/top_indian_ceo_most_american_grads_are/c0ah4an On 6/11/2009 11:16 PM, Srijayanth Sridhar wrote: > Good points, but what I am most curious about is why this phenomenon is > so prevalent in the Indian dev community and not as pervasive elsewhere. > The ruby community is rife with apt examples. The average Indian > developer will pop up and demand answers for a really silly Rails > question or something. > > Jayanth > > On Fri, Jun 12, 2009 at 11:01 AM, Pradeep Gowda > wrote: > > On Fri, Jun 12, 2009 at 12:31 AM, Sridhar > Ratnakumar> > wrote: > > On Thu, Jun 4, 2009 at 3:22 AM, Srijayanth > Sridhar> wrote: > > > I don't know the reasons either, but would like to know too. > > > > I often think the best way to handle such posters is to momentarily > > divert the topic of the conversation to their own interest-level, > > curiosity and self-learning . > .. > > I think it's best to ignore mails from users who do not care enough to > use their real name/nick while asking questions. The user in question > introduced himself as prasad, but we scan mail titles before reading > mail content. Most people wouldn't care to read a mail from > "testing123 test>", > let alone answer it. Online > forums are just like real life communities, where people judge you > by what you say and how you say it. It's hard to relate to a > anonymous, faceless name like "testing 123". Use your real name. [1] > > If the same question is asked by some one who "appears" to be a real > person, it might still be worth answering them, at the same time also > pointing them to a net etiquette > link [2]. In good faith, we can assume that the user in question is > really new to using forums/mailing lists etc., > > Over time, most people do learn how to do their home work and in turn > ask smart questions. > > I'll see whether our membership welcome messages can be improved to > reflect this. > > Happy hacking, > Pradeep > > [1] http://informationarchitects.jp/use-your-real-name-when-you-comment/ > [2] http://catb.org/esr/faqs/smart-questions.html > _______________________________________________ > 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 noufal at gmail.com Mon Jun 29 07:47:29 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 29 Jun 2009 11:17:29 +0530 Subject: [BangPypers] Invitations fo Pycon India Message-ID: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> (Sorry for cross posting but we need some visibility here) Hello everyone, Our site is live at http://in.pycon.org/2009/ The next thing we need to do is to publicise this event. We're relying on informal channels to get everyone to know about the event. Mailing lists, blogs, tweets what not. Please CC me (noufal at gmail) when you mail any lists that you're on. It would be useful to keep track of how much outreach we have. Mails and invitations from people who have cred on some lists would especially be valued. This can't be a one man thing. The more people who dive into this and do something, the better the event will be. We can keep further discussions of the invitations on the inpycon list. I cross posted so that more people would be aware that we need to publicise this. Thanks -- ~noufal From orsenthil at gmail.com Mon Jun 29 08:20:29 2009 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 29 Jun 2009 11:50:29 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> Message-ID: <20090629062029.GA4259@ubuntu.ubuntu-domain> On Mon, Jun 29, 2009 at 11:17:29AM +0530, Noufal Ibrahim wrote: > Hello everyone, > Our site is live at http://in.pycon.org/2009/ > That's cool.. I shall register right away and help with the promotional stuff. Need to catch with mails tough. -- Senthil If you stand on your head, you will get footprints in your hair. From duakapil at gmail.com Mon Jun 29 08:44:59 2009 From: duakapil at gmail.com (Kapsicum) Date: Mon, 29 Jun 2009 12:14:59 +0530 Subject: [BangPypers] [Commercial] Python/PHP Message-ID: <4d846e3e0906282344h54a24907nd0534798b251fc2e@mail.gmail.com> Hi, There is requirement for LAMP DEVELOPER in my company following is the job description :- Responsibilities This position will be responsible for: ? Working as a developer / software engineer on a fast-paced team assigned to a complex, n-tier, internet-based workforce information system. ? Participating in design and documentation of screen and report layouts. ? Participating in design and documentation of detailed technical solution options, and communicating these to projects customer. ? Developing and maintaining high quality, efficient and easily maintainable software modules to meet business and design requirements. ? Performing thorough unit and integration testing of newly developed and changed modules. ? Defining and/or executing system and regression test plans under the direction of the QA Team Leader. ? Investigating and correcting software bugs. ? Developing high quality end user documentation and technical documentation. ? Responding to specific customer support and information requests. Mandatory Requirement : 1. 2+ years of experience in PHP/Python preferably Python. 2. Good understanding of OOPS concepts. 3. Good knowledge of Linux including shell scripting 4. Experience with various RDBMS preferably Oracle 9i. 5. Experience with XML,CSS, Javascript. 6. Good Team Player. Understanding of Apache, Agile development , Test based development is a big plus Please contact me offline for this position. Thanks, __Kaps__ -- Kapil Dua Skype: mitr2mitr IRC: kaps Mobile: +919711311052 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stallomir at gmail.com Mon Jun 29 09:00:03 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Mon, 29 Jun 2009 12:30:03 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> Message-ID: *IMHO _that_ would be better for visibility From stallomir at gmail.com Mon Jun 29 08:53:41 2009 From: stallomir at gmail.com (Mandar Gokhale) Date: Mon, 29 Jun 2009 12:23:41 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <20090629062029.GA4259@ubuntu.ubuntu-domain> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> Message-ID: Is there a standard twitter hashtag for this? IMHO would be better for visibility On 6/29/09, Senthil Kumaran wrote: > On Mon, Jun 29, 2009 at 11:17:29AM +0530, Noufal Ibrahim wrote: >> Hello everyone, >> Our site is live at http://in.pycon.org/2009/ >> > > That's cool.. > > I shall register right away and help with the promotional stuff. Need > to catch with mails tough. > > > -- > Senthil > If you stand on your head, you will get footprints in your hair. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- He saw his life stretching out in front of him like a nasty black tunnel with no light at the end of it. ...He'd been wrong, there was a light at the end of the tunnel, and it was a flamethrower. From abpillai at gmail.com Mon Jun 29 09:33:20 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Mon, 29 Jun 2009 13:03:20 +0530 Subject: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot In-Reply-To: <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> References: <4A196D88.3040806@voidspace.org.uk> <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> Message-ID: <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> Hi, This was posted in Pycon-organizers a while back. Perhaps this is useful for our twitter organizing ? Noufal, let me know if I need to follow up on this. Will do so gladly! Thanks --Anand ---------- Forwarded message ---------- From: Cosmin Stejerean Date: Mon, May 25, 2009 at 3:57 AM Subject: Re: [PyCon-Organizers] PyCon Twitter Bot To: Michael Foord Cc: pycon-organizers Pycon-Organizers On Sun, May 24, 2009 at 10:53 AM, Michael Foord wrote: > Hello all, > > Anyone know who organised the PyCon Twitter bot? We'd like to do the same > thing for EuroPython. Is the code available? (Hopefully with the recursing > tweet fix in place...) > @crim on Twitter is responsible for the @pycon bot. http://twitter.com/crim -- Cosmin Stejerean http://offbytwo.com _______________________________________________ PyCon-organizers mailing list PyCon-organizers at python.org http://mail.python.org/mailman/listinfo/pycon-organizers -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From shivraj.ms at gmail.com Mon Jun 29 10:13:52 2009 From: shivraj.ms at gmail.com (Shivaraj M S) Date: Mon, 29 Jun 2009 13:43:52 +0530 Subject: [BangPypers] Fwd: [SciPy-dev] ANN: SciPy 2009 student sponsorship In-Reply-To: References: Message-ID: <2c1c314c0906290113o63b1d82dw2a2f90a62268511c@mail.gmail.com> ---------- Forwarded message ---------- From: Jarrod Millman Date: Mon, Jun 29, 2009 at 12:29 PM Subject: [SciPy-dev] ANN: SciPy 2009 student sponsorship To: SciPy Developers List I am pleased to announce that the Python Software Foundation is sponsoring 10 students' travel, registration, and accommodation for the SciPy 2009 conference (Aug. 18-23). The focus of the conference is both on scientific libraries and tools developed with Python and on scientific or engineering achievements using Python. If you're in college or a graduate program, please check out the details here: http://conference.scipy.org/student-funding About the conference -------------------- SciPy 2009, the 8th Python in Science conference, will be held from August 18-23, 2009 at Caltech in Pasadena, CA, USA. The conference starts with two days of tutorials to the scientific Python tools. There will be two tracks, one for introduction of the basic tools to beginners, and one for more advanced tools. The tutorials will be followed by two days of talks. Both days of talks will begin with a keynote address. The first day?s keynote will be given by Peter Norvig, the Director of Research at Google; while, the second keynote will be delivered by Jon Guyer, a Materials Scientist in the Thermodynamics and Kinetics Group at NIST. The program committee will select the remaining talks from submissions to our call for papers. All selected talks will be included in our conference proceedings edited by the program committee. After the talks each day we will provide several rooms for impromptu birds of a feather discussions. Finally, the last two days of the conference will be used for a number of coding sprints on the major software projects in our community. For the 8th consecutive year, the conference will bring together the developers and users of the open source software stack for scientific computing with Python. Attendees have the opportunity to review the available tools and how they apply to specific problems. By providing a forum for developers to share their Python expertise with the wider commercial, academic, and research communities, this conference fosters collaboration and facilitates the sharing of software components, techniques, and a vision for high level language use in scientific computing. For further information, please visit the conference homepage: http://conference.scipy.org. Important Dates --------------- * Friday, July 3: Abstracts Due * Friday, July 10: Announce accepted talks, post schedule * Friday, July 10: Early Registration ends * Tuesday-Wednesday, August 18-19: Tutorials * Thursday-Friday, August 20-21: Conference * Saturday-Sunday, August 22-23: Sprints * Friday, September 4: Papers for proceedings due Executive Committee ------------------- * Jarrod Millman, UC Berkeley, USA (Conference Chair) * Ga?l Varoquaux, INRIA Saclay, France (Program Co-Chair) * St?fan van der Walt, University of Stellenbosch, South Africa (Program Co-Chair) * Fernando P?rez, UC Berkeley, USA (Tutorial Chair) _______________________________________________ Scipy-dev mailing list Scipy-dev at scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev -- Regards _______________ Shivaraj -------------- next part -------------- An HTML attachment was scrubbed... URL: From noufal at gmail.com Mon Jun 29 10:14:10 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 29 Jun 2009 13:44:10 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> Message-ID: <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> On Mon, Jun 29, 2009 at 12:23 PM, Mandar Gokhale wrote: > Is there a standard twitter hashtag for this? IMHO would be better for > visibility We could just decide on one. I don't use twitter so I don't know the details but say #pyconindia? -- ~noufal From noufal at gmail.com Mon Jun 29 10:16:52 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 29 Jun 2009 13:46:52 +0530 Subject: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot In-Reply-To: <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> References: <4A196D88.3040806@voidspace.org.uk> <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> Message-ID: <9963e56e0906290116x31a9e0dew3fb7197666d1bdf9@mail.gmail.com> On Mon, Jun 29, 2009 at 1:03 PM, Anand Balachandran Pillai wrote: > Hi, > > ????????? This was posted in Pycon-organizers a while back. > Perhaps this is useful for our twitter organizing ? > > Noufal, let me know if I need to follow up on this. Will do so gladly! I'm not too clued in on what the bot does or how we can use it. Can you post some details? If it can increase visibility and possibly attendance we should go for it. -- ~noufal From anurag08priyam at gmail.com Mon Jun 29 11:21:30 2009 From: anurag08priyam at gmail.com (Anurag Priyam) Date: Mon, 29 Jun 2009 14:51:30 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> Message-ID: <95d7ba070906290221of37076co27e8cf56e638b069@mail.gmail.com> i have started #pyconindia hashtag. the more the people tweet with #pyconidia in their tweet, the more it will trend, and increase our visiblity on twitter. -- Anurag Priyam 1st Year,Mechanical Engineering, IIT Kharagpur. +91-9775550642 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noufal at gmail.com Mon Jun 29 11:24:49 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 29 Jun 2009 14:54:49 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <95d7ba070906290221of37076co27e8cf56e638b069@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> <95d7ba070906290221of37076co27e8cf56e638b069@mail.gmail.com> Message-ID: <9963e56e0906290224o67395e36lb7e61e8f2ee8a01d@mail.gmail.com> On Mon, Jun 29, 2009 at 2:51 PM, Anurag Priyam wrote: > i have started #pyconindia hashtag. the more the people tweet with > #pyconidia in their tweet, the more it will trend, and increase our > visiblity on twitter. Thanks Anurag. :) Ranganath, Can you put this on a prominent place on the website? Preferably on a neat section in the landing page. Thanks -- ~noufal From lawgon at au-kbc.org Mon Jun 29 11:28:19 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 29 Jun 2009 14:58:19 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <95d7ba070906290221of37076co27e8cf56e638b069@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> <95d7ba070906290221of37076co27e8cf56e638b069@mail.gmail.com> Message-ID: <200906291458.19220.lawgon@au-kbc.org> On Monday 29 June 2009 14:51:30 Anurag Priyam wrote: > i have started #pyconindia hashtag. the more the people tweet with > #pyconidia in their tweet, the more it will trend, and increase our > visiblity on twitter. and is that a good thing ;-) it is only now I realise I have grown old. -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From lawgon at au-kbc.org Mon Jun 29 11:29:37 2009 From: lawgon at au-kbc.org (Kenneth Gonsalves) Date: Mon, 29 Jun 2009 14:59:37 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <9963e56e0906290224o67395e36lb7e61e8f2ee8a01d@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <95d7ba070906290221of37076co27e8cf56e638b069@mail.gmail.com> <9963e56e0906290224o67395e36lb7e61e8f2ee8a01d@mail.gmail.com> Message-ID: <200906291459.37309.lawgon@au-kbc.org> On Monday 29 June 2009 14:54:49 Noufal Ibrahim wrote: > On Mon, Jun 29, 2009 at 2:51 PM, Anurag Priyam wrote: > > i have started #pyconindia hashtag. the more the people tweet with > > #pyconidia in their tweet, the more it will trend, and increase our > > visiblity on twitter. > > Thanks Anurag. :) > > Ranganath, > Can you put this on a prominent place on the website? Preferably on > a neat section in the landing page. should be in the links at the right - and as we go on to all the other social networking sites with strange names and stranger customs, those can also be added to the links -- regards Kenneth Gonsalves Associate NRC-FOSS http://nrcfosshelpline.in/web/ From abpillai at gmail.com Mon Jun 29 11:45:15 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Mon, 29 Jun 2009 15:15:15 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <200906291458.19220.lawgon@au-kbc.org> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> <95d7ba070906290221of37076co27e8cf56e638b069@mail.gmail.com> <200906291458.19220.lawgon@au-kbc.org> Message-ID: <8548c5f30906290245q6f967a68j373bba6b1f2cf2b8@mail.gmail.com> On Mon, Jun 29, 2009 at 2:58 PM, Kenneth Gonsalves wrote: > On Monday 29 June 2009 14:51:30 Anurag Priyam wrote: > > i have started #pyconindia hashtag. the more the people tweet with > > #pyconidia in their tweet, the more it will trend, and increase our > > visiblity on twitter. > > and is that a good thing ;-) it is only now I realise I have grown old. Even me at a bit more than 30+ yrs. So far I had thought only religious leaders/politicians had "followers" :) ! > > -- > regards > Kenneth Gonsalves > Associate > NRC-FOSS > http://nrcfosshelpline.in/web/ > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From vid at svaksha.com Tue Jun 30 07:57:28 2009 From: vid at svaksha.com (vid) Date: Tue, 30 Jun 2009 11:27:28 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> Message-ID: <12470af00906292257n300d5f48yd8ec0ddfded6ca20@mail.gmail.com> On Mon, Jun 29, 2009 at 13:44, Noufal Ibrahim wrote: > > We could just decide on one. I don't use twitter so I don't know the > details but say #pyconindia? how about identica? - http://identi.ca/doc/faq i just created http://identi.ca/pyconindia/all, and will hand it over to anyone interested in maintaining it. please volunteer on the list before june03. -- thanks || vid || http://www.svaksha.com || From hiddenharmony at gmail.com Tue Jun 30 08:29:02 2009 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Tue, 30 Jun 2009 11:59:02 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <12470af00906292257n300d5f48yd8ec0ddfded6ca20@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> <12470af00906292257n300d5f48yd8ec0ddfded6ca20@mail.gmail.com> Message-ID: <91bea30d0906292329n3e37c21cu1652318f4ee320ae@mail.gmail.com> On Tue, Jun 30, 2009 at 11:27 AM, vid wrote: > On Mon, Jun 29, 2009 at 13:44, Noufal Ibrahim wrote: >> >> We could just decide on one. I don't use twitter so I don't know the >> details but say #pyconindia? > > how about identica? - http://identi.ca/doc/faq > i just created http://identi.ca/pyconindia/all, and will hand it over > to anyone interested in maintaining it. please volunteer on the list > before june03. june 03 is gone its 2009 and june of 2009 is almost over too :) regards Vivek -- The hidden harmony is better than the obvious!! From vid at svaksha.com Tue Jun 30 09:15:17 2009 From: vid at svaksha.com (vid) Date: Tue, 30 Jun 2009 12:45:17 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <12470af00906292257n300d5f48yd8ec0ddfded6ca20@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> <12470af00906292257n300d5f48yd8ec0ddfded6ca20@mail.gmail.com> Message-ID: <12470af00906300015x425f320ase580db2e1c951ed1@mail.gmail.com> On Tue, Jun 30, 2009 at 11:27, vid wrote: > > how about identica? - http://identi.ca/doc/faq > i just created http://identi.ca/pyconindia/all, and will hand it over > to anyone interested in maintaining it. please volunteer on the list > before june03. ^^^^^^^^^^^^ correction : july03 :) -- thanks || vid || http://www.svaksha.com || From amitsaha.in at gmail.com Tue Jun 30 12:06:24 2009 From: amitsaha.in at gmail.com (Amit Saha) Date: Tue, 30 Jun 2009 15:36:24 +0530 Subject: [BangPypers] Performance benefits of Generators? Message-ID: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> Hello, Theoretically and/or practically, is it possible to reason about the performance gain/loss of using generators? The PEP 255 (http://www.python.org/dev/peps/pep-0255/) doesn't seem to hint at it. Anything that any of you would like to share on this ? Best, Amit -- Journal: http://amitksaha.wordpress.com, ?-blog: http://twitter.com/amitsaha Freenode: cornucopic in #scheme, #lisp, #math,#linux, #python From amitsaha.in at gmail.com Tue Jun 30 12:07:44 2009 From: amitsaha.in at gmail.com (Amit Saha) Date: Tue, 30 Jun 2009 15:37:44 +0530 Subject: [BangPypers] Performance benefits of Generators? In-Reply-To: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> References: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> Message-ID: <547db2260906300307i47324708g50bef97deb189789@mail.gmail.com> On Tue, Jun 30, 2009 at 3:36 PM, Amit Saha wrote: > Hello, > > Theoretically and/or practically, is it possible to reason about the > performance gain/loss of using generators? ?The PEP 255 > (http://www.python.org/dev/peps/pep-0255/) doesn't seem to hint at it. > > Anything that any of you would like to share on this ? Since, this is out of mere curiosity, for the moment, performance would be simply the time taken to complete a task. -Amit -- Journal: http://amitksaha.wordpress.com, ?-blog: http://twitter.com/amitsaha Freenode: cornucopic in #scheme, #lisp, #math,#linux, #python From pythonic at gmail.com Tue Jun 30 12:17:41 2009 From: pythonic at gmail.com (Shekhar) Date: Tue, 30 Jun 2009 15:47:41 +0530 Subject: [BangPypers] Performance benefits of Generators? In-Reply-To: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> References: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> Message-ID: <4A49E645.509@gmail.com> Amit Saha wrote: > Hello, > > Theoretically and/or practically, is it possible to reason about the > performance gain/loss of using generators? The PEP 255 > (http://www.python.org/dev/peps/pep-0255/) doesn't seem to hint at it. > > Anything that any of you would like to share on this ? > > Best, > Amit > > Hi Amit, The pdf at http://www.dabeaz.com/generators-uk/GeneratorsUK.pdf was a great deal of help for me. It has good examples about performance (some numbers too) gains in different situations. Cheers, Shekhar From chirayu at chirayu.org Tue Jun 30 12:20:26 2009 From: chirayu at chirayu.org (Chirayu Patel) Date: Tue, 30 Jun 2009 15:50:26 +0530 Subject: [BangPypers] Performance benefits of Generators? In-Reply-To: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> References: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> Message-ID: <6de82a140906300320s784252c1hf941924f79d3cb2e@mail.gmail.com> On Tue, Jun 30, 2009 at 3:36 PM, Amit Saha wrote: > > Theoretically and/or practically, is it possible to reason about the > performance gain/loss of using generators? The PEP 255 > (http://www.python.org/dev/peps/pep-0255/) doesn't seem to hint at it. > > Anything that any of you would like to share on this ? > The most prevalent use case is in designs where a list generated by a function is iterated over (third para of the PEP). Other couple of places where I have used them are for tree traversal (instead of recursion), and as generator expressions (instead of list comprehensions). In all these three scenarios generators provide both CPU and memory improvements over the traditional solutions. -------------- next part -------------- An HTML attachment was scrubbed... URL: From venkat83 at gmail.com Tue Jun 30 12:23:06 2009 From: venkat83 at gmail.com (Venkatraman S) Date: Tue, 30 Jun 2009 15:53:06 +0530 Subject: [BangPypers] Performance benefits of Generators? In-Reply-To: <547db2260906300307i47324708g50bef97deb189789@mail.gmail.com> References: <547db2260906300306v4f3a203fx999981556ffbf7a3@mail.gmail.com> <547db2260906300307i47324708g50bef97deb189789@mail.gmail.com> Message-ID: On Tue, Jun 30, 2009 at 3:37 PM, Amit Saha wrote: > > > > > Theoretically and/or practically, is it possible to reason about the > > performance gain/loss of using generators? The PEP 255 > > (http://www.python.org/dev/peps/pep-0255/) doesn't seem to hint at it. > > Since, this is out of mere curiosity, for the moment, performance > would be simply the time taken to complete a task. > Check out David Beazley's(dabeaz) article on Generators. OTOH, Decorators , lambdas ('syntactic sugars') et al reduce the number of lines of code, depending on the scenario, for a given piece of complex logic, but these are 'slow'. But, I dont think the factor is huge enough to cause a performance bottleneck. I had similar reservations on list comprehensions, but in some cases the bytecode generated by LC is same as the one generated by the if-else/loop counterparts. If you are building apps wherein every microsecond matters, then it is better to time both variants - the sugars and their vanilla equivalents - and then choose the best. -V- http://twitter.com/venkasub -------------- next part -------------- An HTML attachment was scrubbed... URL: From abpillai at gmail.com Tue Jun 30 14:12:36 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Tue, 30 Jun 2009 17:42:36 +0530 Subject: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot In-Reply-To: <9963e56e0906290116x31a9e0dew3fb7197666d1bdf9@mail.gmail.com> References: <4A196D88.3040806@voidspace.org.uk> <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> <9963e56e0906290116x31a9e0dew3fb7197666d1bdf9@mail.gmail.com> Message-ID: <8548c5f30906300512r5b12870ge63eefc94055a242@mail.gmail.com> Hi Noufal, The main use of the bot for a conference is for sending updates via twitter. The way it works is as follows. 1. A twitter bot account for the conference is created on twitter. For our conference it could be "inpycon" for example. 2. An admin befriends the bot. 3. For broadcasting (tweeting) a message, the admin sends a command to the twitter bot with the message to be tweeted and the bot "tweets" it. 4. Everyone "following" the bot gets the update. 5. We can also publish the update on the website in this case, the in-pycon website. These are "push" bots. The bot will be running on a server, in this case it should ideally run on the inpycon server. I have the twitter reflect script written by Stephen Crimm for Pycon with me. I can take care of installing this on our inpycon server and administering it. I just need root ssh access on the inpycon machine. Kenneth, can u send this info to me directly ? Thanks --Anand On Mon, Jun 29, 2009 at 1:46 PM, Noufal Ibrahim wrote: > On Mon, Jun 29, 2009 at 1:03 PM, Anand Balachandran > Pillai wrote: > > Hi, > > > > This was posted in Pycon-organizers a while back. > > Perhaps this is useful for our twitter organizing ? > > > > Noufal, let me know if I need to follow up on this. Will do so gladly! > > I'm not too clued in on what the bot does or how we can use it. Can > you post some details? > > If it can increase visibility and possibly attendance we should go for it. > > -- > ~noufal > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From hiddenharmony at gmail.com Tue Jun 30 14:25:47 2009 From: hiddenharmony at gmail.com (Vivek Khurana) Date: Tue, 30 Jun 2009 17:55:47 +0530 Subject: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot In-Reply-To: <8548c5f30906300512r5b12870ge63eefc94055a242@mail.gmail.com> References: <4A196D88.3040806@voidspace.org.uk> <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> <9963e56e0906290116x31a9e0dew3fb7197666d1bdf9@mail.gmail.com> <8548c5f30906300512r5b12870ge63eefc94055a242@mail.gmail.com> Message-ID: <91bea30d0906300525y536e6f91i3c865a56d52266dd@mail.gmail.com> On Tue, Jun 30, 2009 at 5:42 PM, Anand Balachandran Pillai wrote: > Hi Noufal, > > ?????? The main use of the bot for a conference is for sending updates > via twitter. The way it works is as follows. > > 1. A twitter bot account for the conference is created on twitter. > For our conference it could be "inpycon" for example. > 2. An admin befriends the bot. > 3. For broadcasting (tweeting) a message, the admin sends a command > to the twitter bot with the message to be tweeted and the bot "tweets" it. > 4. Everyone "following" the bot gets the update. > 5. We can also publish the update on the website in this case, > the in-pycon website. > > These are "push" bots. > > The bot will be running on a server, in this case it should ideally run > on the inpycon server. > Your idea is fantastic but I cant understand how difficult it is to go to twitter.com and post the message ? At last we will be posting max two messages a day ? So for a simple two message why run such a big setup... regards Vivek -- The hidden harmony is better than the obvious!! From noufal at gmail.com Tue Jun 30 14:35:04 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 30 Jun 2009 18:05:04 +0530 Subject: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot In-Reply-To: <91bea30d0906300525y536e6f91i3c865a56d52266dd@mail.gmail.com> References: <4A196D88.3040806@voidspace.org.uk> <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> <9963e56e0906290116x31a9e0dew3fb7197666d1bdf9@mail.gmail.com> <8548c5f30906300512r5b12870ge63eefc94055a242@mail.gmail.com> <91bea30d0906300525y536e6f91i3c865a56d52266dd@mail.gmail.com> Message-ID: <9963e56e0906300535i2bbbea98sbf0a2ca09c8a6948@mail.gmail.com> It's probably useful if it can be quickly set up. I think *real* publicity will be gained by people posting/blogging about the event. -- ~noufal From abpillai at gmail.com Tue Jun 30 14:48:44 2009 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Tue, 30 Jun 2009 18:18:44 +0530 Subject: [BangPypers] Fwd: [PyCon-Organizers] PyCon Twitter Bot In-Reply-To: <9963e56e0906300535i2bbbea98sbf0a2ca09c8a6948@mail.gmail.com> References: <4A196D88.3040806@voidspace.org.uk> <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> <9963e56e0906290116x31a9e0dew3fb7197666d1bdf9@mail.gmail.com> <8548c5f30906300512r5b12870ge63eefc94055a242@mail.gmail.com> <91bea30d0906300525y536e6f91i3c865a56d52266dd@mail.gmail.com> <9963e56e0906300535i2bbbea98sbf0a2ca09c8a6948@mail.gmail.com> Message-ID: <8548c5f30906300548q2c337181o441f97a84972fa24@mail.gmail.com> On Tue, Jun 30, 2009 at 6:05 PM, Noufal Ibrahim wrote: > It's probably useful if it can be quickly set up. > > I think *real* publicity will be gained by people posting/blogging > about the event. You got it wrong. A twitter bot is not for publicity. It is for actual instant updates of any conference events/decisions to those interested. For example, we can update important dates/any conference website updates to subscribers. For example, when we start accepting talk proposals, we can tweet it. Twitter is popular among web developers and folks who are up2date with technology, so this will be very useful. I know someone will say RSS feeds, but there is no doubt that tweets are much more instantaneous than RSS feeds. Let me try it. If it turns out to be too much of a headache, we can always drop it. > > -- > ~noufal > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand -------------- next part -------------- An HTML attachment was scrubbed... URL: From noufal at gmail.com Tue Jun 30 14:50:58 2009 From: noufal at gmail.com (Noufal Ibrahim) Date: Tue, 30 Jun 2009 18:20:58 +0530 Subject: [BangPypers] [Inpycon] Fwd: [PyCon-Organizers] PyCon Twitter Bot In-Reply-To: <8548c5f30906300548q2c337181o441f97a84972fa24@mail.gmail.com> References: <4A196D88.3040806@voidspace.org.uk> <383bbcce0905241527o6d5f4e2ch90be61b3a3426e65@mail.gmail.com> <8548c5f30906290033md6268a1x4c7128900c5ada6e@mail.gmail.com> <9963e56e0906290116x31a9e0dew3fb7197666d1bdf9@mail.gmail.com> <8548c5f30906300512r5b12870ge63eefc94055a242@mail.gmail.com> <91bea30d0906300525y536e6f91i3c865a56d52266dd@mail.gmail.com> <9963e56e0906300535i2bbbea98sbf0a2ca09c8a6948@mail.gmail.com> <8548c5f30906300548q2c337181o441f97a84972fa24@mail.gmail.com> Message-ID: <9963e56e0906300550t7dde9e4ex158d0de1a4b04db2@mail.gmail.com> On Tue, Jun 30, 2009 at 6:18 PM, Anand Balachandran Pillai wrote: [..] > ?Let me try it. If it turns out to be too much of a headache, we can always > ?drop it. That's wise. -- ~noufal From maxin_john at yahoo.co.uk Tue Jun 30 15:10:17 2009 From: maxin_john at yahoo.co.uk (Maxin B John) Date: Tue, 30 Jun 2009 13:10:17 +0000 (GMT) Subject: [BangPypers] [Inpycon] Fwd: [PyCon-Organizers] PyCon Twitter Bot Message-ID: <386972.54945.qm@web26603.mail.ukl.yahoo.com> Hi , As we all know, using twitter with python-twitter is very simple: ############################################################### # The simplest python program to play with twitter using python-twitter #? Google Code:?? http://code.google.com/p/python-twitter/ #? Google Groups: http://groups.google.com/group/python-twitter #? Python twitter API can be used to send and receive twitter messages # # Thanks to DeWitt Clinton for this wonderful module # import twitter api = twitter.Api(username="my_twitter_username", password="my_secret_password", input_encoding=None) status = api.PostUpdate("example of the simplest twitter message program ") print status.text ########################################################### I am very much interested in the development of? 'PyCon Twitter Bot'. So, Anand and others, please tell me how shall we co-ordinate it's development? Best Regards, Maxin B. John -------------- next part -------------- An HTML attachment was scrubbed... URL: From ranganaths at gmail.com Tue Jun 30 17:16:10 2009 From: ranganaths at gmail.com (Ranganath s) Date: Tue, 30 Jun 2009 20:46:10 +0530 Subject: [BangPypers] Invitations fo Pycon India In-Reply-To: <12470af00906300015x425f320ase580db2e1c951ed1@mail.gmail.com> References: <9963e56e0906282247k3944e634iabfabcb1cee6b624@mail.gmail.com> <20090629062029.GA4259@ubuntu.ubuntu-domain> <9963e56e0906290114p618e3157kdcae1fb8e7f40911@mail.gmail.com> <12470af00906292257n300d5f48yd8ec0ddfded6ca20@mail.gmail.com> <12470af00906300015x425f320ase580db2e1c951ed1@mail.gmail.com> Message-ID: <77bb36840906300816v7564a3b1v65ed40329f6795b5@mail.gmail.com> Hi all, The twitter tag and the identica tag has been added. check it out.. -R On Tue, Jun 30, 2009 at 12:45 PM, vid wrote: > On Tue, Jun 30, 2009 at 11:27, vid wrote: > > > > how about identica? - http://identi.ca/doc/faq > > i just created http://identi.ca/pyconindia/all, and will hand it over > > to anyone interested in maintaining it. please volunteer on the list > > before june03. > ^^^^^^^^^^^^ > correction : july03 :) > > > -- > thanks > || vid || http://www.svaksha.com || > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- I blog at http://ranganaths.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ckponnappa at gmail.com Tue Jun 30 22:40:56 2009 From: ckponnappa at gmail.com (C. K. Ponnappa) Date: Wed, 01 Jul 2009 02:10:56 +0530 Subject: [BangPypers] [ANN] CC.rb 1.4.0 released Message-ID: <4A4A7858.8050802@gmail.com> Folks, we've just released CC.rb 1.4.0 with support for git, hg and bzr. As always, CC.rb is easy to install, pleasant to use and simple to hack. You can use it to continuously integrate a codebase in any language, not just Ruby. Live examples? http://ci.rubyonrails.org http://cruisecontrolrb.thoughtworks.com/projects http://ci.pivotallabs.com Get it off Github: http://github.com/thoughtworks/cruisecontrol.rb CC.rb is released under the Apache 2.0 licence. Best, Sidu. http://blog.sidu.in