From vishnuprasadgaddam at gmail.com Tue Nov 1 05:05:28 2011 From: vishnuprasadgaddam at gmail.com (vishnu prasad) Date: Tue, 1 Nov 2011 09:35:28 +0530 Subject: [BangPypers] BangPypers Digest, Vol 50, Issue 26 In-Reply-To: References: Message-ID: Wen and where the free ticket available for python hackers fest ? to whom should i need to contact please update From kracethekingmaker at gmail.com Tue Nov 1 09:20:22 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Tue, 1 Nov 2011 13:50:22 +0530 Subject: [BangPypers] BangPypers Digest, Vol 50, Issue 26 In-Reply-To: References: Message-ID: On Tue, Nov 1, 2011 at 9:35 AM, vishnu prasad wrote: > Wen and where the free ticket available for python hackers fest ? > When is python hackers fest ? > > to whom should i need to contact please update > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From asif.jamadar at rezayat.net Tue Nov 1 09:36:56 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 1 Nov 2011 08:36:56 +0000 Subject: [BangPypers] Dynamic choices for django modelformset In-Reply-To: References: Message-ID: Any suggestions for this question? -----Original Message----- From: bangpypers-bounces+asif.jamadar=rezayat.net at python.org [mailto:bangpypers-bounces+asif.jamadar=rezayat.net at python.org] On Behalf Of Asif Jamadar Sent: Thursday, October 27, 2011 11:33 AM To: BangPypers at python.org Subject: [BangPypers] Dynamic choices for django modelformset How can I add dynamic choices for model formset? Suppose I have model called TestModel Class TestModel(models.Model) dropdown_field = models.CharField(max_length=70, blank=True, null=True, choices=' What to write here because my choices are dynamic') And from this model I want to generate modelformset of 8 forms. So I will generate 8 dropdownfields, those will have different choices. I tried overriding the init method of BaseModelFormset and I generated dynamic choices. But when I'm trying to submit these 8 forms I'm getting validation error that "choices are not valid" because my model doesn't know about these choices. So can I define choices for model? _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From asif.jamadar at rezayat.net Tue Nov 1 09:43:11 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 1 Nov 2011 08:43:11 +0000 Subject: [BangPypers] Calling Python from JavaScript Message-ID: Is there a simple way to call Python libraries from JavaScript? I have created python (.py) file which consist of some function, now I need to call those functions inside my JavaScript code. How can I achieve this? Regards Asif From senthil at uthcode.com Tue Nov 1 13:49:26 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Tue, 1 Nov 2011 20:49:26 +0800 Subject: [BangPypers] Calling Python from JavaScript In-Reply-To: References: Message-ID: <20111101124926.GA1970@mathmagic> Hello Asif, On Tue, Nov 01, 2011 at 08:43:11AM +0000, Asif Jamadar wrote: > Is there a simple way to call Python libraries from JavaScript? > What do you ultimately intend to do with this requirement? You can do a HTTP Ajax request via javascript and then your server could delegate it to python controller. Is it such a requirement or you have some other thing in your mind? -- Senthil From gopalakrishnan.subramani at gmail.com Wed Nov 2 04:17:55 2011 From: gopalakrishnan.subramani at gmail.com (Gopalakrishnan Subramani) Date: Wed, 2 Nov 2011 08:47:55 +0530 Subject: [BangPypers] Python OCR Reader In-Reply-To: <20111031165756.GD1953@mathmagic> References: <20111031165756.GD1953@mathmagic> Message-ID: Well, I would not touch any core implementation of tesseract client or the core binaries of tesseract. I am trying to build a simple voice based advisory system for a simple Window game for my 19 month old daughter. It has to read the basic letters in a small game and where I put my voice for her to listen and direct her based on screen scenario. I need to screen capture to read the text where I need OCR. I was thinking of building build the same stuff on pygame. But later decided to get into harder path, since it would help me to familiar with imaging, video, audio libraries in Python. I did small experiments with tesseract. But not sure whether it is the best library in python world for most of my cases. Thanks, Gopal On Mon, Oct 31, 2011 at 10:27 PM, Senthil Kumaran wrote: > On Mon, Oct 31, 2011 at 11:30:21AM +0530, Gopalakrishnan Subramani wrote: > > Anyone can give good advises on OCR tools in Python? Not necessarily > native > > python tools even with python wrapper will be good. I would never tweak > or > > change the source code or learn deep into OCR technology. I just want a > lib > > sort of things and Python wrapper to know. > > > > I found http://code.google.com/p/pytesser/ and playing a little. But not > > sure how good it is. > > What is your purpose of using a tesseract client? Would you be > extending it? The tesseract-ocr project (and it's binaries) is pretty > well maintained and it works well on windows. I assume the python > client to be good too. > > -- > Senthil > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From jaganadhg at gmail.com Wed Nov 2 05:16:03 2011 From: jaganadhg at gmail.com (JAGANADH G) Date: Wed, 2 Nov 2011 09:46:03 +0530 Subject: [BangPypers] Python OCR Reader In-Reply-To: References: <20111031165756.GD1953@mathmagic> Message-ID: On Wed, Nov 2, 2011 at 8:47 AM, Gopalakrishnan Subramani < gopalakrishnan.subramani at gmail.com> wrote: > Well, I would not touch any core implementation of tesseract client or the > core binaries of tesseract. > I am trying to build a simple voice based advisory system for a simple > Window game for my 19 month old daughter. > It has to read the basic letters in a small game and where I put my voice > for her to listen and direct her based on screen scenario. > For such kind of things I think Sikuli [http://sikuli.org/] will be more useful than tesseract. It provides a Jython interface . In the sample pages I saw that somebody automated "Angry Birds" game too. Note: Sikuli is not a Python based tool. Just provides a Jython interface . Sorry for posting a non-pythonic suggestion -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog *ILUGCBE* http://ilugcbe.psgkriya.org From senthil at uthcode.com Wed Nov 2 05:32:09 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 2 Nov 2011 12:32:09 +0800 Subject: [BangPypers] Python OCR Reader In-Reply-To: References: <20111031165756.GD1953@mathmagic> Message-ID: On Wed, Nov 2, 2011 at 11:17 AM, Gopalakrishnan Subramani wrote: > I am trying to build a simple ? voice based advisory system for a simple > Window game for my 19 month old daughter. Wow!. Sounds like an exciting project. > It has to read the basic letters in a small game and where I put my voice > for her to listen and direct her based on screen scenario. I am sorry, I fail to get where the hand written text or need for OCR comes in here. If you are developing the game you are having the total control of the text input. > I did small experiments with tesseract. But not sure whether it is the best > library in python world for most of my cases. AFAIK, yes. tesseract is the same engine used for book scanning in google books and python apis would be using the same engine. --- Senthil From gopalakrishnan.subramani at gmail.com Wed Nov 2 08:13:26 2011 From: gopalakrishnan.subramani at gmail.com (Gopalakrishnan Subramani) Date: Wed, 2 Nov 2011 12:43:26 +0530 Subject: [BangPypers] Python OCR Reader In-Reply-To: References: <20111031165756.GD1953@mathmagic> Message-ID: I came across sikuli few days back since they are using Open Computer vision Library for GUI recognition. Jython is OK for my old 256 MB laptop. I would spend sometime play around sikuli. Seems like google also using them. On Wed, Nov 2, 2011 at 9:46 AM, JAGANADH G wrote: > On Wed, Nov 2, 2011 at 8:47 AM, Gopalakrishnan Subramani < > gopalakrishnan.subramani at gmail.com> wrote: > > > Well, I would not touch any core implementation of tesseract client or > the > > core binaries of tesseract. > > I am trying to build a simple voice based advisory system for a simple > > Window game for my 19 month old daughter. > > It has to read the basic letters in a small game and where I put my voice > > for her to listen and direct her based on screen scenario. > > > > For such kind of things I think Sikuli [http://sikuli.org/] will be more > useful than tesseract. > It provides a Jython interface . In the sample pages I saw that somebody > automated "Angry Birds" game too. > > Note: Sikuli is not a Python based tool. Just provides a Jython interface . > > Sorry for posting a non-pythonic suggestion > > -- > ********************************** > JAGANADH G > http://jaganadhg.freeflux.net/blog > *ILUGCBE* > http://ilugcbe.psgkriya.org > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From asif.jamadar at rezayat.net Wed Nov 2 10:08:58 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Wed, 2 Nov 2011 09:08:58 +0000 Subject: [BangPypers] Calling Python from JavaScript In-Reply-To: <20111101124926.GA1970@mathmagic> References: <20111101124926.GA1970@mathmagic> Message-ID: Can you provide me example for this? -----Original Message----- From: bangpypers-bounces+asif.jamadar=rezayat.net at python.org [mailto:bangpypers-bounces+asif.jamadar=rezayat.net at python.org] On Behalf Of Senthil Kumaran Sent: Tuesday, November 01, 2011 3:49 PM To: Bangalore Python Users Group - India Subject: Re: [BangPypers] Calling Python from JavaScript Hello Asif, On Tue, Nov 01, 2011 at 08:43:11AM +0000, Asif Jamadar wrote: > Is there a simple way to call Python libraries from JavaScript? > What do you ultimately intend to do with this requirement? You can do a HTTP Ajax request via javascript and then your server could delegate it to python controller. Is it such a requirement or you have some other thing in your mind? -- Senthil _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From asif.jamadar at rezayat.net Wed Nov 2 10:26:25 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Wed, 2 Nov 2011 09:26:25 +0000 Subject: [BangPypers] Calling Python from JavaScript In-Reply-To: <20111101124926.GA1970@mathmagic> References: <20111101124926.GA1970@mathmagic> Message-ID: Sorry for my bad English, I will explain what i'm trying to achieve, I'm using Dajaxice with Django. I created modelformset which consist of multiple forms. Each form has dropdown field on which I'm calling dajaxice function, that function will takes the value of the dropdown field and calls another python function which calculates the total sum of all the values of dropdown fields. Here my formset has initial values. So I want to call that python function (which calculates result ) in javascript code (This javascript function is for dajaxice ) Regards Asif From saager.mhatre at gmail.com Wed Nov 2 16:25:47 2011 From: saager.mhatre at gmail.com (dexterous) Date: Wed, 2 Nov 2011 08:25:47 -0700 (PDT) Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: <87r51tkz02.fsf@sanitarium.localdomain> References: <87r51tkz02.fsf@sanitarium.localdomain> Message-ID: <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> On Monday, October 31, 2011 8:08:05 PM UTC+5:30, Noufal Ibrahim wrote: > > I would recommend that she join a startup or a small company and get > some real work experience before jumping into this. > I'd go so far as to suggest that they join a mid-to-large sized company and spend the first couple of years maintaining somebody else's crap code. It's one hell of a learning experience. - d From kracethekingmaker at gmail.com Wed Nov 2 16:56:44 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 2 Nov 2011 21:26:44 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: I'd go so far as to suggest that they join a mid-to-large sized company and > spend the first couple of years maintaining somebody else's crap code. It's > one hell of a learning experience. > > Don't join Big companies, you're learning is not in your hand, large > companies work on diverse areas, so chance of getting into the area which > interests you is less. > I personally feel joining small or little mid size companies can help you learn much better. In larger size companies it is process oriented and easy to pass the buck. > > -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From rajeev.sebastian at gmail.com Wed Nov 2 17:07:32 2011 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Wed, 2 Nov 2011 21:37:32 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: I'm running a small company out of Technopark Trivandrum. We're always on the lookout for good people (as is everyone else). I myself have a history in development, and none in management. Never worked at a company in my career. So my question: how does one gauge aptitude in programming? In particular, when we put out a job advertisement, we get a ton of resumes from freshers. Most (if not all) do not have any significant experience, knowledge or demonstrable skills. Most fail our written test, which tests basic knowledge in programming, algorithms, etc. Their resumes are full of bullshit, and in many cases, fraudulent. Given that the fresher lacks knowledge in any given area, what kind of testing should we use? Since we do development in Python and Django, and so far no candidate has come to us with "Python" on their resume, what do you suggest we do? Regards Rajeev J Sebastian From senthil at uthcode.com Wed Nov 2 17:31:46 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 3 Nov 2011 00:31:46 +0800 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: <20111102163146.GA1979@mathmagic> On Wed, Nov 02, 2011 at 09:37:32PM +0530, Rajeev J Sebastian wrote: > > Given that the fresher lacks knowledge in any given area, what kind of > testing should we use? Since we do development in Python and Django, > and so far no candidate has come to us with "Python" on their resume, > what do you suggest we do? I can understand your situation. One possible suggestion is to pay well and hire smart students based upon their academic and project strengths and let them start new on whichever technologies you are using. -- Senthil From lorddaemon at gmail.com Wed Nov 2 17:33:46 2011 From: lorddaemon at gmail.com (Sidu Ponnappa) Date: Wed, 2 Nov 2011 22:03:46 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: > So my question: how does one gauge aptitude in programming? Get them to write code. One common thread for us is that we have everybody write code irrespective of experience. Half the code at home, and if that passes muster, we have them come into the office and pair with us on expanding their solution to complete the other half. We don't care about degrees, academic scores or designations - if they can't produce test driven, quality code, we don't pursue that candidate beyond that point. The other indicator we look for (especially when dealing with freshers) is open source contributions - a github or bitbucket account with actual code and actual contributions to open source is pretty much mandatory. We're a small, highly profitable company with no intentions of growing to 50 or 100 people, so being this selective works well for us. Finally - be the best paymaster, or at least try to get close. If you pay crap salaries, you will attract crap people. If you pay well, word gets around and the right kind of people will start talking to you. Best, Sidu. http://c42.in http://rubymonk.com On Wed, Nov 2, 2011 at 9:37 PM, Rajeev J Sebastian wrote: > I'm running a small company out of Technopark Trivandrum. We're always > on the lookout for good people (as is everyone else). I myself have a > history in development, and none in management. Never worked at a > company in my career. > > So my question: how does one gauge aptitude in programming? In > particular, when we put out a job advertisement, we get a ton of > resumes from freshers. Most (if not all) do not have any significant > experience, knowledge or demonstrable skills. Most fail our written > test, which tests basic knowledge in programming, algorithms, etc. > Their resumes are full of bullshit, and in many cases, fraudulent. > > Given that the fresher lacks knowledge in any given area, what kind of > testing should we use? Since we do development in Python and Django, > and so far no candidate has come to us with "Python" on their resume, > what do you suggest we do? > > Regards > Rajeev J Sebastian > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From saager.mhatre at gmail.com Wed Nov 2 17:47:29 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 2 Nov 2011 22:17:29 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 9:26 PM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > I'd go so far as to suggest that they join a mid-to-large sized company and > > spend the first couple of years maintaining somebody else's crap code. > It's > > one hell of a learning experience. > > > > Don't join Big companies, you're learning is not in your hand, large > > companies work on diverse areas, so chance of getting into the area which > > interests you is less. > > > > I personally feel joining small or little mid size companies can help you > learn much better. > > In larger size companies it is process oriented and easy to pass the buck. > True... to some extent. Like just about anything else, you have to choose wisely. My four years at Kanbay (now CapGemini) taught me a lot of lessons in organization, management as well as presentation. Of course, like Sidu said earlier, none of these skills can substitute good engineering chops. And that, IMHO, is a decision that must come from within. - d From kracethekingmaker at gmail.com Wed Nov 2 18:01:48 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 2 Nov 2011 22:31:48 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 10:17 PM, Saager Mhatre wrote: > On Wed, Nov 2, 2011 at 9:26 PM, kracekumar ramaraju < > kracethekingmaker at gmail.com> wrote: > > > I'd go so far as to suggest that they join a mid-to-large sized company > and > > > spend the first couple of years maintaining somebody else's crap code. > > It's > > > one hell of a learning experience. > > > > > > Don't join Big companies, you're learning is not in your hand, large > > > companies work on diverse areas, so chance of getting into the area > which > > > interests you is less. > > > > > > > I personally feel joining small or little mid size companies can help you > > learn much better. > > > > In larger size companies it is process oriented and easy to pass the > buck. > > > > True... to some extent. Like just about anything else, you have to choose > wisely. > My four years at Kanbay (now CapGemini) taught me a lot of lessons in > organization, management as well as presentation. > Well my question is how much did you learn about programming, api design, Unit testing, algo design, agility, how to distinguish good programmer from bad programmer. Sorry If i am rude :) > > Of course, like Sidu said earlier, none of these skills can substitute good > engineering chops. > And that, IMHO, is a decision that must come from within. > > -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From rajeev.sebastian at gmail.com Wed Nov 2 18:17:06 2011 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Wed, 2 Nov 2011 22:47:06 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: Thanks Sidu and Senthil for your recommendations, which were very helpful. As you suggested, the most important change we can make is to test directly with code. Do you do your tests in Python, or whatever language the fresher knows? So far, we have not received a single resume mentioning Python. As for pay, we are willing to pay in return for exceptional work. We outsource a LOT and pay well for absorbing the responsibility and risk. But we have so far been unsuccessful in finding talented people, to whom we could pay equivalent to what we outsource. Question is, how much to pay? I guess this is not really an "answerable" question. Looking around at the "sweat factories" that surround us, we pay very well. There is also the tug of "Bangalore". >From the freshers point of view though, their friends making insane salaries at MNCs always make them dissatisfied. Any recommendations? Regards Rajeev J Sebastian From kracethekingmaker at gmail.com Wed Nov 2 18:26:20 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 2 Nov 2011 22:56:20 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 10:47 PM, Rajeev J Sebastian < rajeev.sebastian at gmail.com> wrote: > > Do you do your tests in Python, or whatever language the fresher > knows? So far, we have not received a single resume mentioning Python. > I am a fresher, you won't believe I mention and promote python, though I am advanced python novice. http://github.com/kracekumar > > As for pay, we are willing to pay in return for exceptional work. We > outsource a LOT and pay well for absorbing the responsibility and > risk. But we have so far been unsuccessful in finding talented people, > to whom we could pay equivalent to what we outsource. > > Question is, how much to pay? I guess this is not really an > "answerable" question. Looking around at the "sweat factories" that > surround us, we pay very well. There is also the tug of "Bangalore". > >From the freshers point of view though, their friends making insane > salaries at MNCs always make them dissatisfied. Any recommendations? > > It depends on people. There are two type of people who behind MNC and Quality of work. People who learn python are passionate about programming, others learn java and c# to get a job. -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From lorddaemon at gmail.com Wed Nov 2 18:35:12 2011 From: lorddaemon at gmail.com (Sidu Ponnappa) Date: Wed, 2 Nov 2011 23:05:12 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: > Do you do your tests in Python, or whatever language the fresher > knows? So far, we have not received a single resume mentioning Python. Any object oriented language the candidate is comfortable with is fine by us. Unit tests are, however, mandatory. TDD is a huge plus. > Question is, how much to pay? Figure out who your competition in the hiring space is (this could be very very different from your business competitors). Find out how much they pay. Then do your best to pay more. For us, this means companies like ThoughtWorks, Amazon and co. We try to pay salaries that are close to these firms (though matching Amazon is still slightly beyond us for now). > From the freshers point of view though, their friends making insane > salaries at MNCs always make them dissatisfied. Any recommendations? Yes - pay more than the MNCs or at least get close and compensate for the delta with a brilliant work environment. Unfortunately, I have no better answer than this. Folks typically evaluate a prospective employer on salary, work environment (including how awesome prospective colleagues are, how much they can learn, and how transparent and honest the organisations is) and the work itself. There is no magic formula that allows you to hire better people while paying significantly less than your competitors, but you can usually swing it by being somewhere close on salary and doing better than them on the last two parameters. Honestly, a small company that can't trounce an MNC on work environment is doing something seriously wrong. > There is also the tug of "Bangalore". Identify why this is the case and look to plug the gaps. If the attractiveness lies in the lifestyle, then you may wish to open up a branch in Bangalore. I should warn you though that on the hiring front, things are no better here :) Best, Sidu Ponnappa. http://c42.in http://rubymonk.com On Wed, Nov 2, 2011 at 10:47 PM, Rajeev J Sebastian wrote: > Thanks Sidu and Senthil for your recommendations, which were very > helpful. As you suggested, the most important change we can make is to > test directly with code. > > Do you do your tests in Python, or whatever language the fresher > knows? So far, we have not received a single resume mentioning Python. > > As for pay, we are willing to pay in return for exceptional work. We > outsource a LOT and pay well for absorbing the responsibility and > risk. But we have so far been unsuccessful in finding talented people, > to whom we could pay equivalent to what we outsource. > > Question is, how much to pay? I guess this is not really an > "answerable" question. Looking around at the "sweat factories" that > surround us, we pay very well. There is also the tug of "Bangalore". > >From the freshers point of view though, their friends making insane > salaries at MNCs always make them dissatisfied. Any recommendations? > > Regards > Rajeev J Sebastian > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From saager.mhatre at gmail.com Wed Nov 2 18:37:43 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 2 Nov 2011 23:07:43 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 10:31 PM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > > True... to some extent. Like just about anything else, you have to choose > > wisely. > > My four years at Kanbay (now CapGemini) taught me a lot of lessons in > > organization, management as well as presentation. > > > > Well my question is how much did you learn about programming, api > design, Unit testing, algo design Don't get me wrong, I'm not discounting engineering skills; we're all on the same side there. What I was hinting at above is that if you get lucky and get good managers at a mid-to-large co, you have the opportunity to learn how organization in the large works, and that's an important skill too. That said, I should clarify, when I say, 'spend the first couple of years maintaining somebody else's crap code', I say that from personal experience. Maintaining something you didn't build teaches you a lot about the importance of building good readable, maintainable, malleable code. I know I write good code because I don't want people who end up maintaining it (myself included) to go through the agony I had to back then. That's probably one the biggest takeaways I have from back there; and that was what I was primarily pointing to. It usually turns out to be a bit of a trial by fire and you have to fight the urge to just get sh!t done. Not to mention the people around you who churn out bad code on a regular basis. But if you can battle through it, you'll have a better appreciation for these practices. I realize this is a little backwards, but then again I know it worked for me. YMMV. As for core engineering skills, programming, API design, algorithms, etc- I learned most of that on my own and guess I would have no matter where I was. But that's just me. We got a computer at home very early on, a trusty 386 way back in the early 90's and started off right then and never looked back. Arguably, Kanbay didn't really ^help^ on that front, but I did end up with a few good colleagues to bounce ideas off. But in my experience, this usually is something that has to come from within. Once you've established that the person has an innate need to better themselves there's a whole slew of resources out there at your disposal. Of course, having totally awesome programmers around you doesn't hurt (loosely translated from- helps a whole whopping bunch!) :) I'll concede the bit on testing here. I don't think I would ever have appreciated testing if it wasn't for my time at ThoughtWorks. > , agility Interestingly enough, I got my first lessons in agility from a client director at one of the projects at Kanbay. Although, we didn't call it agile or lean back then and he was quite the visionary, so I guess I got lucky again. :) how to distinguish good programmer from bad programmer. > There was a fairly simple heuristic some of us went with, a good programmer is simply someone *you* would like to learn from. I liked that so much, that I haven't really bothered to ponder that question much beyond that. Sorry If i am rude :) I promise to take offence ^only^ if you meant to be rude. ;) - d From saager.mhatre at gmail.com Wed Nov 2 18:42:21 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 2 Nov 2011 23:12:21 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 10:56 PM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > I am advanced python novice. > There's an interesting tautology I can use, and... People who learn python are passionate about programming, others learn > java and c# to get a job. ... there's a line that was uncalled for - d From kracethekingmaker at gmail.com Wed Nov 2 18:45:44 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 2 Nov 2011 23:15:44 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: > > > Don't get me wrong, I'm not discounting engineering skills; we're all on > the same side there. What I was hinting at above is that if you get lucky > and get good managers at a mid-to-large co, you have the opportunity to > learn how organization in the large works, and that's an important skill > too. > Note: You reminded me of my favorite line "People don't leave organization , they leave managers". > > That said, I should clarify, when I say, 'spend the first couple of years > maintaining somebody else's crap code', I say that from personal > experience. Maintaining something you didn't build teaches you a lot about > the importance of building good readable, maintainable, malleable code. I > know I write good code because I don't want people who end up maintaining > it (myself included) to go through the agony I had to back then. That's > probably one the biggest takeaways I have from back there; and that was > what I was primarily pointing to. > > In most support project you don't change code until there is a requirement from client, else you end up supporting the tickets etc... -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From kracethekingmaker at gmail.com Wed Nov 2 18:49:21 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 2 Nov 2011 23:19:21 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 11:12 PM, Saager Mhatre wrote: > > > > I am advanced python novice. > > > > There's an interesting tautology I can use, and... > > Make sure you don't patent or trademark :) So can i know your company name ? > > -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From saager.mhatre at gmail.com Wed Nov 2 18:52:51 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 2 Nov 2011 23:22:51 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 11:15 PM, kracekumar ramaraju < kracethekingmaker at gmail.com> wrote: > In most support project you don't change code until there is a requirement > from client, else you end up supporting the tickets etc... They're not all support (as in keep the lights on) projects, there's maintenance (as in make the lights brighter) and enhancements (as in put in more/new lights) gigs out there too. - d From saager.mhatre at gmail.com Wed Nov 2 19:03:28 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 2 Nov 2011 23:33:28 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 10:47 PM, Rajeev J Sebastian < rajeev.sebastian at gmail.com> wrote: > As you suggested, the most important change we can make is to test > directly with code. > +1 to Sidu's suggestion about having candidates write code before they come in; have used that to much success. > Do you do your tests in Python, or whatever language the fresher knows? So > far, we have not received a single resume mentioning Python. Let the candidate submit code in a language/platform of their choosing. You want to give them the opportunity to put _their best foot_ forward. That said, you should also list out languages/platforms that you prefer; these would be the ones you've worked in and can evaluate the best in. They don't necessarily have to be the primary tool you use at work every day, just a common medium to trade insights into code. - d From saager.mhatre at gmail.com Wed Nov 2 19:11:16 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 2 Nov 2011 23:41:16 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 11:33 PM, Saager Mhatre wrote: > On Wed, Nov 2, 2011 at 10:47 PM, Rajeev J Sebastian < > rajeev.sebastian at gmail.com> wrote: > >> As you suggested, the most important change we can make is to test >> directly with code. >> > > +1 to Sidu's suggestion about having candidates write code before they > come in; have used that to much success. > Almost forgot about this- while we're talking about code submissions I'd like to plug reliscore.com It's like a market place for organizations to put up code assignments and candidates/students to solve them and submit answers back. Our own Navin Kabra is deeply involved with this initiative. - d From rajeev.sebastian at gmail.com Wed Nov 2 22:01:45 2011 From: rajeev.sebastian at gmail.com (Rajeev J Sebastian) Date: Thu, 3 Nov 2011 02:31:45 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: On Wed, Nov 2, 2011 at 11:05 PM, Sidu Ponnappa wrote: >> Do you do your tests in Python, or whatever language the fresher >> knows? So far, we have not received a single resume mentioning Python. > Any object oriented language the candidate is comfortable with is fine > by us. Unit tests are, however, mandatory. TDD is a huge plus. > >> Question is, how much to pay? > Figure out who your competition in the hiring space is (this could be > very very different from your business competitors). Find out how much > they pay. Then do your best to pay more. For us, this means companies > like ThoughtWorks, Amazon and co. We try to pay salaries that are > close to these firms (though matching Amazon is still slightly beyond > us for now). > >> From the freshers point of view though, their friends making insane >> salaries at MNCs always make them dissatisfied. Any recommendations? > Yes - pay more than the MNCs or at least get close and compensate for > the delta with a brilliant work environment. Unfortunately, I have no > better answer than this. Folks typically evaluate a prospective > employer on salary, work environment (including how awesome > prospective colleagues are, how much they can learn, and how > transparent and honest the organisations is) and the work itself. > > There is no magic formula that allows you to hire better people while > paying significantly less than your competitors, but you can usually > swing it by being somewhere close on salary and doing better than them > on the last two parameters. Honestly, a small company that can't > trounce an MNC on work environment is doing something seriously wrong. We have a rather good work environment. But trying to convince freshers of this is close to impossible, as they have inflated ideas about what the IT industry is really like. > >> There is also the tug of "Bangalore". > Identify why this is the case and look to plug the gaps. If the > attractiveness lies in the lifestyle, then you may wish to open up a > branch in Bangalore. I should warn you though that on the hiring > front, things are no better here :) Thanks Sidu. All of this is really good advice. Regards Rajeev J Sebastian From lorddaemon at gmail.com Thu Nov 3 11:58:19 2011 From: lorddaemon at gmail.com (Sidu Ponnappa) Date: Thu, 3 Nov 2011 16:28:19 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> Message-ID: > We have a rather good work environment. But trying to convince > freshers of this is close to impossible, as they have inflated ideas > about what the IT industry is really like. This is one of the reasons we only hire proven hackers from among freshers - they already value things we do to. Otherwise, we prefer folks that have spent a year or two in Big IT and are tired of the politics, back biting and overhead associated with it. As importantly, they no longer find a big campus with 10k people on it such a cool idea after having been stuck in one (and having spent a couple of hours a day travelling to get there). TL;DR - you may actually want to target folks around you at the IT park rather than freshers. They'll be more amenable to what you're pitching to them. On Thu, Nov 3, 2011 at 2:31 AM, Rajeev J Sebastian wrote: > On Wed, Nov 2, 2011 at 11:05 PM, Sidu Ponnappa wrote: >>> Do you do your tests in Python, or whatever language the fresher >>> knows? So far, we have not received a single resume mentioning Python. >> Any object oriented language the candidate is comfortable with is fine >> by us. Unit tests are, however, mandatory. TDD is a huge plus. >> >>> Question is, how much to pay? >> Figure out who your competition in the hiring space is (this could be >> very very different from your business competitors). Find out how much >> they pay. Then do your best to pay more. For us, this means companies >> like ThoughtWorks, Amazon and co. We try to pay salaries that are >> close to these firms (though matching Amazon is still slightly beyond >> us for now). >> >>> From the freshers point of view though, their friends making insane >>> salaries at MNCs always make them dissatisfied. Any recommendations? >> Yes - pay more than the MNCs or at least get close and compensate for >> the delta with a brilliant work environment. Unfortunately, I have no >> better answer than this. Folks typically evaluate a prospective >> employer on salary, work environment (including how awesome >> prospective colleagues are, how much they can learn, and how >> transparent and honest the organisations is) and the work itself. >> >> There is no magic formula that allows you to hire better people while >> paying significantly less than your competitors, but you can usually >> swing it by being somewhere close on salary and doing better than them >> on the last two parameters. Honestly, a small company that can't >> trounce an MNC on work environment is doing something seriously wrong. > > We have a rather good work environment. But trying to convince > freshers of this is close to impossible, as they have inflated ideas > about what the IT industry is really like. > >> >>> There is also the tug of "Bangalore". >> Identify why this is the case and look to plug the gaps. If the >> attractiveness lies in the lifestyle, then you may wish to open up a >> branch in Bangalore. I should warn you though that on the hiring >> front, things are no better here :) > > Thanks Sidu. All of this is really good advice. > > Regards > Rajeev J Sebastian > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From pooja.voladoddi at gmail.com Thu Nov 3 13:17:26 2011 From: pooja.voladoddi at gmail.com (pooja voladoddi) Date: Thu, 3 Nov 2011 17:47:26 +0530 Subject: [BangPypers] BangPypers Digest, Vol 51, Issue 7 In-Reply-To: References: Message-ID: Guys, I'm new to the group.subscribed after a couple of people pointed towards you guys on twitter...here's the thing: I need guidance to properly understand python -i like coding but have minimalistic knowledge of any particular language.have only studied c/c++ at college level and not in depth.so, any pointers for a starter from the passionate here? On 3 Nov 2011 16:30, wrote: > Send BangPypers mailing list submissions to > bangpypers at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-request at python.org > > You can reach the person managing the list at > bangpypers-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. Re: [chennaipy 1126] [XPost][Slightly OT] Could you share > your experiences about Python Freelance programming, from a > programmer's perspective (Sidu Ponnappa) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 3 Nov 2011 16:28:19 +0530 > From: Sidu Ponnappa > To: Bangalore Python Users Group - India > Subject: Re: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could > you share your experiences about Python Freelance programming, from > a > programmer's perspective > Message-ID: > > > Content-Type: text/plain; charset=ISO-8859-1 > > > We have a rather good work environment. But trying to convince > > freshers of this is close to impossible, as they have inflated ideas > > about what the IT industry is really like. > This is one of the reasons we only hire proven hackers from among > freshers - they already value things we do to. > > Otherwise, we prefer folks that have spent a year or two in Big IT and > are tired of the politics, back biting and overhead associated with > it. As importantly, they no longer find a big campus with 10k people > on it such a cool idea after having been stuck in one (and having > spent a couple of hours a day travelling to get there). > > TL;DR - you may actually want to target folks around you at the IT > park rather than freshers. They'll be more amenable to what you're > pitching to them. > > On Thu, Nov 3, 2011 at 2:31 AM, Rajeev J Sebastian > wrote: > > On Wed, Nov 2, 2011 at 11:05 PM, Sidu Ponnappa > wrote: > >>> Do you do your tests in Python, or whatever language the fresher > >>> knows? So far, we have not received a single resume mentioning Python. > >> Any object oriented language the candidate is comfortable with is fine > >> by us. Unit tests are, however, mandatory. TDD is a huge plus. > >> > >>> Question is, how much to pay? > >> Figure out who your competition in the hiring space is (this could be > >> very very different from your business competitors). Find out how much > >> they pay. Then do your best to pay more. For us, this means companies > >> like ThoughtWorks, Amazon and co. We try to pay salaries that are > >> close to these firms (though matching Amazon is still slightly beyond > >> us for now). > >> > >>> From the freshers point of view though, their friends making insane > >>> salaries at MNCs always make them dissatisfied. Any recommendations? > >> Yes - pay more than the MNCs or at least get close and compensate for > >> the delta with a brilliant work environment. Unfortunately, I have no > >> better answer than this. Folks typically evaluate a prospective > >> employer on salary, work environment (including how awesome > >> prospective colleagues are, how much they can learn, and how > >> transparent and honest the organisations is) and the work itself. > >> > >> There is no magic formula that allows you to hire better people while > >> paying significantly less than your competitors, but you can usually > >> swing it by being somewhere close on salary and doing better than them > >> on the last two parameters. Honestly, a small company that can't > >> trounce an MNC on work environment is doing something seriously wrong. > > > > We have a rather good work environment. But trying to convince > > freshers of this is close to impossible, as they have inflated ideas > > about what the IT industry is really like. > > > >> > >>> There is also the tug of "Bangalore". > >> Identify why this is the case and look to plug the gaps. If the > >> attractiveness lies in the lifestyle, then you may wish to open up a > >> branch in Bangalore. I should warn you though that on the hiring > >> front, things are no better here :) > > > > Thanks Sidu. All of this is really good advice. > > > > Regards > > Rajeev J Sebastian > > _______________________________________________ > > 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 > > > End of BangPypers Digest, Vol 51, Issue 7 > ***************************************** > From sreddy at amphorainc.com Thu Nov 3 13:30:20 2011 From: sreddy at amphorainc.com (Srinivas Reddy Thatipathy) Date: Thu, 3 Nov 2011 05:30:20 -0700 Subject: [BangPypers] BangPypers Digest, Vol 51, Issue 7 In-Reply-To: References: Message-ID: >>Guys, I'm new to the group.subscribed after a couple of people pointed towards you guys on twitter...here's the thing: I need guidance to properly understand python -i like coding but have minimalistic knowledge of any particular language.have only studied c/c++ at college level and not in depth.so, any pointers for a starter from the passionate here? The best way to learn python for a beginner is open up your python command line ,type programs there. Once you install python, open the python installation folder ,there you see docs folder which contains Chm Documentation for the python. Otherwise ,buy Mark Lutz's learning python book. You can also try python on the web here . http://repl.it Confidentiality Notice: This e-mail and accompanying documents contain confidential information intended for a specific individual and purpose. This e-mailed information is private and protected by law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, or distribution, or the taking of any action based on the contents of this information, is strictly prohibited. From lorddaemon at gmail.com Thu Nov 3 15:38:13 2011 From: lorddaemon at gmail.com (Sidu Ponnappa) Date: Thu, 3 Nov 2011 20:08:13 +0530 Subject: [BangPypers] BangPypers Digest, Vol 51, Issue 7 In-Reply-To: References: Message-ID: http://learncodethehardway.org/ HTH, Sidu. http://c42.in http://rubymonk.com On Thu, Nov 3, 2011 at 5:47 PM, pooja voladoddi wrote: > Guys, I'm new to the group.subscribed after a couple of people pointed > towards you guys on twitter...here's the thing: I need guidance to properly > understand python -i like coding but have minimalistic knowledge of any > particular language.have only studied c/c++ at college level and not in > depth.so, any pointers for a starter from the passionate here? > On 3 Nov 2011 16:30, wrote: > >> Send BangPypers mailing list submissions to >> ? ? ? ?bangpypers at python.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> ? ? ? ?http://mail.python.org/mailman/listinfo/bangpypers >> or, via email, send a message with subject or body 'help' to >> ? ? ? ?bangpypers-request at python.org >> >> You can reach the person managing the list at >> ? ? ? ?bangpypers-owner at python.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of BangPypers digest..." >> >> >> Today's Topics: >> >> ? 1. Re: [chennaipy 1126] [XPost][Slightly OT] Could you share >> ? ? ?your experiences about Python Freelance programming, from a >> ? ? ?programmer's perspective (Sidu Ponnappa) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 3 Nov 2011 16:28:19 +0530 >> From: Sidu Ponnappa >> To: Bangalore Python Users Group - India >> Subject: Re: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could >> ? ? ? ?you share your experiences about Python Freelance programming, from >> a >> ? ? ? ?programmer's perspective >> Message-ID: >> ? ? ? ?> > >> Content-Type: text/plain; charset=ISO-8859-1 >> >> > We have a rather good work environment. But trying to convince >> > freshers of this is close to impossible, as they have inflated ideas >> > about what the IT industry is really like. >> This is one of the reasons we only hire proven hackers from among >> freshers - they already value things we do to. >> >> Otherwise, we prefer folks that have spent a year or two in Big IT and >> are tired of the politics, back biting and overhead associated with >> it. As importantly, they no longer find a big campus with 10k people >> on it such a cool idea after having been stuck in one (and having >> spent a couple of hours a day travelling to get there). >> >> TL;DR - you may actually want to target folks around you at the IT >> park rather than freshers. They'll be more amenable to what you're >> pitching to them. >> >> On Thu, Nov 3, 2011 at 2:31 AM, Rajeev J Sebastian >> wrote: >> > On Wed, Nov 2, 2011 at 11:05 PM, Sidu Ponnappa >> wrote: >> >>> Do you do your tests in Python, or whatever language the fresher >> >>> knows? So far, we have not received a single resume mentioning Python. >> >> Any object oriented language the candidate is comfortable with is fine >> >> by us. Unit tests are, however, mandatory. TDD is a huge plus. >> >> >> >>> Question is, how much to pay? >> >> Figure out who your competition in the hiring space is (this could be >> >> very very different from your business competitors). Find out how much >> >> they pay. Then do your best to pay more. For us, this means companies >> >> like ThoughtWorks, Amazon and co. We try to pay salaries that are >> >> close to these firms (though matching Amazon is still slightly beyond >> >> us for now). >> >> >> >>> From the freshers point of view though, their friends making insane >> >>> salaries at MNCs always make them dissatisfied. Any recommendations? >> >> Yes - pay more than the MNCs or at least get close and compensate for >> >> the delta with a brilliant work environment. Unfortunately, I have no >> >> better answer than this. Folks typically evaluate a prospective >> >> employer on salary, work environment (including how awesome >> >> prospective colleagues are, how much they can learn, and how >> >> transparent and honest the organisations is) and the work itself. >> >> >> >> There is no magic formula that allows you to hire better people while >> >> paying significantly less than your competitors, but you can usually >> >> swing it by being somewhere close on salary and doing better than them >> >> on the last two parameters. Honestly, a small company that can't >> >> trounce an MNC on work environment is doing something seriously wrong. >> > >> > We have a rather good work environment. But trying to convince >> > freshers of this is close to impossible, as they have inflated ideas >> > about what the IT industry is really like. >> > >> >> >> >>> There is also the tug of "Bangalore". >> >> Identify why this is the case and look to plug the gaps. If the >> >> attractiveness lies in the lifestyle, then you may wish to open up a >> >> branch in Bangalore. I should warn you though that on the hiring >> >> front, things are no better here :) >> > >> > Thanks Sidu. All of this is really good advice. >> > >> > Regards >> > Rajeev J Sebastian >> > _______________________________________________ >> > 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 >> >> >> End of BangPypers Digest, Vol 51, Issue 7 >> ***************************************** >> > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From noufal at gmail.com Thu Nov 3 18:39:28 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 03 Nov 2011 23:09:28 +0530 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you share your experiences about Python Freelance programming, from a programmer's perspective In-Reply-To: <20111102163146.GA1979@mathmagic> (Senthil Kumaran's message of "Thu, 3 Nov 2011 00:31:46 +0800") References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> <20111102163146.GA1979@mathmagic> Message-ID: <87vcr1nm0f.fsf@sanitarium.localdomain> Senthil Kumaran writes: [...] > I can understand your situation. One possible suggestion is to pay > well and hire smart students based upon their academic and project > strengths and let them start new on whichever technologies you are > using. The problem is that most academic and offical projects are easy to manipulate. I've met a large number of freshers with outstanding academic credentials (IIT etc.) who couldn't code themselves out of a paper bag. I've also met a lot of people from 3rd rate colleges with mediocre credentials who were unbelievably awesome. YMMV but I don't consider them reliable. My favourite metrics to judge real ability are (in decreasing order of usefulness). 1. Open source work. It's a good metric of what they've been doing and how long they've been doing it. It's also a good metric of team work and other such non technical things. It's also something with history which they can't create in a week just to impress you. 2. Personal knowledge. If you've met the prospective employee at an event which attracts good programmers, chances that they are one are higher. Word of mouth or recommendations from someone you trust work well too. 3. Programming problem. Give them a *hard* programming problem to crack on their own time. Give them a week or so and ask them to send you their solution. This should weed some people out. 4. General interests. This is not necessarily accurate but I've generally found a good correlation. If the prospective candidate has a wider range of interests, is well read and not just someone who can write some programs, I've generally found that they're better to work with. -- ~noufal http://nibrahim.net.in This report is filled with omissions. From shashidhar85 at gmail.com Fri Nov 4 07:29:05 2011 From: shashidhar85 at gmail.com (Shashidhar Paragonda) Date: Fri, 4 Nov 2011 11:59:05 +0530 Subject: [BangPypers] remove svn checkout folder In-Reply-To: References: Message-ID: Hello Nitin Kumar, Your solution works fine thank you. On Sun, Oct 23, 2011 at 11:50 PM, Nitin Kumar wrote: > There are .svn hidden files which create this error. > > Your need to use: > shutil.rmtree(path,ignore_errors=True) > > Thanks > Nitin K > > On Fri, Oct 21, 2011 at 12:37 PM, Shashidhar Paragonda < > shashidhar85 at gmail.com> wrote: > > > Dear Python hackers > > > > >> I checkout folder from repository to sat > c:/MY/Application/TEMP > > folder (TEMP folder i create) > > >> I read a file from destination folder and perform some task > and > > close it > > >> Now after performing task I need to delete entire checkout > > folder from TEMP > > >> I tried first changing the mod of respective folder using > > *os.chmod(path/to/folder, > > 0666) > > >>* Then i tried *shutil.rmtree(path/to/folder/) but here I am > > facing permission denied error > > > > code : os.chmod(path/to/folder, 0777) > > if os.access(path/to/folder, os.R_OK): > > shutil.rmtree(path/to/folder/) > > is there any problem in this code or which is best solution for > the > > above requirement. > > * > > Thank you for help in advance. > > > > -- > > ----------------------------------- > > Regards, > > > > Shashidhar N.Paragonda > > shashidhar85 at gmail.com > > +919449073835 > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > Nitin K > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidhar85 at gmail.com +919449073835 From shashidhar85 at gmail.com Fri Nov 4 07:30:33 2011 From: shashidhar85 at gmail.com (Shashidhar Paragonda) Date: Fri, 4 Nov 2011 12:00:33 +0530 Subject: [BangPypers] remove svn checkout folder In-Reply-To: References: Message-ID: Hello Sateesh Kumar, Thanks for informative links I learned new things and now problem is solved!. On Fri, Oct 28, 2011 at 10:05 AM, Sateesh Kumar wrote: > On Fri, Oct 21, 2011 at 12:37 PM, Shashidhar Paragonda < > shashidhar85 at gmail.com> wrote: > > * Then i tried *shutil.rmtree(path/to/folder/) but here I am > > facing permission denied error > > > > code : os.chmod(path/to/folder, 0777) > > if os.access(path/to/folder, os.R_OK): > > shutil.rmtree(path/to/folder/) > > is there any problem in this code or which is best solution for > the > > above requirement. > > > > What you are doing is changing the permission of the folder, but if > there are files inside that folder which have the 'Read-Only' > attribute set then their removal would fail and an exception > thrown. If you examine the stack trace you can find the file whose > removal attempt failed. > > shutil.rmtree can take a function as a callback and you can make use > of that feature to handle failures in file/subfolder removal and to remove > them. Such an approach is explained here: > > > http://stackoverflow.com/questions/1213706/what-user-do-python-scripts-run-as-in-windows > > http://stackoverflow.com/questions/2656322/python-shutil-rmtree-fails-on-windows-with-access-is-denied > > Also when you are passing windows path as an argument to Python > functions it is better to pass them as raw strings[1]. Your invocation > should be > in the form: > > os.listdir(r'c:\temp') > and so on. > > HTH, > sateesh > > 1. http://docs.python.org/tutorial/introduction.html (Section 3.1.2 > Strings) > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidhar85 at gmail.com +919449073835 From senthil at uthcode.com Sat Nov 5 06:31:33 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Sat, 5 Nov 2011 13:31:33 +0800 Subject: [BangPypers] [chennaipy 1126] [XPost][Slightly OT] Could you In-Reply-To: <87vcr1nm0f.fsf@sanitarium.localdomain> References: <87r51tkz02.fsf@sanitarium.localdomain> <12724682.1788.1320247547331.JavaMail.geo-discussion-forums@prgt40> <20111102163146.GA1979@mathmagic> <87vcr1nm0f.fsf@sanitarium.localdomain> Message-ID: <20111105053133.GA7166@mathmagic> On Thu, Nov 03, 2011 at 11:09:28PM +0530, Noufal Ibrahim wrote: > My favourite metrics to judge real ability are (in decreasing order of > usefulness). I agree with all. Those are indeed good indicators of developers. When looking for freshers to hire for working Python, I indicated that just don't think for Python in resume. I think, It is irrelevant. -- Senthil From kracethekingmaker at gmail.com Sun Nov 6 07:29:18 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Sun, 6 Nov 2011 11:59:18 +0530 Subject: [BangPypers] scanf replacement in python Message-ID: Hello The question might be simple, but it has a trick. * * *c code* *scanf("%d, %d", &m,&n)* The code can accept two nos separated by a space. *Question*: What is the equivalent in python? *Answer 1:* *a, b = int(raw_input('no 1: ')), int(raw_input('no 2: '))* *Shortcoming*: I need press return to get o/p of second no. *Answer 2:* a = raw_input("no; ") #Enter two nos separated by space a = a.split() *Shortcoming*: it involves split function. Is there any better way to approach the same problem. -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From dhananjay.nene at gmail.com Mon Nov 7 00:41:47 2011 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Mon, 7 Nov 2011 05:11:47 +0530 Subject: [BangPypers] Generate Dynamic lists In-Reply-To: References: Message-ID: On Fri, Oct 21, 2011 at 12:10 AM, Asif Jamadar wrote: > So I'm trying to generate dynamic choices for django form. Here i'm usig > formset concept (CODE is mentioned below) > > > > Suppose i have list called criteria_list = ['education', 'know how', > 'managerial', 'interpersonal', ] > > > > now i need to generate choices as follows > > > > list1 = [('education', 1), ('education', 2), ('education', 3), > (''education' , 4) , ('know how', 1) ('know ho', 2), ('know ho', 3), ('know > ho', 4)] > > > > list2 = [('education', 1), ('education', 2), ('education', 3), > (''education' , 4) , ('managerial', 1) ('managerial', 2), ('managerial', > 3), ('managerial', 4)] > > > > list3 = [('education', 1), ('education', 2), ('education', 3), > (''education' , 4) , ('interpersonal', 1) ('interpersonal', 2), > ('interpersonal', 3), ('interpersonal', 4)] > > > > list4 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' , > 4) , ('managerial', 1) ('managerial', 2), ('managerial', 3), ('managerial', > 4)] > > > > list5 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' , > 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), > ('interpersonal', 4)] > > > > list6= [('managerial', 1), ('managerial', 2), ('managerial ', 3), > ('managerial' , 4) , ('interpersonal', 1) ('interpersonal', 2), > ('interpersonal', 3), ('interpersonal', 4)] > > > > > > How can i achive this in python? > > You could just create a list of lists using either of the following approaches import itertools as it criteria_list = ['education', 'know how', 'managerial', 'interpersonal', ] pairs = list((first,second) for (first,second) in (it.combinations(criteria_list,2))) lists = list(list((elem,r+1) for elem in pair for r in range(4)) for pair in pairs) print lists lists2 = map(lambda (x,y): map(lambda (r,v): (v,r+1), it.chain(enumerate(it.repeat(x,4)),enumerate(it.repeat(y,4)))), it.combinations(criteria_list,2)) print lists2 From dhananjay.nene at gmail.com Mon Nov 7 00:47:44 2011 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Mon, 7 Nov 2011 05:17:44 +0530 Subject: [BangPypers] Generate Dynamic lists In-Reply-To: References: Message-ID: On Mon, Nov 7, 2011 at 5:11 AM, Dhananjay Nene wrote: > > > On Fri, Oct 21, 2011 at 12:10 AM, Asif Jamadar wrote: > >> So I'm trying to generate dynamic choices for django form. Here i'm usig >> formset concept (CODE is mentioned below) >> >> >> >> Suppose i have list called criteria_list = ['education', 'know how', >> 'managerial', 'interpersonal', ] >> >> >> >> now i need to generate choices as follows >> >> >> >> list1 = [('education', 1), ('education', 2), ('education', 3), >> (''education' , 4) , ('know how', 1) ('know ho', 2), ('know ho', 3), ('know >> ho', 4)] >> >> >> >> list2 = [('education', 1), ('education', 2), ('education', 3), >> (''education' , 4) , ('managerial', 1) ('managerial', 2), ('managerial', >> 3), ('managerial', 4)] >> >> >> >> list3 = [('education', 1), ('education', 2), ('education', 3), >> (''education' , 4) , ('interpersonal', 1) ('interpersonal', 2), >> ('interpersonal', 3), ('interpersonal', 4)] >> >> >> >> list4 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' >> , 4) , ('managerial', 1) ('managerial', 2), ('managerial', 3), >> ('managerial', 4)] >> >> >> >> list5 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' >> , 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), >> ('interpersonal', 4)] >> >> >> >> list6= [('managerial', 1), ('managerial', 2), ('managerial ', 3), >> ('managerial' , 4) , ('interpersonal', 1) ('interpersonal', 2), >> ('interpersonal', 3), ('interpersonal', 4)] >> >> >> >> >> >> How can i achive this in python? >> >> You could just create a list of lists using either of the following > approaches > > import itertools as it > > > criteria_list = ['education', 'know how', 'managerial', 'interpersonal', ] > > pairs = list((first,second) for (first,second) in > (it.combinations(criteria_list,2))) > lists = list(list((elem,r+1) for elem in pair for r in range(4)) for pair > in pairs) > print lists > > lists2 = map(lambda (x,y): map(lambda (r,v): (v,r+1), > it.chain(enumerate(it.repeat(x,4)),enumerate(it.repeat(y,4)))), > it.combinations(criteria_list,2)) > print lists2 > > > The first comprehension above (pairs) had redundant building of the first,second tuple. You could just simplify it as follows : import itertools as it criteria_list = ['education', 'know how', 'managerial', 'interpersonal', ] lists = list(list((elem,r+1) for elem in pair for r in range(4)) for pair in (it.combinations(criteria_list,2))) print lists lists2 = map(lambda (x,y): map(lambda (r,v): (v,r+1), it.chain(enumerate(it.repeat(x,4)),enumerate(it.repeat(y,4)))), it.combinations(criteria_list,2)) print lists2 From gora at mimirtech.com Mon Nov 7 06:11:31 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Mon, 7 Nov 2011 10:41:31 +0530 Subject: [BangPypers] Generate Dynamic lists In-Reply-To: References: Message-ID: On Fri, Oct 21, 2011 at 6:12 AM, Saager Mhatre wrote: [...] > While I'd usually suggest a list comprehension like... > > [(criteria, level) for level in range(1, 4) for criteria in > criteria_list[:2]] [...] List comprehensions would indeed be the Pythonic way to do it. The idea here was to get clarifications on what the original poster wanted, and give him an example of the same, rather than having him get bogged down in understanding syntax. Regards, Gora From shashidhar85 at gmail.com Mon Nov 7 12:16:45 2011 From: shashidhar85 at gmail.com (Shashidhar Paragonda) Date: Mon, 7 Nov 2011 16:46:45 +0530 Subject: [BangPypers] File read Message-ID: Dear Python hackers, I have text file. I read each line and store it in List. my requirement is I need to check only 6 special lines from i.e 1. resultToPDFFile 2. resultToPDFFileDialog 3. resultToQdasFile 4. resultToQdasFileDialog 5. resultToTableFile 6. resultToTableFileDialog Note: each line have value set in the end eg: "resultToPDFFile '->' true" my conditions are: if first line mentioned above found check the value if it "true" set dictionary item D['PDF'] = "ON" else if value is not "true" then check for line resultToPDFFileDialog if value is "off" set dictionary item D['PDF'] = "OFF" else: set dictionary item D['PDF'] = "ASK" for example these are the lines in file: resultToPDFFile '->' 'true' -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidhar85 at gmail.com +919449073835 From shashidhar85 at gmail.com Mon Nov 7 12:23:16 2011 From: shashidhar85 at gmail.com (Shashidhar Paragonda) Date: Mon, 7 Nov 2011 16:53:16 +0530 Subject: [BangPypers] File read Message-ID: Dear Python hackers, I have text file. I read each line and store it in List. my requirement is I need to check only 6 special lines from i.e 1. resultToPDFFile 2. resultToPDFFileDialog 3. resultToQdasFile 4. resultToQdasFileDialog 5. resultToTableFile 6. resultToTableFileDialog Note: each line have value set in the end eg: "resultToPDFFile '->' true" my conditions are: if first line mentioned above found check the value if it "true" set dictionary item D['PDF'] = "ON" else if value is not "true" then check for line resultToPDFFileDialog if value is "off" set dictionary item D['PDF'] = "OFF" else: set dictionary item D['PDF'] = "ASK" for example these are the lines in file: resultToPDFFile '->' 'true' resultToPDFFileDialog '->' 'on' >> I have put if else condition statements exactly same as I mentioned above. >> now my problem is though the resultToPDFFile is "true" >> first time I get the value as ON for dictionary item D['PDF'] >> When loop starts for finding other lines i.e numbers 3 & 4 from above list my Dictionary item D['PDF'] is becoming "ASK" >> the loop is entering into last else part. >> what is problem I am not gotting >> is my if else structure is wrong or not I am totally not getting other idea please help >> thank you in advance. -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidhar85 at gmail.com +919449073835 From lawgon at gmail.com Mon Nov 7 12:30:57 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Mon, 07 Nov 2011 17:00:57 +0530 Subject: [BangPypers] File read In-Reply-To: References: Message-ID: <1320665460.1939.11.camel@xlquest.web> On Mon, 2011-11-07 at 16:53 +0530, Shashidhar Paragonda wrote: > is my if else structure is wrong or not I am totally not getting > other idea please help > >> thank you in advance. please paste code -- regards Kenneth Gonsalves From shashidhar85 at gmail.com Mon Nov 7 12:47:36 2011 From: shashidhar85 at gmail.com (Shashidhar Paragonda) Date: Mon, 7 Nov 2011 17:17:36 +0530 Subject: [BangPypers] File read Message-ID: Dear Python hackers, I have text file. I read each line and store it in List. my requirement is I need to check only 6 special lines from i.e 1. resultToPDFFile 2. resultToPDFFileDialog 3. resultToQdasFile 4. resultToQdasFileDialog 5. resultToTableFile 6. resultToTableFileDialog Note: each line have value set in the end eg: "resultToPDFFile '->' true" my conditions are: if first line mentioned above found check the value if it "true" set dictionary item D['PDF'] = "ON" else if value is not "true" then check for line resultToPDFFileDialog if value is "off" set dictionary item D['PDF'] = "OFF" else: set dictionary item D['PDF'] = "ASK" for example these are the lines in file: resultToPDFFile '->' 'true' resultToPDFFileDialog '->' 'on' >> I have put if else condition statements exactly same as I mentioned above. >> now my problem is though the resultToPDFFile is "true" >> first time I get the value as ON for dictionary item D['PDF'] >> When loop starts for finding other lines i.e numbers 3 & 4 from above list my Dictionary item D['PDF'] is becoming "ASK" >> the loop is entering into last else part. >> what is problem I am not gotting >> is my if else structure is wrong or not I am totally not getting other idea please help >> thank you in advance. the code is: >>> inspset_file_pointer = open("%s/%s" % (self.inspsetfile_path, self.inspection_file), "r") # Read all lines from the INSPSET file from the TEMPORARY directory path all_lines_in_file = inspset_file_pointer.readlines() inspset_file_pointer.close() # loop through all the lines from the file print "readlines from the file" for line in range(0, len(all_lines_in_file)-1): time.sleep(.5) if "measPointsForLaterEval" in all_lines_in_file[line]: print "ZMP line found %s" % all_lines_in_file[line] if all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() == "true": time.sleep(.3) print all_lines_in_file[line] print "ZMP value %s" % all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() self.cnc_parameters['ZMP'] = "ON" print "dictionary values in ZMP %s" % self.cnc_parameters exit elif "measPointsForLaterEvalDialog" in all_lines_in_file[line]: if all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": time.sleep(.3) print all_lines_in_file[line] print "ZMP dialog value %s" % all_lines_in_file[line+1].split(')')[0].split('#')[1] self.cnc_parameters['ZMP'] = "OFF" print "dictionary values in ZMP %s" % self.cnc_parameters exit else: self.cnc_parameters['ZMP'] = "ASK" elif "resultsToPDFFile" in all_lines_in_file[line]: print "PDF line found %s" % all_lines_in_file[line] # check if current line i.e resultToPDFFile line has value is 'true' # same verification lines are same for rest of the keywords if all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() == "true": time.sleep(.3) print all_lines_in_file[line] print "PDF value %s" % all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() self.cnc_parameters['PDF'] = "ON" print "dictionary values in PDF %s" % self.cnc_parameters elif "resultToExportToPDFDialog" in all_lines_in_file[line]: if all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": time.sleep(.3) print all_lines_in_file[line] print "PDF dialog value %s" % all_lines_in_file[line+1].split(')')[0].split('#')[1] self.cnc_parameters['PDF'] = "OFF" print "dictionary values in PDF %s" % self.cnc_parameters else: self.cnc_parameters['PDF'] = "ASK" elif "resultToQdasFile" in all_lines_in_file[line]: print "Qdas line found %s" % all_lines_in_file[line] if all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() == "true": time.sleep(.3) print all_lines_in_file[line] print "QDAS value %s" % all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() self.cnc_parameters['QDAS'] = "ON" print "dictionary values in QDAS %s" % self.cnc_parameters exit elif "resultToQdasFileDialog" in all_lines_in_file[line]: if all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": time.sleep(.3) print all_lines_in_file[line] print "QDAS dialog value %s" % all_lines_in_file[line+1].split(')')[0].split('#')[1] self.cnc_parameters['QDAS'] = "OFF" print "dictionary values in QDAS %s" % self.cnc_parameters exit else: self.cnc_parameters['QDAS'] = "ASK" elif "resultToTableFile" in all_lines_in_file[line]: print "HDR line found %s" % all_lines_in_file[line] if all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() == "true": time.sleep(.3) print all_lines_in_file[line] print "HDR value %s" % all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() self.cnc_parameters['HDR'] = "ON" print "dictionary values in HDR %s" % self.cnc_parameters exit elif "resultToTableFileDialog" in all_lines_in_file[line]: if all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": time.sleep(.3) print all_lines_in_file[line] print "HDR dialog value %s" % all_lines_in_file[line+1].split(')')[0].split('#')[1] self.cnc_parameters['HDR'] = "OFF" print "dictionary values in HDR %s" % self.cnc_parameters exit else: self.cnc_parameters['HDR'] = "ASK" -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidhar85 at gmail.com +919449073835 From steve at lonetwin.net Mon Nov 7 17:37:25 2011 From: steve at lonetwin.net (steve) Date: Mon, 07 Nov 2011 22:07:25 +0530 Subject: [BangPypers] scanf replacement in python In-Reply-To: References: Message-ID: <4EB80945.9080802@lonetwin.net> On 11/06/2011 11:59 AM, kracekumar ramaraju wrote: > Hello > > The question might be simple, but it has a trick. > * > * > *c code* > *scanf("%d, %d",&m,&n)* > > The code can accept two nos separated by a space. > > *Question*: What is the equivalent in python? > > *Answer 1:* > *p* > > *Shortcoming*: I need press return to get o/p of second no. > Umm, isn't that the case with C too ? > *Answer 2:* > a = raw_input("no; ") > #Enter two nos separated by space > a = a.split() > > *Shortcoming*: it involves split function. > > Is there any better way to approach the same problem. > http://effbot.org/pyfaq/is-there-a-scanf-or-sscanf-equivalent.htm http://docs.python.org/library/re.html#simulating-scanf http://stackoverflow.com/questions/2175080/sscanf-in-python cheers, - steve -- random spiel: http://lonetwin.net/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From kracethekingmaker at gmail.com Mon Nov 7 18:12:09 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Mon, 7 Nov 2011 22:42:09 +0530 Subject: [BangPypers] scanf replacement in python In-Reply-To: <4EB80945.9080802@lonetwin.net> References: <4EB80945.9080802@lonetwin.net> Message-ID: On Mon, Nov 7, 2011 at 10:07 PM, steve wrote: > On 11/06/2011 11:59 AM, kracekumar ramaraju wrote: > >> Hello >> >> The question might be simple, but it has a trick. >> * >> * >> *c code* >> *scanf("%d, %d",&m,&n)* >> >> >> The code can accept two nos separated by a space. >> >> *Question*: What is the equivalent in python? >> >> *Answer 1:* >> *p* >> >> *Shortcoming*: I need press return to get o/p of second no. >> >> > Umm, isn't that the case with C too ? > > *Answer 2:* >> >> a = raw_input("no; ") >> #Enter two nos separated by space >> a = a.split() >> >> *Shortcoming*: it involves split function. >> >> >> Is there any better way to approach the same problem. >> >> > http://effbot.org/pyfaq/is-**there-a-scanf-or-sscanf-**equivalent.htm > http://docs.python.org/**library/re.html#simulating-**scanf > http://stackoverflow.com/**questions/2175080/sscanf-in-**python > > cheers, > - steve > > Thanks :) * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From steve at lonetwin.net Mon Nov 7 18:26:52 2011 From: steve at lonetwin.net (steve) Date: Mon, 07 Nov 2011 22:56:52 +0530 Subject: [BangPypers] File read In-Reply-To: References: Message-ID: <4EB814DC.1020603@lonetwin.net> Hey Shashidhar, Others may answer your question, I am not going to do that right away. I'll just offer a few suggestions to clean up your code. If you do that, I promise to answer your questions: a. Use os.path.join() to join path components b. You don't /have/ to read all the lines of the file into a list before processing it. The pythonic way would be: with open(filename) as input_file: for line in input_file.readline(): ...do stuff ... c. You don't need to iterate over lists using numeric indexes. Even if you /need/ numeric index, use enumerate. So, instead of : for index in range(len(somelist)): ...do something with somelist[index] ... OR ...do something with index ... use something like: for element in somelist: ...do something with element... OR for index, element in enumerate(somelist): ...do something with index or element .... d. Don't chain string operations to just match a substring, use regular expressions. If you /have/ to chain string operations (for instance, to extract rather than match), chain them only once. So, instead of : if all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() == "true": ... ... print "ZMP value %s" % all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() ...and more such monstrosities, do either: stuff_that_interests_me = line.split('->')[1].split(')')[0]("'")[1].strip() if stuff_that_interests_me == 'true': .... or just: matched = re.search("->\((.*)\)", line) # or some such, depending on the format if matched: stuff_that_interests_me = matched.group() .... e. If you need one of three options as values of a dict (which I assume will serve as a config dict), default the config keys to something. So, do: config = {'MyFirstKey' : 'ASK', 'MyNextKey' : 'ASK', ... } for line in all_lines: ...extract stuff_that_interests_me from line... if 'MyFirstKey' in line: if stuff_that_interests_me == 'true': config['MyFirstKey'] = 'ON' elif stuff_that_interests_me == 'false': config['MyFirstKey'] = 'OFF' ... HTH, cheers, - steve On 11/07/2011 05:17 PM, Shashidhar Paragonda wrote: > Dear Python hackers, > > I have text file. I read each line and store it in List. > > my requirement is I need to check only 6 special lines from i.e > > 1. resultToPDFFile > 2. resultToPDFFileDialog > 3. resultToQdasFile > 4. resultToQdasFileDialog > 5. resultToTableFile > 6. resultToTableFileDialog > > Note: each line have value set in the end eg: "resultToPDFFile '->' true" > > my conditions are: > if first line mentioned above found check the value if it "true" > set dictionary item D['PDF'] = "ON" > else if value is not "true" then > check for line resultToPDFFileDialog if value is "off" > set dictionary item D['PDF'] = "OFF" > else: > set dictionary item D['PDF'] = "ASK" > > for example these are the lines in file: > > resultToPDFFile '->' 'true' > > resultToPDFFileDialog '->' 'on' > > >> I have put if else condition statements exactly same as I mentioned > above. > >> now my problem is though the resultToPDFFile is "true" > >> first time I get the value as ON for dictionary item D['PDF'] > >> When loop starts for finding other lines i.e numbers 3& 4 from > above list my Dictionary item D['PDF'] is becoming "ASK" > >> the loop is entering into last else part. > >> what is problem I am not gotting > >> is my if else structure is wrong or not I am totally not getting > other idea please help > >> thank you in advance. > > the code is: > >>>> > > inspset_file_pointer = open("%s/%s" % (self.inspsetfile_path, > self.inspection_file), "r") > # Read all lines from the INSPSET file from the TEMPORARY > directory path > all_lines_in_file = inspset_file_pointer.readlines() > inspset_file_pointer.close() > # loop through all the lines from the file > print "readlines from the file" > for line in range(0, len(all_lines_in_file)-1): > time.sleep(.5) > if "measPointsForLaterEval" in all_lines_in_file[line]: > print "ZMP line found %s" % all_lines_in_file[line] > if > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > == "true": > time.sleep(.3) > print all_lines_in_file[line] > print "ZMP value %s" % > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > self.cnc_parameters['ZMP'] = "ON" > print "dictionary values in ZMP %s" % > self.cnc_parameters > exit > elif "measPointsForLaterEvalDialog" in > all_lines_in_file[line]: > if > all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": > time.sleep(.3) > print all_lines_in_file[line] > print "ZMP dialog value %s" % > all_lines_in_file[line+1].split(')')[0].split('#')[1] > self.cnc_parameters['ZMP'] = "OFF" > print "dictionary values in ZMP %s" % > self.cnc_parameters > exit > else: > self.cnc_parameters['ZMP'] = "ASK" > > elif "resultsToPDFFile" in all_lines_in_file[line]: > print "PDF line found %s" % all_lines_in_file[line] > # check if current line i.e resultToPDFFile line has > value is 'true' > # same verification lines are same for rest of the > keywords > if > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > == "true": > time.sleep(.3) > print all_lines_in_file[line] > print "PDF value %s" % > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > self.cnc_parameters['PDF'] = "ON" > print "dictionary values in PDF %s" % > self.cnc_parameters > elif "resultToExportToPDFDialog" in > all_lines_in_file[line]: > if > all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": > time.sleep(.3) > print all_lines_in_file[line] > print "PDF dialog value %s" % > all_lines_in_file[line+1].split(')')[0].split('#')[1] > self.cnc_parameters['PDF'] = "OFF" > print "dictionary values in PDF %s" % > self.cnc_parameters > else: > self.cnc_parameters['PDF'] = "ASK" > > elif "resultToQdasFile" in all_lines_in_file[line]: > print "Qdas line found %s" % all_lines_in_file[line] > if > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > == "true": > time.sleep(.3) > print all_lines_in_file[line] > print "QDAS value %s" % > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > self.cnc_parameters['QDAS'] = "ON" > print "dictionary values in QDAS %s" % > self.cnc_parameters > exit > elif "resultToQdasFileDialog" in > all_lines_in_file[line]: > if > all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": > time.sleep(.3) > print all_lines_in_file[line] > print "QDAS dialog value %s" % > all_lines_in_file[line+1].split(')')[0].split('#')[1] > self.cnc_parameters['QDAS'] = "OFF" > print "dictionary values in QDAS %s" % > self.cnc_parameters > exit > else: > self.cnc_parameters['QDAS'] = "ASK" > > elif "resultToTableFile" in all_lines_in_file[line]: > print "HDR line found %s" % all_lines_in_file[line] > if > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > == "true": > time.sleep(.3) > print all_lines_in_file[line] > print "HDR value %s" % > all_lines_in_file[line].split('->')[1].split(')')[0].split("'")[1].strip() > self.cnc_parameters['HDR'] = "ON" > print "dictionary values in HDR %s" % > self.cnc_parameters > exit > elif "resultToTableFileDialog" in > all_lines_in_file[line]: > if > all_lines_in_file[line+1].split(')')[0].split('#')[1] == "off": > time.sleep(.3) > print all_lines_in_file[line] > print "HDR dialog value %s" % > all_lines_in_file[line+1].split(')')[0].split('#')[1] > self.cnc_parameters['HDR'] = "OFF" > print "dictionary values in HDR %s" % > self.cnc_parameters > exit > else: > self.cnc_parameters['HDR'] = "ASK" > -- random spiel: http://lonetwin.net/ what i'm stumbling into: http://lonetwin.stumbleupon.com/ From thatiparthysreenivas at gmail.com Tue Nov 8 14:21:42 2011 From: thatiparthysreenivas at gmail.com (Sreenivas Reddy T) Date: Tue, 8 Nov 2011 18:51:42 +0530 Subject: [BangPypers] ubutu fonts.. In-Reply-To: References: Message-ID: Hi, Please pardon me for this off-topic post. I really like default font of ubuntu command line. I don?t know the name of it or I don?t know how to get the name of it. Anybody know the name of that font? Are they present in windows too? If they don?t come with windows (I use windows 7) by default where do I get them? From vinayshastry at gmail.com Wed Nov 9 02:46:06 2011 From: vinayshastry at gmail.com (Vinay Shastry) Date: Wed, 9 Nov 2011 07:16:06 +0530 Subject: [BangPypers] ubutu fonts.. In-Reply-To: References: Message-ID: On 8 November 2011 18:51, Sreenivas Reddy T wrote: > Hi, > > Please pardon me for this off-topic post. > > I really like default font of ubuntu command line. I don?t know the name of > it or I don?t know how to get the name of it. > > Anybody know the name of that font? > > Are they present in windows too? If they don?t come with windows (I use > windows 7) by default where do I get them? http://lmgtfy.com/?q=ubuntu+font http://font.ubuntu.com/ -- Vinay S Shastry From thatiparthysreenivas at gmail.com Wed Nov 9 03:44:53 2011 From: thatiparthysreenivas at gmail.com (Sreenivas Reddy T) Date: Wed, 9 Nov 2011 08:14:53 +0530 Subject: [BangPypers] ubuntu fonts.. Message-ID: I should have mentioned that i googled but no success...thanks for the lmgtfy... :) On Nov 9, 2011 7:16 AM, "Vinay Shastry" wrote: > > On 8 November 2011 18:51, Sreenivas Reddy T > wrote: > > Hi, > > > > Please pardon me for this off-topic post. > > > > I really like default font of ubuntu command line. I don?t know the name of > > it or I don?t know how to get the name of it. > > > > Anybody know the name of that font? > > > > Are they present in windows too? If they don?t come with windows (I use > > windows 7) by default where do I get them? > > http://lmgtfy.com/?q=ubuntu+font > > http://font.ubuntu.com/ > > -- > Vinay S Shastry > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers From lawgon at gmail.com Wed Nov 9 05:50:41 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 09 Nov 2011 10:20:41 +0530 Subject: [BangPypers] ubutu fonts.. In-Reply-To: References: Message-ID: <1320814243.20813.12.camel@xlquest.web> On Tue, 2011-11-08 at 18:51 +0530, Sreenivas Reddy T wrote: > Please pardon me for this off-topic post. why should we? -- regards Kenneth Gonsalves From thatiparthysreenivas at gmail.com Wed Nov 9 06:18:12 2011 From: thatiparthysreenivas at gmail.com (Sreenivas Reddy T) Date: Wed, 9 Nov 2011 10:48:12 +0530 Subject: [BangPypers] ubutu fonts.. In-Reply-To: <1320814243.20813.12.camel@xlquest.web> References: <1320814243.20813.12.camel@xlquest.web> Message-ID: Kenneth, Would have been much better if you say " why should i?",since you cannot speak for others/you do not represent others here.anyway , i am leaving it to you to pardon me or not.. On Nov 9, 2011 10:21 AM, "Kenneth Gonsalves" wrote: > On Tue, 2011-11-08 at 18:51 +0530, Sreenivas Reddy T wrote: > > Please pardon me for this off-topic post. > > why should we? > -- > regards > Kenneth Gonsalves > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From radhakrishna12 at gmail.com Wed Nov 9 06:23:17 2011 From: radhakrishna12 at gmail.com (Radhakrishna Bhat) Date: Wed, 9 Nov 2011 10:53:17 +0530 Subject: [BangPypers] ubutu fonts.. In-Reply-To: References: <1320814243.20813.12.camel@xlquest.web> Message-ID: Sreenivas, Use this http://ubuntuforums.org/ . On Wed, Nov 9, 2011 at 10:48 AM, Sreenivas Reddy T < thatiparthysreenivas at gmail.com> wrote: > Kenneth, > Would have been much better if you say " why should > i?",since you cannot speak for others/you do not represent others > here.anyway , i am leaving it to you to pardon me or not.. > On Nov 9, 2011 10:21 AM, "Kenneth Gonsalves" wrote: > > > On Tue, 2011-11-08 at 18:51 +0530, Sreenivas Reddy T wrote: > > > Please pardon me for this off-topic post. > > > > why should we? > > -- > > regards > > Kenneth Gonsalves > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From lawgon at gmail.com Wed Nov 9 06:28:20 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 09 Nov 2011 10:58:20 +0530 Subject: [BangPypers] ubutu fonts.. In-Reply-To: References: <1320814243.20813.12.camel@xlquest.web> Message-ID: <1320816503.20813.22.camel@xlquest.web> On Wed, 2011-11-09 at 10:48 +0530, Sreenivas Reddy T wrote: > Would have been much better if you say " why should > i?",since you cannot speak for others/you do not represent others > here.anyway , i am leaving it to you to pardon me or not.. I do not - this is a blatant misuse of this list. And to add insult to injury you give an arrogant reply instead of accepting your mistake. It also shows that your 'apology' in the original post is insincere. btw, since this list is governed by peer pressure every member is entitled to speak in the list on behalf of the list. You did not ask *me* to forgive you - you asked the list, so I have every right to ask why the list should do so. -- regards Kenneth Gonsalves From gopalakrishnan.subramani at gmail.com Wed Nov 9 07:11:36 2011 From: gopalakrishnan.subramani at gmail.com (Gopalakrishnan Subramani) Date: Wed, 9 Nov 2011 11:41:36 +0530 Subject: [BangPypers] ubuntu fonts.. In-Reply-To: References: Message-ID: You could try using inconsolata font ( http://www.levien.com/type/myfonts/inconsolata.html), a mono space font which is available for ubuntu and windows. I use with emacs all the way on windows and ubuntu both. On Wed, Nov 9, 2011 at 8:14 AM, Sreenivas Reddy T < thatiparthysreenivas at gmail.com> wrote: > I should have mentioned that i googled but no success...thanks for the > lmgtfy... :) > > On Nov 9, 2011 7:16 AM, "Vinay Shastry" wrote: > > > > On 8 November 2011 18:51, Sreenivas Reddy T > > wrote: > > > Hi, > > > > > > Please pardon me for this off-topic post. > > > > > > I really like default font of ubuntu command line. I don?t know the > name of > > > it or I don?t know how to get the name of it. > > > > > > Anybody know the name of that font? > > > > > > Are they present in windows too? If they don?t come with windows (I use > > > windows 7) by default where do I get them? > > > > http://lmgtfy.com/?q=ubuntu+font > > > > http://font.ubuntu.com/ > > > > -- > > Vinay S Shastry > > _______________________________________________ > > 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 senthil at uthcode.com Wed Nov 9 07:19:11 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 9 Nov 2011 14:19:11 +0800 Subject: [BangPypers] ubuntu fonts.. In-Reply-To: References: Message-ID: Yes +1 for Incosolata. It is best for programming and particularly for python programming. Here we use 'python' term in the email and it becomes relevant to this list. :) Also, check with Google Docs css they have Ubuntu font too. I am sure, python programming would look good in ubuntu font. I think, we have to learn the trick it seems, so that few ho are looking for python term do not get hurt. :) :) -- Senthil On Wed, Nov 9, 2011 at 2:11 PM, Gopalakrishnan Subramani wrote: > You could try using ?inconsolata font ( > http://www.levien.com/type/myfonts/inconsolata.html), a mono space font > which is available for ubuntu and windows. > I use with emacs all the way on windows and ubuntu both. > > On Wed, Nov 9, 2011 at 8:14 AM, Sreenivas Reddy T < > thatiparthysreenivas at gmail.com> wrote: > >> I should have mentioned ?that i googled but no success...thanks for the >> lmgtfy... ? :) >> >> On Nov 9, 2011 7:16 AM, "Vinay Shastry" wrote: >> > >> > On 8 November 2011 18:51, Sreenivas Reddy T >> > wrote: >> > > Hi, >> > > >> > > Please pardon me for this off-topic post. >> > > >> > > I really like default font of ubuntu command line. I don?t know the >> name of >> > > it or I don?t know how to get the name of it. >> > > >> > > Anybody know the name of that font? >> > > >> > > Are they present in windows too? If they don?t come with windows (I use >> > > windows 7) by default where do I get them? >> > >> > http://lmgtfy.com/?q=ubuntu+font >> > >> > http://font.ubuntu.com/ >> > >> > -- >> > Vinay S Shastry >> > _______________________________________________ >> > BangPypers mailing list >> > BangPypers at python.org >> > http://mail.python.org/mailman/listinfo/bangpypers >> _______________________________________________ >> BangPypers mailing list >> BangPypers at python.org >> http://mail.python.org/mailman/listinfo/bangpypers >> > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From pasokan at gmail.com Wed Nov 9 08:03:14 2011 From: pasokan at gmail.com (Asokan Pichai) Date: Wed, 9 Nov 2011 12:33:14 +0530 Subject: [BangPypers] ubuntu fonts.. In-Reply-To: References: Message-ID: http://hivelogic.com/articles/top-10-programming-fonts/ is a good place to look -- Asokan Pichai *-------------------* We will find a way. Or, make one. (Hannibal) From sanjaypadubidri at gmail.com Wed Nov 9 09:48:22 2011 From: sanjaypadubidri at gmail.com (Sanjay Padubidri) Date: Wed, 9 Nov 2011 14:18:22 +0530 Subject: [BangPypers] [OT] Yahoo Big Thinkers talk Message-ID: Off topic, but people on the list may be interested in this talk: http://in.bigthinkers.yahoo.com/event.php?id=19 Topic: Representing Knowledge in Computers: A Surprising Development from the 1980?s and Its Importance for Today?s World By: Dr. Ronald J. Brachman, Vice President of Yahoo! Labs and Research Operations -Sanjay Padubidri From senthil at uthcode.com Wed Nov 9 11:14:43 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 9 Nov 2011 18:14:43 +0800 Subject: [BangPypers] [OT] Yahoo Big Thinkers talk In-Reply-To: References: Message-ID: OMG. I was the one who was trying to suggest that we be lenient. But this looks that fodder for yet another discussion. :( On Wed, Nov 9, 2011 at 4:48 PM, Sanjay Padubidri wrote: > Off topic, but people on the list may be interested in this talk: > http://in.bigthinkers.yahoo.com/event.php?id=19 > > Topic: Representing Knowledge in Computers: A Surprising Development from > the 1980?s and Its Importance for Today?s World By: Dr. Ronald J. Brachman, > Vice President of Yahoo! Labs and Research Operations > > -Sanjay Padubidri > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From venkat83 at gmail.com Wed Nov 9 11:16:20 2011 From: venkat83 at gmail.com (Venkatraman S) Date: Wed, 9 Nov 2011 15:46:20 +0530 Subject: [BangPypers] [OT] Yahoo Big Thinkers talk In-Reply-To: References: Message-ID: On Wed, Nov 9, 2011 at 3:44 PM, Senthil Kumaran wrote: > OMG. I was the one who was trying to suggest that we be lenient. But > this looks that fodder for yet another discussion. :( > I dont see a problem. The OP has clearly mentioned it as OT, and am sure this talk would benefit many. -V http://blizzardzblogs.blogspot.com/ From vishnuprasadgaddam at gmail.com Wed Nov 9 12:15:19 2011 From: vishnuprasadgaddam at gmail.com (vishnu prasad) Date: Wed, 9 Nov 2011 16:45:19 +0530 Subject: [BangPypers] Seeks Professional Guidance ? Message-ID: Hi to all Greetings from vishnu prasad gaddam, am working in call centre i would like to continue my carrer in open source especially in python language can u tell me python is related to web development how it is suppose to explore with django frame work ?is there any fresher job openings related to python ?how much knowledge they can expect as a fresher in python ? Please suggest and guide me? is there any meets regularly conducting in bangalore ? thanks and regards Vishnu Prasad From lawgon at gmail.com Wed Nov 9 12:19:06 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 09 Nov 2011 16:49:06 +0530 Subject: [BangPypers] Seeks Professional Guidance ? In-Reply-To: References: Message-ID: <1320837549.20813.29.camel@xlquest.web> On Wed, 2011-11-09 at 16:45 +0530, vishnu prasad wrote: > Greetings from vishnu prasad gaddam, am working in call centre i would > like > to continue my carrer in open source especially in python language > can u > tell me python is related to web development how it is suppose to > explore > with django frame work ? could you explain what you mean? > is there any fresher job openings related to python yes - many > ?how much knowledge they can expect as a fresher in python ? you should know how to write a decorator. -- regards Kenneth Gonsalves From lawgon at gmail.com Wed Nov 9 12:35:39 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 09 Nov 2011 17:05:39 +0530 Subject: [BangPypers] collections Message-ID: <1320838542.20813.31.camel@xlquest.web> hi, python collections are cool and I am dying to use them in production. But so far I am yet to find a use case for using them - any experiences? -- regards Kenneth Gonsalves From saager.mhatre at gmail.com Wed Nov 9 12:53:33 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 9 Nov 2011 17:23:33 +0530 Subject: [BangPypers] collections In-Reply-To: <1320838542.20813.31.camel@xlquest.web> References: <1320838542.20813.31.camel@xlquest.web> Message-ID: On Wed, Nov 9, 2011 at 5:05 PM, Kenneth Gonsalves wrote: > hi, > > python collections are cool and I am dying to use them in production. > But so far I am yet to find a use case for using them - any experiences? > I'm assuming you mean the Python collections package that provides 'High-performance container datatypes'. We use defaultdict to good effect at work, but as far as I can tell, that's the only one we use from that package; other than Callable that I used in a bunch of test utilities, but that usage wasn't really valuable. Sorry if I wan't much help. - d From lawgon at gmail.com Wed Nov 9 13:00:49 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 09 Nov 2011 17:30:49 +0530 Subject: [BangPypers] collections In-Reply-To: References: <1320838542.20813.31.camel@xlquest.web> Message-ID: <1320840052.20813.34.camel@xlquest.web> On Wed, 2011-11-09 at 17:23 +0530, Saager Mhatre wrote: > > python collections are cool and I am dying to use them in > production. > > But so far I am yet to find a use case for using them - any > experiences? > > > > I'm assuming you mean the Python collections package that provides > 'High-performance container datatypes'. > yes > We use defaultdict to good effect at work, but as far as I can tell, > that's > the only one we use from that package; other than Callable that I used > in a > bunch of test utilities, but that usage wasn't really valuable. but it must be useful for *something* ;-) -- regards Kenneth Gonsalves From kracethekingmaker at gmail.com Wed Nov 9 16:54:58 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Wed, 9 Nov 2011 21:24:58 +0530 Subject: [BangPypers] Seeks Professional Guidance ? In-Reply-To: <1320837549.20813.29.camel@xlquest.web> References: <1320837549.20813.29.camel@xlquest.web> Message-ID: On Wed, Nov 9, 2011 at 4:49 PM, Kenneth Gonsalves wrote: > On Wed, 2011-11-09 at 16:45 +0530, vishnu prasad wrote: > > Greetings from vishnu prasad gaddam, am working in call centre i would > > like > > to continue my carrer in open source especially in python language > > can u > > tell me python is related to web development how it is suppose to > > explore > > with django frame work ? > > All the best. We will be glad to help you out, if you provide information like your programming background in case any ? could you explain what you mean? > > is there any fresher job openings related to python > > yes - many > Don't target to learn python for particular job. Once you have basic foundation on python, you can pick things easily but you need to spend considerable amount of time. > > ?how much knowledge they can expect as a fresher in python ? > > > That depends on company and job specification. -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From ramdaz at gmail.com Wed Nov 9 18:07:21 2011 From: ramdaz at gmail.com (Ramdas S) Date: Wed, 9 Nov 2011 22:37:21 +0530 Subject: [BangPypers] File read In-Reply-To: <4EB814DC.1020603@lonetwin.net> References: <4EB814DC.1020603@lonetwin.net> Message-ID: On Mon, Nov 7, 2011 at 10:56 PM, steve wrote: Hey Shashidhar, > > Others may answer your question, I am not going to do that right away. > I'll just offer a few suggestions to clean up your code. If you do that, I > promise to answer your questions: > > a. Use os.path.join() to join path components > > b. You don't /have/ to read all the lines of the file into a list before > processing it. The pythonic way would be: > > with open(filename) as input_file: > for line in input_file.readline(): > ...do stuff ... > > c. You don't need to iterate over lists using numeric indexes. Even if you > /need/ numeric index, use enumerate. So, instead of : > > for index in range(len(somelist)): > ...do something with somelist[index] ... > OR > ...do something with index ... > > use something like: > > for element in somelist: > ...do something with element... > OR > for index, element in enumerate(somelist): > ...do something with index or element .... > > > d. Don't chain string operations to just match a substring, use regular > expressions. If you /have/ to chain string operations (for instance, to > extract rather than match), chain them only once. So, instead of : > > > if all_lines_in_file[line].split(**'->')[1].split(')')[0].split("**'")[1].strip() > == "true": > ... > ... > > print "ZMP value %s" % all_lines_in_file[line].split(** > '->')[1].split(')')[0].split("**'")[1].strip() > > ...and more such monstrosities, do either: > > stuff_that_interests_me = line.split('->')[1].split(')')** > [0]("'")[1].strip() > > if stuff_that_interests_me == 'true': > .... > > or just: > matched = re.search("->\((.*)\)", line) # or some such, depending on the > format > > if matched: > stuff_that_interests_me = matched.group() > .... > > e. If you need one of three options as values of a dict (which I assume > will serve as a config dict), default the config keys to something. So, do: > > config = {'MyFirstKey' : 'ASK', > 'MyNextKey' : 'ASK', > ... > } > > for line in all_lines: > ...extract stuff_that_interests_me from line... > if 'MyFirstKey' in line: > if stuff_that_interests_me == 'true': > config['MyFirstKey'] = 'ON' > elif stuff_that_interests_me == 'false': > config['MyFirstKey'] = 'OFF' > ... > > > HTH, > cheers, > - steve > > Kudos, Steve. This is definitely the best answer which I have seen in this > discussion group, all these years. > I think you have set an example on how an experienced hand should direct a > not so-experienced one. > Many Many Thanks > > Ramdas S +91 9342 583 065 From saager.mhatre at gmail.com Thu Nov 10 05:42:57 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Thu, 10 Nov 2011 10:12:57 +0530 Subject: [BangPypers] collections In-Reply-To: <1320840052.20813.34.camel@xlquest.web> References: <1320838542.20813.31.camel@xlquest.web> <1320840052.20813.34.camel@xlquest.web> Message-ID: On Wed, Nov 9, 2011 at 5:30 PM, Kenneth Gonsalves wrote: > On Wed, 2011-11-09 at 17:23 +0530, Saager Mhatre wrote: > > [snip] > > > other than Callable that I used in a bunch of test utilities, but that > usage wasn't really valuable. > > but it must be useful for *something* ;-) > Not really, initially I thought I might actually have to extend Callable for the callable function to consider objects of my class... callable. :) But, it turns out you pretty much just need a __call__ attribute in the object for callable to return true. So it's mostly vestigial in the code. - d From noufal at gmail.com Thu Nov 10 07:43:41 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 10 Nov 2011 12:13:41 +0530 Subject: [BangPypers] Seeks Professional Guidance ? In-Reply-To: (vishnu prasad's message of "Wed, 9 Nov 2011 16:45:19 +0530") References: Message-ID: <87liro1nqa.fsf@sanitarium.localdomain> vishnu prasad writes: > Hi to all Greetings from vishnu prasad gaddam, am working in call > centre i would like to continue my carrer in open source especially in > python language can u tell me python is related to web development how > it is suppose to explore with django frame work ?is there any fresher > job openings related to python ?how much knowledge they can expect as > a fresher in python ? Please suggest and guide me? is there any meets > regularly conducting in bangalore ? [...] Do you have any prior programming experience? We'd probably be able to respond better then. -- ~noufal http://nibrahim.net.in The first condition of immortality is death. -Stanislaw Lec From asif.jamadar at rezayat.net Thu Nov 10 10:55:59 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Thu, 10 Nov 2011 09:55:59 +0000 Subject: [BangPypers] ChoiceField in django models Message-ID: Suppose I have choicefield in my django model which consist of several choices. Now in future if I changed the existing choice (option) with some other name (choice), then whether the existing records in model with that choice(option) will also change? Or In admin page I need to set that new option manually? How can I achieve this? Regards Asif From gora at mimirtech.com Thu Nov 10 11:26:42 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Thu, 10 Nov 2011 15:56:42 +0530 Subject: [BangPypers] ChoiceField in django models In-Reply-To: References: Message-ID: On Thu, Nov 10, 2011 at 3:25 PM, Asif Jamadar wrote: > Suppose I have choicefield in my django model which consist of several choices. Now in future if I changed the existing choice (option) with some other name (choice), then whether the existing records in model with that choice(option) ?will also change? Or In admin page I need to set that new option manually? No, they won't change automatically. There is no reasonable way for the system to intuit that this change was made. You would need to manually edit the existing object instances in the database, either through the admin. interface, or through a "python manage.py shell" script. Something along the lines of: from myapp.models import MyModel for obj in MyModel.objects.all(): if obj.mychoicefield == 'Old value': obj.mychoicefield = 'New value' obj.save() Regards, Gora From asif.jamadar at rezayat.net Thu Nov 10 11:28:27 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Thu, 10 Nov 2011 10:28:27 +0000 Subject: [BangPypers] ChoiceField in django models In-Reply-To: References: Message-ID: Thank you so much for your suggestion. From shashidhar85 at gmail.com Thu Nov 10 12:35:02 2011 From: shashidhar85 at gmail.com (Shashidhar Paragonda) Date: Thu, 10 Nov 2011 17:05:02 +0530 Subject: [BangPypers] Timestamp error Message-ID: Dear Python hackers, >>> I am facing *ValueError : **timestamp out of range for platform time_t * * >>> *I am working on Zope v. 2.8.11 with Python v2.4.4 on Debian v6.0 Squeeze. >>> I get this error when I extract some parameters and values from database. >>> can one one help me, thank you in advance -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidhar85 at gmail.com +919449073835 From dhananjay.nene at gmail.com Thu Nov 10 12:46:46 2011 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Thu, 10 Nov 2011 17:16:46 +0530 Subject: [BangPypers] Timestamp error In-Reply-To: References: Message-ID: On Thu, Nov 10, 2011 at 5:05 PM, Shashidhar Paragonda < shashidhar85 at gmail.com> wrote: > Dear Python hackers, > > >>> I am facing *ValueError : **timestamp out of range for > platform time_t > * > * >>> *I am working on Zope v. 2.8.11 with Python v2.4.4 on > Debian v6.0 Squeeze. > >>> I get this error when I extract some parameters and > values from database. > >>> can one one help me, thank you in advance > It means you attempted to create a timestamp beyond what the underlying platform supports (most likely a date too far out or far back). Perhaps if you attached the specific line of code with the actual values being passed to the constructor that we could replicate, it would help provide a more elaborate answer. > > -- > ----------------------------------- > Regards, > > Shashidhar N.Paragonda > shashidhar85 at gmail.com > +919449073835 > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ---------------------------------------------------------------------------------------------------------------------------------- http://blog.dhananjaynene.com twitter: @dnene google plus: http://gplus.to/dhananjaynene From shashidhar85 at gmail.com Thu Nov 10 13:46:40 2011 From: shashidhar85 at gmail.com (Shashidhar Paragonda) Date: Thu, 10 Nov 2011 18:16:40 +0530 Subject: [BangPypers] Timestamp error In-Reply-To: References: Message-ID: Hello Dhananjay, >>> Here is code >>> def _setCookie( self, bid, REQUEST, remove=0, now=time.time, strftime=time.strftime, gmtime=time.gmtime ): """ """ expires = None if remove: expires = "Sun, 10-May-1971 11:59:00 GMT" elif self.cookie_life_days: expires = now() + self.cookie_life_days * 86400 print "first expires value = %s" % expires # Wdy, DD-Mon-YYYY HH:MM:SS GMT print "I am in browser id manager file time= %s " % strftime('%a %d-%b-%Y %H:%M:%S GMT',gmtime(expires)) expires = strftime('%a %d-%b-%Y %H:%M:%S GMT',gmtime(expires)) print "second expires value = %s" % expires This is cookie function. On Thu, Nov 10, 2011 at 5:16 PM, Dhananjay Nene wrote: > On Thu, Nov 10, 2011 at 5:05 PM, Shashidhar Paragonda < > shashidhar85 at gmail.com> wrote: > > > Dear Python hackers, > > > > >>> I am facing *ValueError : **timestamp out of range for > > platform time_t > > * > > * >>> *I am working on Zope v. 2.8.11 with Python v2.4.4 on > > Debian v6.0 Squeeze. > > >>> I get this error when I extract some parameters and > > values from database. > > >>> can one one help me, thank you in advance > > > > It means you attempted to create a timestamp beyond what the underlying > platform supports (most likely a date too far out or far back). Perhaps if > you attached the specific line of code with the actual values being passed > to the constructor that we could replicate, it would help provide a more > elaborate answer. > > > > > -- > > ----------------------------------- > > Regards, > > > > Shashidhar N.Paragonda > > shashidhar85 at gmail.com > > +919449073835 > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > > -- > > ---------------------------------------------------------------------------------------------------------------------------------- > http://blog.dhananjaynene.com twitter: @dnene > google plus: > http://gplus.to/dhananjaynene > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ----------------------------------- Regards, Shashidhar N.Paragonda shashidhar85 at gmail.com +919449073835 From noufal at gmail.com Thu Nov 10 15:45:53 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Thu, 10 Nov 2011 20:15:53 +0530 Subject: [BangPypers] Pony mode Message-ID: <87mxc4xcgu.fsf@sanitarium.localdomain> If you're using Emacs and work with Django, you might find Pony mode[1] useful. It seems to be quite feature rich. Footnotes: [1] https://github.com/davidmiller/pony-mode -- ~noufal http://nibrahim.net.in Gentlemen, I want you to know that I am not always right, but I am never wrong. -Samuel Goldwyn From gopalakrishnan.subramani at gmail.com Fri Nov 11 07:11:24 2011 From: gopalakrishnan.subramani at gmail.com (Gopalakrishnan Subramani) Date: Fri, 11 Nov 2011 11:41:24 +0530 Subject: [BangPypers] Pony mode In-Reply-To: <87mxc4xcgu.fsf@sanitarium.localdomain> References: <87mxc4xcgu.fsf@sanitarium.localdomain> Message-ID: thank you. I will play around. On Thu, Nov 10, 2011 at 8:15 PM, Noufal Ibrahim wrote: > > If you're using Emacs and work with Django, you might find > Pony mode[1] useful. It seems to be quite feature rich. > > Footnotes: > [1] https://github.com/davidmiller/pony-mode > > -- > ~noufal > http://nibrahim.net.in > > Gentlemen, I want you to know that I am not always right, but I am never > wrong. -Samuel Goldwyn > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From noufal at gmail.com Fri Nov 11 10:36:00 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 11 Nov 2011 15:06:00 +0530 Subject: [BangPypers] Fwd: Panel at PyCon US 2012 about the international Python community In-Reply-To: <4EBCDCA2.8040208@python-academy.de> ("Mike =?iso-8859-1?Q?M?= =?iso-8859-1?Q?=FCller=22's?= message of "Fri, 11 Nov 2011 09:28:18 +0100") References: <4EBCDCA2.8040208@python-academy.de> Message-ID: <87ehxft30f.fsf@sanitarium.localdomain> Is anyone from here planning to attend the PyCon in the US this year? This would be a nice forum to get some visibility and attention. Mike M?ller writes: > Hi PyCon India organizers, > > I submitted a proposal for a panel discussion at PyCon US 2012 in March 2012 > in Santa Clara, CA (http://us.pycon.org/2012/). The topic is "Building an > International Python Community". This proposal was well received by the > reviewers. The only and very legitimate critic is the missing list of names > of panelists. > > Ideally, we would have representatives of the Python community from all > continents (maybe excluding Antarctica ;)) on the stage discussing and > expressing their opinions about the international Python community, what > works, what needs to be improved and other related things that they would > like to bring up. > > Now, I ask you if one of you would like to join as a panelist. So, if you > plan to attend PyCon US 2012 and feel like it is a good idea to discuss > this topic in public, please let me know. Also, please indicate if you > don't know yet if you are going to PyCon US 2012 but would like to be on > the panel and let me know about your final decision as soon as possible. > > Also, if you know other people who would make good panelist, please let me > know. The goal is to have a diverse panel in terms origin (or chosen location) > of the people. I am looking for people that care and work for the Python > community such as Python conference organizers, user group runners or people > who drive other community activities. > > I am open for ideas how to make this panel as useful as possible for our > community. > > Please answer by November 15, 2011. Your short "Yes", "No", or "Maybe" is > highly appreciated. > > Thanks a lot. > > Cheers, > Mike > > PS: The proposal text follows. > > > Building an International Python Community > ========================================== > > Audience level: Novice > Type: Panel > > Description > ----------- > > The Python community is growing internationally. There are Python conferences > in many countries. This panel discussion brings together representatives of > the Python community from all continents. They give their perspectives on the > development of their Python community. Objective is to get a diverse view on > the international Python community and how it can be further developed. > > > Abstract > -------- > > The Python community is very diverse. Python is used for a wide range of > purposes and all over the world. Besides its technical merits, Python is so > strong because of its very active community. The increase of the number of > Python conferences all over the world is a good indicator for this > development. In this panel discussion representatives of Python communities > from different parts of the world give their perspectives on how it developed, > what is good, what needs to be improved and where we should go. > > Traditionally, the largest Python community is in the US. While this might > still hold true, other regions such as South America, Europe and especially > Asia are growing fast in Python users and hence community. What does this mean > for the development of the international Python community? Do we need to do > things differently in the future from we do now to account for this change? > How do we cope with growth in general? Do we, the community, scale? How do we > need to change? > > The view on these questions from different perspectives might help to improve > our community. > > -- ~noufal http://nibrahim.net.in "I always avoid prophesying beforehand because it is much better to prophesy after the event has already taken place. " - Winston Churchill From abpillai at gmail.com Sat Nov 12 10:28:24 2011 From: abpillai at gmail.com (Anand Balachandran Pillai) Date: Sat, 12 Nov 2011 14:58:24 +0530 Subject: [BangPypers] File read In-Reply-To: <4EB814DC.1020603@lonetwin.net> References: <4EB814DC.1020603@lonetwin.net> Message-ID: On Mon, Nov 7, 2011 at 10:56 PM, steve wrote: > Hey Shashidhar, > > Others may answer your question, I am not going to do that right away. > I'll just offer a few suggestions to clean up your code. If you do that, I > promise to answer your questions: > > a. Use os.path.join() to join path components > > b. You don't /have/ to read all the lines of the file into a list before > processing it. The pythonic way would be: > > with open(filename) as input_file: > for line in input_file.readline(): > ...do stuff ... > > c. You don't need to iterate over lists using numeric indexes. Even if you > /need/ numeric index, use enumerate. So, instead of : > > for index in range(len(somelist)): > ...do something with somelist[index] ... > OR > ...do something with index ... > > use something like: > > for element in somelist: > ...do something with element... > OR > for index, element in enumerate(somelist): > ...do something with index or element .... > > > d. Don't chain string operations to just match a substring, use regular > expressions. If you /have/ to chain string operations (for instance, to > extract rather than match), chain them only once. So, instead of : > > > if all_lines_in_file[line].split(**'->')[1].split(')')[0].split("**'")[1].strip() > == "true": > ... > ... > > print "ZMP value %s" % all_lines_in_file[line].split(** > '->')[1].split(')')[0].split("**'")[1].strip() > > ...and more such monstrosities, do either: > > stuff_that_interests_me = line.split('->')[1].split(')')** > [0]("'")[1].strip() > > if stuff_that_interests_me == 'true': > .... > > or just: > matched = re.search("->\((.*)\)", line) # or some such, depending on the > format > > if matched: > stuff_that_interests_me = matched.group() > .... > > e. If you need one of three options as values of a dict (which I assume > will serve as a config dict), default the config keys to something. So, do: > > config = {'MyFirstKey' : 'ASK', > 'MyNextKey' : 'ASK', > ... > } > > for line in all_lines: > ...extract stuff_that_interests_me from line... > if 'MyFirstKey' in line: > if stuff_that_interests_me == 'true': > config['MyFirstKey'] = 'ON' > elif stuff_that_interests_me == 'false': > config['MyFirstKey'] = 'OFF' > ... > > > Excellent advise. Just adding 1 more point to this. Kindly don't post your code here. Please use repositories like pastebin for them and only post links here. (I am thinking I should add these guidelines to the welcome email...) > HTH, > cheers, > - steve > > -- --Anand From vishnuprasadgaddam at gmail.com Sat Nov 12 15:05:15 2011 From: vishnuprasadgaddam at gmail.com (vishnu prasad) Date: Sat, 12 Nov 2011 19:35:15 +0530 Subject: [BangPypers] google api and facebook api ? Message-ID: Hi to all How google internally running the code my doubt is python ? i mean api means we need to learn the code for separately apart from andriod,python,php, ruby ? knowing the api code and how can i start that ? is it python api is available for embedding with google ? please help me and also tell facebook and google running which code at back side ? thanks and regards prasad From gora at mimirtech.com Sat Nov 12 19:03:50 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Sat, 12 Nov 2011 23:33:50 +0530 Subject: [BangPypers] google api and facebook api ? In-Reply-To: References: Message-ID: On Sat, Nov 12, 2011 at 7:35 PM, vishnu prasad wrote: > Hi to all > > How google internally running the code my doubt is python ? > i mean api means we need to learn the code for separately apart from > andriod,python,php, ruby ? > knowing the api code and how can i start that ? is it python api is > available for embedding with google ? > please help me and also tell facebook and google running which code at back > side ? As with your earlier message, your meaning is not quite clear, and it is practically impossible for people to help you on the basis of this post. Maybe you can clarify further? * What are you trying to achieve? If all you are doing is using the APIs, you need not, and indeed should not, care how things are implemented in the back-end. * Your question needs to be much more specific. Both the Google and Facebook APIs are quite extensive, and you need to narrow down which areas you want to use them in, try out examples in these areas, and ask specific questions if and when you run into trouble. * This is a Python group, and hence your questions normally need to be Python-specific. Both Google and Facebook offer bindings, and SDKs in various languages. * Have no direct knowledge of either, but from the grapevine, Facebook is all PHP. Similarly, rumours are that Google is heavily into Python, but Guido only knows. Regards, Gora From slm340 at gmail.com Sun Nov 13 02:04:17 2011 From: slm340 at gmail.com (random bytes) Date: Sun, 13 Nov 2011 06:34:17 +0530 Subject: [BangPypers] Seeks Professional Guidance ? In-Reply-To: <1320837549.20813.29.camel@xlquest.web> References: <1320837549.20813.29.camel@xlquest.web> Message-ID: > you should know how to write a decorator. > - > Most software gets done without somebody knowing decorators. Subset of python can be seen as user language for non "reusable modules(library)" developers. So if one knows how to use a decorator he will be able to manage. Regards Srini. From subhodipbiswas at gmail.com Mon Nov 14 08:29:08 2011 From: subhodipbiswas at gmail.com (Subhodip Biswas) Date: Mon, 14 Nov 2011 12:59:08 +0530 Subject: [BangPypers] Import Error Message-ID: Hi all, I am trying to install lxml in my windows box with jython 2.5.2. I can see a lxml egg folder in site packages under jython installation directory. However if I try to import lxml the following thing happens : >>>Import lxml working fine >> from lxml import etree >>> from lxml import etree Traceback (most recent call last): File "", line 1, in File "C:\jython2.5.2\Lib\site-packages\lxml-2.3-py2.6-win32.egg\lxml\etree.py" , line 7, in __bootstrap__() File "C:\jython2.5.2\Lib\site-packages\lxml-2.3-py2.6-win32.egg\lxml\etree.py" , line 6, in __bootstrap__ imp.load_dynamic(__name__,__file__) ImportError: No module named lxml.etree I can see etree.py in the installation directory though. I need this to use GenerateDS.py for unmarshalling purpose. What am I missing out here? ------------- Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas From noufal at gmail.com Mon Nov 14 08:40:14 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 14 Nov 2011 13:10:14 +0530 Subject: [BangPypers] Import Error In-Reply-To: (Subhodip Biswas's message of "Mon, 14 Nov 2011 12:59:08 +0530") References: Message-ID: <874ny75ezl.fsf@sanitarium.localdomain> Subhodip Biswas writes: > Hi all, > > I am trying to install lxml in my windows box with jython 2.5.2. I can > see a lxml egg folder in site packages under jython installation > directory. > However if I try to import lxml the following thing happens : load_dynamic is something used to load shared libraries[1] As far as I know, lxml has some components implemented in C and I'm not totally sure if it's been ported. A quick search brought this up http://old.nabble.com/lxml-replacement-in-Jython-td27164714.html#a27164714 [...] Footnotes: [1] http://docs.python.org/library/imp.html#imp.load_dynamic -- ~noufal http://nibrahim.net.in Some bird populations soaring down -Headline of an article in Science News, page 126, February 20, 1993. From subhodipbiswas at gmail.com Mon Nov 14 10:37:41 2011 From: subhodipbiswas at gmail.com (Subhodip Biswas) Date: Mon, 14 Nov 2011 15:07:41 +0530 Subject: [BangPypers] Import Error In-Reply-To: <874ny75ezl.fsf@sanitarium.localdomain> References: <874ny75ezl.fsf@sanitarium.localdomain> Message-ID: Hi, On Mon, Nov 14, 2011 at 1:10 PM, Noufal Ibrahim wrote: > Subhodip Biswas writes: > >> Hi all, >> >> I am trying to install lxml in my windows box with jython 2.5.2. I can >> see a lxml egg folder in site packages under jython installation >> directory. >> However if I try to import lxml the following thing happens : > > load_dynamic is something used to load shared libraries[1] > > As far as I know, lxml has some components implemented in C and I'm not > totally sure if it's been ported. A quick search brought this up > http://old.nabble.com/lxml-replacement-in-Jython-td27164714.html#a27164714 > I know of two Libraries that is used by lxml. One is libxml2 and libxslt. It is required for compiling lxml from source and if lxml is not ported like say Amara/Akara. It should give me a "compiling extensions in not supported in jython". Instead I get lxml installed and then this. Is there a way I can get lxml in jython? Slightly off topic. My main intention is a unmarshalling library like xmlbeans in Java.What are the alternatives apart from generateDS or Amara that works with jython?? Any pointers and documentation will help. > > [...] > > > > Footnotes: > [1] ?http://docs.python.org/library/imp.html#imp.load_dynamic > > -- > ~noufal > http://nibrahim.net.in > > Some bird populations soaring down -Headline of an article in Science News, page 126, February 20, 1993. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > ------------- Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas From gora at mimirtech.com Mon Nov 14 11:47:57 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Mon, 14 Nov 2011 16:17:57 +0530 Subject: [BangPypers] Import Error In-Reply-To: References: <874ny75ezl.fsf@sanitarium.localdomain> Message-ID: On Mon, Nov 14, 2011 at 3:07 PM, Subhodip Biswas wrote: > Hi, > > On Mon, Nov 14, 2011 at 1:10 PM, Noufal Ibrahim wrote: >> Subhodip Biswas writes: >> >>> Hi all, >>> >>> I am trying to install lxml in my windows box with jython 2.5.2. I can >>> see a lxml egg folder in site packages under jython installation >>> directory. >>> However if I try to import lxml the following thing happens : >> >> load_dynamic is something used to load shared libraries[1] >> >> As far as I know, lxml has some components implemented in C and I'm not >> totally sure if it's been ported. A quick search brought this up >> http://old.nabble.com/lxml-replacement-in-Jython-td27164714.html#a27164714 >> > I know of two Libraries that is used by lxml. One is libxml2 and > libxslt. It is required for compiling lxml from source and if lxml is > not ported like say Amara/Akara. It should give me a "compiling > extensions in not supported in jython". Instead I get lxml installed > and then this. Is there a way I can get lxml in jython? Has been a while since I have had reason to use jython, but my understanding is that it cannot handle libraries that have components implemented in C. You are probably best off asking on a Jython-specific group. > Slightly off topic. My main intention is a unmarshalling library like > xmlbeans in Java.What are the alternatives apart from generateDS or > Amara that works with jython?? Not familiar with either GenerateDS, or Amara, but ElementTree ( http://effbot.org/zone/element-index.htm ) has a pure Python implementation, which should work with jython. I think that is also true of BeautifulSoup ( http://www.crummy.com/software/BeautifulSoup/ ) Regards, Gora From subhodipbiswas at gmail.com Mon Nov 14 13:58:09 2011 From: subhodipbiswas at gmail.com (Subhodip Biswas) Date: Mon, 14 Nov 2011 18:28:09 +0530 Subject: [BangPypers] Import Error In-Reply-To: References: <874ny75ezl.fsf@sanitarium.localdomain> Message-ID: Hi, On Mon, Nov 14, 2011 at 4:17 PM, Gora Mohanty wrote: > On Mon, Nov 14, 2011 at 3:07 PM, Subhodip Biswas > wrote: >> Hi, >> >> On Mon, Nov 14, 2011 at 1:10 PM, Noufal Ibrahim wrote: >>> Subhodip Biswas writes: >>> >>>> Hi all, >>>> >>>> I am trying to install lxml in my windows box with jython 2.5.2. I can >>>> see a lxml egg folder in site packages under jython installation >>>> directory. >>>> However if I try to import lxml the following thing happens : >>> >>> load_dynamic is something used to load shared libraries[1] >>> >>> As far as I know, lxml has some components implemented in C and I'm not >>> totally sure if it's been ported. A quick search brought this up >>> http://old.nabble.com/lxml-replacement-in-Jython-td27164714.html#a27164714 >>> >> I know of two Libraries that is used by lxml. One is libxml2 and >> libxslt. It is required for compiling lxml from source and if lxml is >> not ported like say Amara/Akara. It should give me a "compiling >> extensions in not supported in jython". Instead I get lxml installed >> and then this. Is there a way I can get lxml in jython? > > Has been a while since I have had reason to use jython, > but my understanding is that it cannot handle libraries that > have components implemented in C. You are probably best > off asking on a Jython-specific group. > >> Slightly off topic. My main intention is a unmarshalling library like >> xmlbeans in Java.What are the alternatives apart from generateDS or >> Amara that works with jython?? > > Not familiar with either GenerateDS, or Amara, but ElementTree > ( http://effbot.org/zone/element-index.htm ) has a pure Python > implementation, which should work with jython. I think that is also true > of BeautifulSoup ( http://www.crummy.com/software/BeautifulSoup/ ) > I guess I hit a dead end again. I wanted to use GenerateDS as I wanted to generate some python classes based on a XSD/XML feed. The reason I am stuck with jython is I have some java dependencies for my project.I think I need to figure some weird way of doing so. > Regards, > Gora > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > ------------- Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas From anandology at gmail.com Mon Nov 14 14:12:53 2011 From: anandology at gmail.com (Anand Chitipothu) Date: Mon, 14 Nov 2011 18:42:53 +0530 Subject: [BangPypers] Import Error In-Reply-To: References: <874ny75ezl.fsf@sanitarium.localdomain> Message-ID: 2011/11/14 Subhodip Biswas : > Hi, > > On Mon, Nov 14, 2011 at 4:17 PM, Gora Mohanty wrote: >> On Mon, Nov 14, 2011 at 3:07 PM, Subhodip Biswas >> wrote: >>> Hi, >>> >>> On Mon, Nov 14, 2011 at 1:10 PM, Noufal Ibrahim wrote: >>>> Subhodip Biswas writes: >>>> >>>>> Hi all, >>>>> >>>>> I am trying to install lxml in my windows box with jython 2.5.2. I can >>>>> see a lxml egg folder in site packages under jython installation >>>>> directory. >>>>> However if I try to import lxml the following thing happens : >>>> >>>> load_dynamic is something used to load shared libraries[1] >>>> >>>> As far as I know, lxml has some components implemented in C and I'm not >>>> totally sure if it's been ported. A quick search brought this up >>>> http://old.nabble.com/lxml-replacement-in-Jython-td27164714.html#a27164714 >>>> >>> I know of two Libraries that is used by lxml. One is libxml2 and >>> libxslt. It is required for compiling lxml from source and if lxml is >>> not ported like say Amara/Akara. It should give me a "compiling >>> extensions in not supported in jython". Instead I get lxml installed >>> and then this. Is there a way I can get lxml in jython? >> >> Has been a while since I have had reason to use jython, >> but my understanding is that it cannot handle libraries that >> have components implemented in C. You are probably best >> off asking on a Jython-specific group. >> >>> Slightly off topic. My main intention is a unmarshalling library like >>> xmlbeans in Java.What are the alternatives apart from generateDS or >>> Amara that works with jython?? >> >> Not familiar with either GenerateDS, or Amara, but ElementTree >> ( http://effbot.org/zone/element-index.htm ) has a pure Python >> implementation, which should work with jython. I think that is also true >> of BeautifulSoup ( http://www.crummy.com/software/BeautifulSoup/ ) >> > > I guess I hit a dead end again. I wanted to use GenerateDS as I wanted > to generate some python classes based on a XSD/XML feed. The reason I > am stuck with jython is I have some java dependencies for my project.I > think I need to figure some weird way of doing so. It looks like you are looking for an object serialization library. I suggest you to try XStream. http://xstream.codehaus.org/ It is a popular Java library for object serialization. It shouldn't be hard to write a converter for Python objects. I think you should be able to write the converter in Python itself. This page has couple of example of installing custom converters. http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/XStream.html Anand From asif.jamadar at rezayat.net Mon Nov 14 14:52:37 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Mon, 14 Nov 2011 13:52:37 +0000 Subject: [BangPypers] seantis questionnaire - Django App Message-ID: Where i can get user manual or tutorial for seantis questionnaire django application? From senthil at uthcode.com Mon Nov 14 15:44:06 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Mon, 14 Nov 2011 22:44:06 +0800 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: Message-ID: <20111114144406.GA2198@mathmagic> Right in this list, by asking. https://github.com/rmt/seantis-questionnaire/wiki :-) On Mon, Nov 14, 2011 at 01:52:37PM +0000, Asif Jamadar wrote: > Where i can get user manual or tutorial for seantis questionnaire django application? > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers From lawgon at gmail.com Tue Nov 15 00:41:44 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Tue, 15 Nov 2011 05:11:44 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: Message-ID: <1321314119.1868.6.camel@xlquest.web> On Mon, 2011-11-14 at 13:52 +0000, Asif Jamadar wrote: > Where i can get user manual or tutorial for seantis questionnaire > django application? their website would be a good place. -- regards Kenneth Gonsalves From asif.jamadar at rezayat.net Tue Nov 15 05:37:06 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 15 Nov 2011 04:37:06 +0000 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: <1321314119.1868.6.camel@xlquest.web> References: <1321314119.1868.6.camel@xlquest.web> Message-ID: Can you provide me the url for their webite? From gora at mimirtech.com Tue Nov 15 05:51:24 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Tue, 15 Nov 2011 10:21:24 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> Message-ID: On Tue, Nov 15, 2011 at 10:07 AM, Asif Jamadar wrote: > Can you provide me the url for their webite? Are you reading replies to your message? Senthil already provided you a URL: https://github.com/rmt/seantis-questionnaire/wiki and you could have found the same with a minimal expenditure of effort in searching Google. The documentation is quite sparse, so please try things out, and ask specific questions here if you need to. Regards, Gora From lawgon at gmail.com Tue Nov 15 06:23:54 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Tue, 15 Nov 2011 10:53:54 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> Message-ID: <1321334637.7554.0.camel@xlquest.web> On Tue, 2011-11-15 at 04:37 +0000, Asif Jamadar wrote: > Can you provide me the url for their webite? http://duckduckgo.com/?q=seantis+questionnaire -- regards Kenneth Gonsalves From asif.jamadar at rezayat.net Tue Nov 15 07:47:12 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 15 Nov 2011 06:47:12 +0000 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> Message-ID: Thanks for your answer. Now how user is created in 'Subject' model of Questionnaire App? Whether we need to create manually or allow user to create his credentials? And why this app always creates AnonymousUser? From asif.jamadar at rezayat.net Tue Nov 15 08:24:08 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 15 Nov 2011 07:24:08 +0000 Subject: [BangPypers] django signals Message-ID: I'm going to implement questionnaire application using django. Each page consist of 4 questions. Now how can i implement time for each page. Suppose each page has 30 min how can i implement this for my questionnaire application. Is this can be achived by django signal? From venkat83 at gmail.com Tue Nov 15 09:09:06 2011 From: venkat83 at gmail.com (Venkatraman S) Date: Tue, 15 Nov 2011 13:39:06 +0530 Subject: [BangPypers] django signals In-Reply-To: References: Message-ID: On Tue, Nov 15, 2011 at 12:54 PM, Asif Jamadar wrote: > I'm going to implement questionnaire application using django. Each page > consist of 4 questions. Now how can i implement time for each page. Suppose > each page has 30 min how can i implement this for my questionnaire > application. > > Is this can be achived by django signal? > Well, why do you want signals or what prompted you to think about signals in this case? I am just curious as it doesnt look like a KISS solution. -V From asif.jamadar at rezayat.net Tue Nov 15 09:09:43 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 15 Nov 2011 08:09:43 +0000 Subject: [BangPypers] django signals In-Reply-To: References: Message-ID: Is there any way to implement timer using django for each page? From rmathews at gmail.com Tue Nov 15 09:18:33 2011 From: rmathews at gmail.com (Roshan Mathews) Date: Tue, 15 Nov 2011 13:48:33 +0530 Subject: [BangPypers] django signals In-Reply-To: References: Message-ID: JavaScript timer in the browser. Your view will verify the start and end time on the backend. On Tue, Nov 15, 2011 at 13:39, Asif Jamadar wrote: > > Is there any way to implement timer using django for each page? > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- http://about.me/rosh From gora at mimirtech.com Tue Nov 15 09:20:27 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Tue, 15 Nov 2011 13:50:27 +0530 Subject: [BangPypers] django signals In-Reply-To: References: Message-ID: On Tue, Nov 15, 2011 at 1:39 PM, Asif Jamadar wrote: > > Is there any way to implement timer using django for each page? Timers are best done with Javascript at the front-end, backed by verification in the back-end. Normally, the back-end can only be informed of changes on a page reload, or via an AJAX call. Regards, Gora From asif.jamadar at rezayat.net Tue Nov 15 09:42:46 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 15 Nov 2011 08:42:46 +0000 Subject: [BangPypers] django signals In-Reply-To: References: Message-ID: Can anybody explain me how these django signals works with example? From rmathews at gmail.com Tue Nov 15 09:49:41 2011 From: rmathews at gmail.com (Roshan Mathews) Date: Tue, 15 Nov 2011 14:19:41 +0530 Subject: [BangPypers] django signals In-Reply-To: References: Message-ID: On Tue, Nov 15, 2011 at 14:12, Asif Jamadar wrote: > Can anybody explain me how these django signals works with example? Yes, Alon Swartz can, over here - http://www.turnkeylinux.org/blog/django-signals Found via this wonderful site - https://www.google.com/search?q=django+signals+example?which gave much better results than?http://duckduckgo.com/?q=django+signals+example -- http://about.me/rosh From lawgon at gmail.com Tue Nov 15 10:44:26 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Tue, 15 Nov 2011 15:14:26 +0530 Subject: [BangPypers] django signals In-Reply-To: References: Message-ID: <1321350269.7554.3.camel@xlquest.web> On Tue, 2011-11-15 at 14:19 +0530, Roshan Mathews wrote: > Found via this wonderful site - > https://www.google.com/search?q=django+signals+example which gave much > better results than http://duckduckgo.com/?q=django+signals+example I resent that ;-). How about this: http://duckduckgo.com/?q=site%3Adocs.djangoproject.com+signals+example -- regards Kenneth Gonsalves From lawgon at gmail.com Tue Nov 15 10:46:31 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Tue, 15 Nov 2011 15:16:31 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> Message-ID: <1321350394.7554.5.camel@xlquest.web> On Tue, 2011-11-15 at 06:47 +0000, Asif Jamadar wrote: > Thanks for your answer. > > Now how user is created in 'Subject' model of Questionnaire App? > > Whether we need to create manually or allow user to create his > credentials? > > And why this app always creates AnonymousUser? > > the docs specifically state that django auth is not used. You will have to roll your own (or use django auth) -- regards Kenneth Gonsalves From asif.jamadar at rezayat.net Tue Nov 15 14:21:08 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 15 Nov 2011 13:21:08 +0000 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: <1321350394.7554.5.camel@xlquest.web> References: <1321314119.1868.6.camel@xlquest.web> <1321350394.7554.5.camel@xlquest.web> Message-ID: Thank you for your answer. Another question how we can check the feature 'export CSV' in this questionnaire app? From dhananjay.nene at gmail.com Tue Nov 15 17:10:49 2011 From: dhananjay.nene at gmail.com (Dhananjay Nene) Date: Tue, 15 Nov 2011 21:40:49 +0530 Subject: [BangPypers] google api and facebook api ? In-Reply-To: References: Message-ID: On Sat, Nov 12, 2011 at 7:35 PM, vishnu prasad wrote: > Hi to all > > How google internally running the code my doubt is python ? > i mean api means we need to learn the code for separately apart from > andriod,python,php, ruby ? > knowing the api code and how can i start that ? is it python api is > available for embedding with google ? > please help me and also tell facebook and google running which code at back > side ? > > > I'm going to be brave and attempt to infer what was it you really intended to ask ? - How google is running their own code internally ? Frankly doesn't matter when you interact it using an API - We need to learn the code separately ...? If you are referring to the API, yes you need to learn it separately. Google publishes their APIs both as HTTP APIs, and also as client libraries which call those APIs. You need to learn one of these two and in most situations you will choose to use the client libraries since they are much more friendly towards programmers (rather than raw HTTP streams) and allow you to do your code productively. For various python client libraries for google APIs refer http://code.google.com/p/gdata-python-client/ - Is Python API available for embedding with google. Python API is available for invoking google services. See the link above. - Which code is google and facebook running at the back ? There is a plethora of languages both use. The language used to implement the services is actually irrelevant if you are accessing their services. From gora at mimirtech.com Tue Nov 15 18:02:26 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Tue, 15 Nov 2011 22:32:26 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> <1321350394.7554.5.camel@xlquest.web> Message-ID: On Tue, Nov 15, 2011 at 6:51 PM, Asif Jamadar wrote: > Thank you for your answer. > > Another question how we can check the feature 'export CSV' in this questionnaire app? No offence, but you really need to learn how to better frame your questions so that people can answer them: * It is unlikely that people here would have used any obscure Django app that you might come across, and want to use. * Even if there are people familiar with this app on the list, it should be common courtesy to others to describe in more detail than a one-liner as to what you are after. Specifically, it would be great if you could describe things along the lines of, I tried ABC feature of XYZ app, and ran into NML problem. * A smart person on the Solr mailing list put together this Wiki page on how best to use mailing lists. Somewhat Solr-specific, but definitely worth a read: http://wiki.apache.org/solr/UsingMailingLists Again, please do not take this personally: My hope is to save both your time, and those of people on the list. Regards, Gora From lawgon at gmail.com Wed Nov 16 06:57:33 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 16 Nov 2011 11:27:33 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> <1321350394.7554.5.camel@xlquest.web> Message-ID: <1321423056.7554.10.camel@xlquest.web> On Tue, 2011-11-15 at 22:32 +0530, Gora Mohanty wrote: > * A smart person on the Solr mailing list put together this Wiki > page on how best to use mailing lists. Somewhat Solr-specific, > but definitely worth a read: > http://wiki.apache.org/solr/UsingMailingLists > > this is the django equivalent: https://code.djangoproject.com/wiki/UsingTheMailingList -- regards Kenneth Gonsalves From lawgon at gmail.com Wed Nov 16 06:59:33 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 16 Nov 2011 11:29:33 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> <1321350394.7554.5.camel@xlquest.web> Message-ID: <1321423176.7554.12.camel@xlquest.web> On Tue, 2011-11-15 at 13:21 +0000, Asif Jamadar wrote: > Another question how we can check the feature 'export CSV' in this > questionnaire app? export CSV means to create a comma separated file which can be imported into a spreadsheet for analysis. -- regards Kenneth Gonsalves From saager.mhatre at gmail.com Wed Nov 16 07:52:44 2011 From: saager.mhatre at gmail.com (Saager Mhatre) Date: Wed, 16 Nov 2011 12:22:44 +0530 Subject: [BangPypers] Mailing list etiquette Message-ID: http://catb.org/~esr/faqs/smart-questions.html Considering there's been a spate of similar incidents, I figured it might just be valuable to collect all these references into a thread of their own. - d PS- If I had a nickel for every time I've wanted to point people to this article, I'd be a rich man who wouldn't have to even lurk on mailing lists like this one. ;) On Wed, Nov 16, 2011 at 11:27 AM, Kenneth Gonsalves wrote: > On Tue, 2011-11-15 at 22:32 +0530, Gora Mohanty wrote: > > * A smart person on the Solr mailing list put together this Wiki > > page on how best to use mailing lists. Somewhat Solr-specific, > > but definitely worth a read: > > http://wiki.apache.org/solr/UsingMailingLists > > > > > > this is the django equivalent: > https://code.djangoproject.com/wiki/UsingTheMailingList > -- > regards > Kenneth Gonsalves > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From niranjan.par at gmail.com Wed Nov 16 16:31:34 2011 From: niranjan.par at gmail.com (Niranjan Paranjape) Date: Wed, 16 Nov 2011 21:01:34 +0530 Subject: [BangPypers] [ANN][OT][X-Post] CodeRetreat in India on global CodeRetreat day - 3rd December Message-ID: [cross posting as it is relevant to a wider audience ] Hi, Bangalore, Chennai, Delhi and Pure are participating in the Global Day of Coderetreat 2011! Coderetreat is a day-long, intensive practice event focused on the fundamentals of software development and design.The unique coderetreat format (which eliminates the pressure of 'getting things done' and focuses on practicing basic principles of good design) has proven to be a highly effective (and fun) means of skill improvement. Check out to Corey Haines's coderetreat site (http://coderetreat.com) if you want further details on what to expect. On December 3rd, Coderetreats will be held at cities all over the world. It's going to be a lot of fun! You can register at: Bangalore: http://blr-global-coderetreat-11.doattend.com/ Chennai: http://chennai-global-coderetreat-11.doattend.com/ Delhi: http://delhi-global-coderetreat-11.doattend.com/ Pune: http://pune-global-coderetreat-11.doattend.com/ You only need to bring a laptop with the development tools you require to write code using your chosen programming languages. A breakfast and lunch will be provided. Please spread the word amongst other developers and mailing lists. This event is hosted by ITT (Innovation Technology Trust) and co-sponsored by ThoughtWorks and C42 Engineering. If you have any problems registering, or have any other questions, feel free to contact me (niranjan at c42.in). Regards, Niranjan. C42 Engineering. g-talk: niranjan at c42.in y!: niranjangp at yahoo.com business: niranjan at c42.in From asif.jamadar at rezayat.net Wed Nov 16 19:00:49 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Wed, 16 Nov 2011 18:00:49 +0000 Subject: [BangPypers] Dynamic color for table column (color stored in model) Message-ID: I have model called TestResults models.py ---------- Class TestResults(models) chemical_name charfield value floatfield unit charfield method charfield normal_limit charfield caution_limit charfield color charfield Now, The below code will generate the table for oils, which has following fields. views.py --------- fields = ('Test Name', 'Value', 'Unit', 'Method', 'Normal Limit', 'Caution Limit') all_oils = [(test.chemical_name, test.value, test.unit, test.method, test.normal_limit, test.caution_limit) for test in TestResult.objects.all())] oil_table = Table([fields] + all_oils oil_table.setStyle(TableStyle([('BACKGROUND', (0, 0), (-1, 0), '#a7a5a5'), ('FONTSIZE', (0, 0), (-1, 0), 6), ('GRID', (0, 0), (-1, -1), 2, '#a7a5a5'), ('FONTSIZE', (0, 0), (-1, -1), 8), ('FONTNAME',(1,1),(1,-1),'Times-Bold')])) Now how can I provide dynamic color for each column. Suppose my TestResult model is having field for color (I,e color=red) In report i want dynamic color for second column which comes from model objects How can I achieve this? From asif.jamadar at rezayat.net Wed Nov 16 19:05:26 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Wed, 16 Nov 2011 18:05:26 +0000 Subject: [BangPypers] Dynamic color for table column (color stored in model) Message-ID: I have model called TestResults models.py ---------- Class TestResults(models) chemical_name charfield value floatfield unit charfield method charfield normal_limit charfield caution_limit charfield color charfield Now, The below code will generate the table for oils, which has following fields. views.py --------- fields = ('Test Name', 'Value', 'Unit', 'Method', 'Normal Limit', 'Caution Limit') all_oils = [(test.chemical_name, test.value, test.unit, test.method, test.normal_limit, test.caution_limit) for test in TestResult.objects.all())] oil_table = Table([fields] + all_oils oil_table.setStyle(TableStyle([('BACKGROUND', (0, 0), (-1, 0), '#a7a5a5'), ('FONTSIZE', (0, 0), (-1, 0), 6), ('GRID', (0, 0), (-1, -1), 2, '#a7a5a5'), ('FONTSIZE', (0, 0), (-1, -1), 8), ('FONTNAME',(1,1),(1,-1),'Times-Bold')])) Now how can I provide dynamic color for each column. Suppose my TestResult model is having field for color (I,e color=red) In report i want dynamic color for second column which comes from model objects How can I achieve this? From asif.jamadar at rezayat.net Wed Nov 16 19:08:57 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Wed, 16 Nov 2011 18:08:57 +0000 Subject: [BangPypers] Reportlab: Dynamic color for table column (color stored in model) in reportlab Message-ID: I have model called TestResults models.py ---------- Class TestResults(models) chemical_name charfield value floatfield unit charfield method charfield normal_limit charfield caution_limit charfield color charfield Now, The below code will generate the table for oils, which has following fields. views.py --------- fields = ('Test Name', 'Value', 'Unit', 'Method', 'Normal Limit', 'Caution Limit') all_oils = [(test.chemical_name, test.value, test.unit, test.method, test.normal_limit, test.caution_limit) for test in TestResult.objects.all())] oil_table = Table([fields] + all_oils oil_table.setStyle(TableStyle([('BACKGROUND', (0, 0), (-1, 0), '#a7a5a5'), ('FONTSIZE', (0, 0), (-1, 0), 6), ('GRID', (0, 0), (-1, -1), 2, '#a7a5a5'), ('FONTSIZE', (0, 0), (-1, -1), 8), ('FONTNAME',(1,1),(1,-1),'Times-Bold')])) Now how can I provide dynamic color for each column. Suppose my TestResult model is having field for color (I,e color=red) In report i want dynamic color for second column which comes from model objects How can I achieve this? _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From kracethekingmaker at gmail.com Thu Nov 17 02:33:09 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Thu, 17 Nov 2011 07:03:09 +0530 Subject: [BangPypers] Dynamic color for table column (color stored in model) In-Reply-To: References: Message-ID: On Wed, Nov 16, 2011 at 11:35 PM, Asif Jamadar wrote: > I have model called TestResults > > models.py > ---------- > > Class TestResults(models) > > chemical_name charfield > value floatfield > unit charfield > method charfield > normal_limit charfield > caution_limit charfield > color charfield > > > Now, > > The below code will generate the table for oils, which has following > fields. > > views.py > --------- > fields = ('Test Name', 'Value', 'Unit', 'Method', > 'Normal Limit', 'Caution Limit') > > all_oils = [(test.chemical_name, test.value, test.unit, test.method, > test.normal_limit, test.caution_limit) > > for test in TestResult.objects.all())] > > oil_table = Table([fields] + all_oils > > oil_table.setStyle(TableStyle([('BACKGROUND', (0, 0), (-1, 0), '#a7a5a5'), > ('FONTSIZE', (0, 0), (-1, 0), 6), > ('GRID', (0, 0), (-1, -1), 2, '#a7a5a5'), > ('FONTSIZE', (0, 0), (-1, -1), 8), > ('FONTNAME',(1,1),(1,-1),'Times-Bold')])) > One advice is use css to set colors.In your template check for color value ="red" and then render css for that colour, else if you are using only 2 colour you can even and odd property. *Source:* 1. *http://www.w3.org/Style/Examples/007/evenodd.en.html* 2. http://api.jquery.com/odd-selector/ In case you use jinja 2 look here http://jinja.pocoo.org/docs/tricks/. > > Now how can I provide dynamic color for each column. Suppose my TestResult > model is having field for color (I,e color=red) > > In report i want dynamic color for second column which comes from model > objects > > How can I achieve this? > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From asif.jamadar at rezayat.net Thu Nov 17 05:57:59 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Thu, 17 Nov 2011 04:57:59 +0000 Subject: [BangPypers] Dynamic color for table column (color stored in model) In-Reply-To: References: Message-ID: But the table is generated by reportlab tool. How I can integrate css with reportlab? From nirmalas at aditi.com Thu Nov 17 08:03:01 2011 From: nirmalas at aditi.com (Nirmal Kumar A S) Date: Thu, 17 Nov 2011 07:03:01 +0000 Subject: [BangPypers] Selenium with python training In-Reply-To: <5EE08D3060938441AB012CEBE184151744C012DF@INDBLRVMSG01.aditi.tech> References: <5EE08D3060938441AB012CEBE184151744C012DF@INDBLRVMSG01.aditi.tech> Message-ID: <5EE08D3060938441AB012CEBE184151744C01331@INDBLRVMSG01.aditi.tech> Dear all, Good morning. This is Nirmal from Aditi technologies, and looking after a training request on Selenium with python. As I surfed, found your names interesting and suitable. The training need has time constraint. (as early as this weekend). Can you please help us here? Reach me on mails for quick response! Thank you. Regards, Nirmal Kumar A S, 9901405193 From asif.jamadar at rezayat.net Thu Nov 17 08:04:57 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Thu, 17 Nov 2011 07:04:57 +0000 Subject: [BangPypers] Dynamic color for table column (color stored in model) In-Reply-To: References: Message-ID: Sorry my question is not clear. I want to implement the styling (dynamic color ) for reportlab table. From senthil at uthcode.com Thu Nov 17 08:07:44 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Thu, 17 Nov 2011 15:07:44 +0800 Subject: [BangPypers] Selenium with python training In-Reply-To: <5EE08D3060938441AB012CEBE184151744C01331@INDBLRVMSG01.aditi.tech> References: <5EE08D3060938441AB012CEBE184151744C012DF@INDBLRVMSG01.aditi.tech> <5EE08D3060938441AB012CEBE184151744C01331@INDBLRVMSG01.aditi.tech> Message-ID: Are you sure, you found this email list? Never mind, but I think it is good email for someone who is willing to take a training session to contact Nirmal directly. BTW, selenium is web functional testing, more like how user uses the web app. It provides hooks to variety of languages, python being one. Javascript knowledge would be more desirable for selenium than python. Thanks, Senthil On Thu, Nov 17, 2011 at 3:03 PM, Nirmal Kumar A S wrote: > Dear all, > Good morning. > > This is Nirmal from Aditi technologies, and looking after a training request on Selenium with ?python. > As I surfed, found your names interesting and suitable. > > The training need has time constraint. (as early as this weekend). > > Can you please help us here? Reach me on mails for quick response! > > Thank you. > > Regards, > Nirmal Kumar A S, > 9901405193 > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From nirmalas at aditi.com Thu Nov 17 08:10:33 2011 From: nirmalas at aditi.com (Nirmal Kumar A S) Date: Thu, 17 Nov 2011 07:10:33 +0000 Subject: [BangPypers] Selenium with python training In-Reply-To: References: <5EE08D3060938441AB012CEBE184151744C012DF@INDBLRVMSG01.aditi.tech> <5EE08D3060938441AB012CEBE184151744C01331@INDBLRVMSG01.aditi.tech> Message-ID: <5EE08D3060938441AB012CEBE184151744C01355@INDBLRVMSG01.aditi.tech> Hi Senthil, Good morning. Thank you for the redirection. For me, this is a time critical requirement and wanted to have the session as early as this weekend. Regards, Nirmal Kumar A S, 9901405193 -----Original Message----- From: Senthil Kumaran [mailto:senthil at uthcode.com] Sent: Thursday, November 17, 2011 12:38 To: Bangalore Python Users Group - India; Nirmal Kumar A S Subject: Re: [BangPypers] Selenium with python training Are you sure, you found this email list? Never mind, but I think it is good email for someone who is willing to take a training session to contact Nirmal directly. BTW, selenium is web functional testing, more like how user uses the web app. It provides hooks to variety of languages, python being one. Javascript knowledge would be more desirable for selenium than python. Thanks, Senthil On Thu, Nov 17, 2011 at 3:03 PM, Nirmal Kumar A S wrote: > Dear all, > Good morning. > > This is Nirmal from Aditi technologies, and looking after a training request on Selenium with ?python. > As I surfed, found your names interesting and suitable. > > The training need has time constraint. (as early as this weekend). > > Can you please help us here? Reach me on mails for quick response! > > Thank you. > > Regards, > Nirmal Kumar A S, > 9901405193 > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From lawgon at gmail.com Thu Nov 17 08:13:27 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Thu, 17 Nov 2011 12:43:27 +0530 Subject: [BangPypers] Selenium with python training In-Reply-To: References: <5EE08D3060938441AB012CEBE184151744C012DF@INDBLRVMSG01.aditi.tech> <5EE08D3060938441AB012CEBE184151744C01331@INDBLRVMSG01.aditi.tech> Message-ID: <1321514010.7554.19.camel@xlquest.web> On Thu, 2011-11-17 at 15:07 +0800, Senthil Kumaran wrote: > BTW, selenium is web functional testing, more like how user uses the > web app. It provides hooks to variety of languages, python being one. > Javascript knowledge would be more desirable for selenium than > python. javascript? not java? -- regards Kenneth Gonsalves From gora at mimirtech.com Thu Nov 17 10:51:39 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Thu, 17 Nov 2011 15:21:39 +0530 Subject: [BangPypers] Dynamic color for table column (color stored in model) In-Reply-To: References: Message-ID: On Thu, Nov 17, 2011 at 7:03 AM, kracekumar ramaraju wrote: [...] > One advice is use css to set colors.In your template check for color value > ="red" and then render css for that colour, else if you are using only 2 > colour you can ?even and odd property. [...] Reportlab generates PDF, which is presumably served to the user from a Django view. I do not think that CSS can be used here. Asif, have you looked at the reportlab documentation? You should be able to use BACKGROUND, and TEXTCOLOR to set the colours, choosing the appropriate colour from a model field. Please see chapter 7 of the Reportlab user guide: http://www.reportlab.com/docs/reportlab-userguide.pdf This blog might also help: http://www.blog.pythonlibrary.org/2010/09/21/reportlab-tables-creating-tables-in-pdfs-with-python/ It is the first result from searching Google for +reportlab +tables. Regards, Gora From Nikunj.Badjatya at emc.com Thu Nov 17 11:50:23 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Thu, 17 Nov 2011 05:50:23 -0500 Subject: [BangPypers] ProgressBar - Python and Powershell Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D186@MX34A.corp.emc.com> Hi All, I am using Python 2.7, windows Env. I have an Installer written in Python(45%) and Powershell(55%) which is used to install Virtual Machines at specific locations. It is single threaded. I am trying to implement a ProgressBar for this installer. So that the user will come to know the progress of the installation. I am using pypi progressbar module. The top script is in python which inturns calls powershell scripts using subprocess.call() and proceeds with the installation. I am taking a shared file between python and powershell, so that diff functions can update their %age completion level in to the file. Ex. Func1() updates it to 5%, func2() will add its own 5% to it.. and so on. At the start of the (main.py) script I am creating a thread whose sole purpose would be to keep "READ" a temp file for a new entry in it. Based on this entry I can have my thread update the progressbar on the console. My questions are: 1. Can I have a better shared mechanism between python and powershell.? As I am using a file here. Reading + writing in python and writing only in powershell. ! 2. Does this thread mechanism work.? I am yet to implement and test it.! :P What can be the possible shortfalls.? Thanks Nikunj Bangalore - India From benignbala at gmail.com Thu Nov 17 12:17:06 2011 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Thu, 17 Nov 2011 16:47:06 +0530 Subject: [BangPypers] Parsing and updating XML files with python Message-ID: Hi, I have to parse an xml file, get to a spefic node, and set it to a different value and write it back to the file. What is the best way to do it ? The xml file can be a few hundred lines(with proper formatting). For parsing, I use lxml with xpath. I am doing something like this. from lxml import etree <---Open the XML file etc.---> p_data = etree.parse(xml_data) I use xpath like p.xpath(/foo/bar[@id=xyz]) But I don't really know how to update an entry and write it back to the xml file ? Can someone suggest some ways please ? Also, it is necessary that it should be XPath based. Thanks -- Thank you Balachandran Sivakumar Arise Awake and stop not till the goal is reached. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?- Swami Vivekananda Mail: benignbala at gmail.com Blog: http://benignbala.wordpress.com/ From gora at mimirtech.com Thu Nov 17 14:57:34 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Thu, 17 Nov 2011 19:27:34 +0530 Subject: [BangPypers] Parsing and updating XML files with python In-Reply-To: References: Message-ID: On Thu, Nov 17, 2011 at 4:47 PM, Balachandran Sivakumar wrote: > Hi, > > ? ? ? ? ? ? I have to parse an xml file, get to a spefic node, and > set it to a different value and write it back to the file. What is the > best way to do it ? The xml file can be a few hundred lines(with > proper formatting). [...] > But I don't really know how to update an entry and write it back to > the xml file ? Can someone suggest some ways please ? Also, it is > necessary that it should be XPath based. Thanks [...] To update an element, just assign a value to it, e.g., myelem.text = "New value" You can then save the modified XML to a new file. Please see http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/modifying.html That same tutorial, http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/index.html , also describes various ways of addressing elements. This is also a useful tutorial: http://lxml.de/tutorial.html Regards, Gora From abhilash.pin2 at gmail.com Fri Nov 18 03:46:12 2011 From: abhilash.pin2 at gmail.com (=?UTF-8?B?YcOfbOC5gM6vbM6xc2zguYA=?=) Date: Fri, 18 Nov 2011 08:16:12 +0530 Subject: [BangPypers] python to work with DPX image file Message-ID: Hello Friends, Can any one please let me know how to get the height and width of a .dpx format image? Any python module that can work with dpx file format? Thanks, -- a?l??l?sl? From benignbala at gmail.com Fri Nov 18 07:27:32 2011 From: benignbala at gmail.com (Balachandran Sivakumar) Date: Fri, 18 Nov 2011 11:57:32 +0530 Subject: [BangPypers] Parsing and updating XML files with python In-Reply-To: References: Message-ID: Hi, On Thu, Nov 17, 2011 at 7:27 PM, Gora Mohanty wrote: > On Thu, Nov 17, 2011 at 4:47 PM, Balachandran Sivakumar > wrote: > > To update an element, just assign a value to it, e.g., > ?myelem.text = "New value" > You can then save the modified XML to a new file. > Please see http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/modifying.html > Thanks for the info and the link. > That same tutorial, > http://infohost.nmt.edu/tcc/help/pubs/pylxml/web/index.html , > ?also describes various ways of addressing elements. This is also a useful > tutorial: http://lxml.de/tutorial.html > I used the lxml.de tutorial in that link. But was not aware the it gets updated in place. So, was expecting some method to do that :( Thanks -- Thank you Balachandran Sivakumar Arise Awake and stop not till the goal is reached. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?- Swami Vivekananda Mail: benignbala at gmail.com Blog: http://benignbala.wordpress.com/ From bhuvan.thaker at gmail.com Fri Nov 18 14:29:59 2011 From: bhuvan.thaker at gmail.com (bhuvan thaker) Date: Fri, 18 Nov 2011 18:59:59 +0530 Subject: [BangPypers] Hello // Intro Message-ID: Hello Everyone, I came across your group via Python.org. I have a query regarding application development. // I do not have a technology/engineering background and hence this questions. Please advice.. + What programming language is most suitable for web 2.0 kind of application development. This is in the context of time taken to build app + less problematic + platform neutral. + And what about those mentioned above working on smartPhones as well (Apple, android, windows, nokia) apart from working awesomely on PC/MAC *About me:* ** I have a background in Brand development and Marketing and business building across different industry sectors. Looking forward to being frnds with few talented one from this group. Thank you and awaiting your replies. Bhuvan // 9880183503 // Bangalore I create brand // http://t2c.posterous.com From Nikunj.Badjatya at emc.com Fri Nov 18 14:53:25 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Fri, 18 Nov 2011 08:53:25 -0500 Subject: [BangPypers] "continue" in "try..except" Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> Hi , Please look at the below code snippet: {{{ if __name__ == "__main__": try: main() except KeyboardInterrupt: print("\nKeyboard interrupt from the user !!") ret = input("Want to abort the installation ?[y/n]: ") while True: if ret == "y": sys.exit(0) elif ret == "n": ## Want to continue the main() where it left of. else: print("Please enter either y/n") continue }}} In the "elif" block. I want to have a provision wherein "main()" would continue its execution where it left off. How can this be done.? Thanks Nikunj From lawgon at gmail.com Sat Nov 19 03:13:46 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Sat, 19 Nov 2011 07:43:46 +0530 Subject: [BangPypers] Hello // Intro In-Reply-To: References: Message-ID: <1321668834.7554.37.camel@xlquest.web> On Fri, 2011-11-18 at 18:59 +0530, bhuvan thaker wrote: > + What programming language is most suitable for web 2.0 kind of > application development. > This is in the context of time taken to build app + less problematic + > platform neutral. errm ... a wild guess - python? -- regards Kenneth Gonsalves From noufal at gmail.com Sat Nov 19 03:57:41 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Sat, 19 Nov 2011 08:27:41 +0530 Subject: [BangPypers] Hello // Intro In-Reply-To: (bhuvan thaker's message of "Fri, 18 Nov 2011 18:59:59 +0530") References: Message-ID: <87y5vcg6oq.fsf@sanitarium.localdomain> bhuvan thaker writes: > Hello Everyone, > > I came across your group via Python.org. > I have a query regarding application development. // I do not have a > technology/engineering background and hence this questions. > > Please advice.. > > + What programming language is most suitable for web 2.0 kind of > application development. Web app development is commoditised. It's possible to do it using any modern language and they're all roughly equal in terms of "power". They have different strengths and weaknesses and you should consider non tech. factors like your team etc. > This is in the context of time taken to build app + less problematic + > platform neutral. Same as above. > + And what about those mentioned above working on smartPhones as > well (Apple, android, windows, nokia) apart from working awesomely on > PC/MAC If it's a web app, you just need to make sure that it will on a mobile device. If you *do* decide to use Python, this is a good group to ask questions. [...] -- ~noufal http://nibrahim.net.in Thank God I'm an atheist. From arunkumarjigajinni at gmail.com Sat Nov 19 15:29:32 2011 From: arunkumarjigajinni at gmail.com (Arunkumar Jigajinni) Date: Sat, 19 Nov 2011 19:59:32 +0530 Subject: [BangPypers] Pexpect Message-ID: Hi All, I would like to know whether Pexpect is supported on windows. If anybody has used it, Can you share some info? Regards and Thanks, Arun From gora at mimirtech.com Sat Nov 19 15:52:51 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Sat, 19 Nov 2011 20:22:51 +0530 Subject: [BangPypers] Pexpect In-Reply-To: References: Message-ID: On Sat, Nov 19, 2011 at 7:59 PM, Arunkumar Jigajinni wrote: > Hi All, > > I would like to know whether Pexpect is supported on windows. Did you try searching Google? The very first result for +pexpect +windows, and many others, answer your question. > If anybody has used it, Can you share some info? When forced to use Windows, I have used it for simple things with Cygwin, and it works. Regards, Gora From nikunjbadjatya at gmail.com Sat Nov 19 16:01:28 2011 From: nikunjbadjatya at gmail.com (Nikunj Badjatya) Date: Sat, 19 Nov 2011 20:31:28 +0530 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> References: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> Message-ID: Can someone throw some light on this please. On Fri, Nov 18, 2011 at 7:23 PM, wrote: > Hi , > > Please look at the below code snippet: > > {{{ > > if __name__ == "__main__": > try: > main() > except KeyboardInterrupt: > print("\nKeyboard interrupt from the user !!") > ret = input("Want to abort the installation ?[y/n]: ") > while True: > if ret == "y": > sys.exit(0) > elif ret == "n": > ## Want to continue the main() where it left of. > else: > ret = input("Please enter either y/n : ") > continue > > }}} > > In the "elif" block. I want to have a provision wherein "main()" would > continue its execution where it left off. > How can this be done.? > > Thanks > Nikunj > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From varunarang at gmail.com Sat Nov 19 16:32:34 2011 From: varunarang at gmail.com (Varun Narang) Date: Sat, 19 Nov 2011 21:02:34 +0530 Subject: [BangPypers] BangPypers Digest, Vol 51, Issue 30 In-Reply-To: References: Message-ID: here's a good place to look at the BIG picture: http://www.makeuseof.com/tag/programming-language-learn-web-programming/ -- Best, Varun Narang. 2 is not equal to 3, not even for large values of 2. - Grabel's Law From navin.kabra at gmail.com Sun Nov 20 04:25:51 2011 From: navin.kabra at gmail.com (Navin Kabra) Date: Sun, 20 Nov 2011 08:55:51 +0530 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: References: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> Message-ID: On Sat, Nov 19, 2011 at 8:31 PM, Nikunj Badjatya wrote: > Can someone throw some light on this please. > If I understand right, this is what you want to do: Somewhere deep inside the "main" function, an exception is thrown. In the exception handler, if some condition is true, you want to say, "no, no, don't worry about the exception. please continue execution of main from the line after the exception". I don't think this can be done in python. You'll need to restructure your code instead. On Fri, Nov 18, 2011 at 7:23 PM, wrote: > Hi , > > Please look at the below code snippet: > > {{{ > > if __name__ == "__main__": > try: > main() > except KeyboardInterrupt: > print("\nKeyboard interrupt from the user !!") > ret = input("Want to abort the installation ?[y/n]: ") > while True: > if ret == "y": > sys.exit(0) > elif ret == "n": > ## Want to continue the main() where it left of. > else: > > ret = input("Please enter either y/n : ") > > continue > > > > }}} > > > > In the "elif" block. I want to have a provision wherein "main()" would > > continue its execution where it left off. > > How can this be done.? > > > > Thanks > > Nikunj > > > > > > _______________________________________________ > > 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 naikvin at gmail.com Sun Nov 20 06:43:58 2011 From: naikvin at gmail.com (Vineet Naik) Date: Sun, 20 Nov 2011 11:13:58 +0530 Subject: [BangPypers] To use Pinax or just Django Message-ID: Hi, I am considering Pinax/Django for a new project. When I came across Pinax, I initially liked it but after installing it locally and evaluating it for the project's requirement, I feel that most of the "apps" that come with it may not work for the project as they are, and would require some amount of customization. I am confused whether to use Pinax or just Django. my main concerns about Pinax are - 1) It supports Django ver 1.xx whereas current stable Django is at 1.3 and the apps are also not quite upto-date 2) Code for the "ready" apps lies inside the Pinax project and there is no way to override their behaviour for a certain project only. ie. either the code inside Pinax directory will have to be modified or the app will have to be copied inside the project (and renamed to avoid conflict if I am not wrong ?) 3) Modifying the default theme looks like some work One thing in Pinax that would be helpful is the "Group" and "Group Aware" Apps - [http://pinaxproject.com/docs/dev/groups/] My experience with Django itself is very limited in the first place, never having used it in production. My background is mostly web development using PHP & Java, although I am quite comfortable with writing python scripts involving file system operations, web scraping etc. What do you suggest, Pinax or just Django ? Please share your experiences with Pinax. Thanks, vineet -- Vineet Naik From navin.kabra at gmail.com Sun Nov 20 07:29:14 2011 From: navin.kabra at gmail.com (Navin Kabra) Date: Sun, 20 Nov 2011 11:59:14 +0530 Subject: [BangPypers] To use Pinax or just Django In-Reply-To: References: Message-ID: On Sun, Nov 20, 2011 at 11:13 AM, Vineet Naik wrote: > I am confused whether to use Pinax or just Django. > I've done 3 non-trivial django projects in the last 3 years. I used pinax for 1 and plain django for the remaining. I would suggest going with plain django. - I think Pinax is not "production" ready. As you've already realized, pinax needs to be customized before it can really used, and there aren't enough readymade customization hooks (like django has). So you need to make changes in Pinax code. This is a nightmare as far as upgrades is concerned - Pinax is a great project to get best practices for how to set up your project. By all means, study the pinax code and copy-paste from there into your project - Incorporate individual apps from Pinax into your project. This is less painful for upgrades and customization, compared to taking all of Pinax From Nikunj.Badjatya at emc.com Sun Nov 20 10:18:16 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Sun, 20 Nov 2011 04:18:16 -0500 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: References: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D350@MX34A.corp.emc.com> Hi Navin, Thanks for replying. Yes your understanding is correct. Are you 100% certain that this mechanism is not available in Python.? I think this is very generic usecase of exception handling. !? Thanks Nikunj -----Original Message----- From: bangpypers-bounces+nikunj.badjatya=emc.com at python.org [mailto:bangpypers-bounces+nikunj.badjatya=emc.com at python.org] On Behalf Of Navin Kabra Sent: Sunday, November 20, 2011 8:56 AM To: Bangalore Python Users Group - India Subject: Re: [BangPypers] "continue" in "try..except" On Sat, Nov 19, 2011 at 8:31 PM, Nikunj Badjatya wrote: > Can someone throw some light on this please. > If I understand right, this is what you want to do: Somewhere deep inside the "main" function, an exception is thrown. In the exception handler, if some condition is true, you want to say, "no, no, don't worry about the exception. please continue execution of main from the line after the exception". I don't think this can be done in python. You'll need to restructure your code instead. On Fri, Nov 18, 2011 at 7:23 PM, wrote: > Hi , > > Please look at the below code snippet: > > {{{ > > if __name__ == "__main__": > try: > main() > except KeyboardInterrupt: > print("\nKeyboard interrupt from the user !!") > ret = input("Want to abort the installation ?[y/n]: ") > while True: > if ret == "y": > sys.exit(0) > elif ret == "n": > ## Want to continue the main() where it left of. > else: > > ret = input("Please enter either y/n : ") > > continue > > > > }}} > > > > In the "elif" block. I want to have a provision wherein "main()" would > > continue its execution where it left off. > > How can this be done.? > > > > Thanks > > Nikunj > > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From navin.kabra at gmail.com Sun Nov 20 11:54:08 2011 From: navin.kabra at gmail.com (Navin Kabra) Date: Sun, 20 Nov 2011 16:24:08 +0530 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: <599CEBACD49B4144A61212D837EE3C0F144604D350@MX34A.corp.emc.com> References: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> <599CEBACD49B4144A61212D837EE3C0F144604D350@MX34A.corp.emc.com> Message-ID: On Sun, Nov 20, 2011 at 2:48 PM, wrote: > Are you 100% certain that this mechanism is not available in Python.? > I think this is very generic usecase of exception handling. !? > While I'm not 100% certain that this is not available in Python, I am 100% certain that this is not a "generic usecase of exception handling". Can you give examples in other languages? From noufal at gmail.com Sun Nov 20 12:11:10 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Sun, 20 Nov 2011 16:41:10 +0530 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> (Nikunj Badjatya's message of "Fri, 18 Nov 2011 08:53:25 -0500") References: <599CEBACD49B4144A61212D837EE3C0F144604D2C2@MX34A.corp.emc.com> Message-ID: <87obw7dp69.fsf@sanitarium.localdomain> writes: > Hi , > > Please look at the below code snippet: > > {{{ > > if __name__ == "__main__": > try: > main() > except KeyboardInterrupt: [...] KeyboardInterrupt is an exception that SIGINT(2) is translated into by the interpreter. If you want to handle a ctrl C, use the signal module and create a handler that will do what you need rather than rely on an exception which is only for "exceptional" things. In your case, a SIGINT is part of the workflow. Navin's suggestion to restructure your code is correct. This is not an idiomatic way to use exceptions. Following is a suggestion (untested) import sys import signal def user_interrupt_handler(sig, frame): if raw_input() == "y": sys.exit(-1) def main(): signal.signal(signal.SIGINT, user_interrupt_handler) do_install() if __name__ == __main__: try: main() # Successful except Exception: perform_cleanup() # Errors [...] -- ~noufal http://nibrahim.net.in Cum tacent, clamant. When they are silent, they shout. -Cicero From phil.nabble at hanjinet.org Sun Nov 20 14:54:55 2011 From: phil.nabble at hanjinet.org (Philippe May) Date: Sun, 20 Nov 2011 19:24:55 +0530 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: References: Message-ID: Resuming the execution in an except clause seems unclean and unlikely. What about the context? Where in the stack to resume? This would lead to more problems than anything else. Here i think we are basically not dealing with exceptions but signals, and this might work as expected: import signal def signal_handler(signal_number, frame): ret = raw_input('Really abort? (y/n) ') if ret == 'y': print('Committing Hara Kiri') sys.exit(0) ## Install the signal handler: signal.signal(signal.SIGINT, signal_handler) Philippe > From: Navin Kabra >> >> On Sun, Nov 20, 2011 at 2:48 PM, wrote: >> >>> Are you 100% certain that this mechanism is not available in Python.? >>> I think this is very generic usecase of exception handling. !? >>> >> >> While I'm not 100% certain that this is not available in Python, I am 100% >> certain that this is not a "generic usecase of exception handling". Can you >> give examples in other languages? >> From naikvin at gmail.com Sun Nov 20 15:26:02 2011 From: naikvin at gmail.com (Vineet Naik) Date: Sun, 20 Nov 2011 19:56:02 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: Message-ID: Thank you Navin. Liked the idea of using pinax code for reference. vineet On Sun, Nov 20, 2011 at 11:59 AM, Navin Kabra wrote: > On Sun, Nov 20, 2011 at 11:13 AM, Vineet Naik wrote: > >> I am confused whether to use Pinax or just Django. >> > > I've done 3 non-trivial django projects in the last 3 years. I used pinax > for 1 and plain django for the remaining. I would suggest going with plain > django. > > - I think Pinax is not "production" ready. As you've already realized, > pinax needs to be customized before it can really used, and there aren't > enough readymade customization hooks (like django has). So you need to make > changes in Pinax code. This is a nightmare as far as upgrades is concerned > > - Pinax is a great project to get best practices for how to set up your > project. By all means, study the pinax code and copy-paste from there into > your project > > - Incorporate individual apps from Pinax into your project. This is less > painful for upgrades and customization, compared to taking all of Pinax > > > -- > You received this message because you are subscribed to the Google Groups > "Python Pune" group. > To post to this group, send email to pythonpune at googlegroups.com. > To unsubscribe from this group, send email to > pythonpune+unsubscribe at googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/pythonpune?hl=en. > -- Vineet Naik From madhav.bnk at gmail.com Mon Nov 21 02:05:36 2011 From: madhav.bnk at gmail.com (B.Nanda Kishore) Date: Mon, 21 Nov 2011 06:35:36 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: Message-ID: I also suggest using Pinax as a reference sake only. I had to use Pinax for one of the projects a few months back and God! I really hated the integrations, coupling and overriding. Then I started using Pinax for reference sake only and started using/copying the best things in Pinax into my project code and life is simpler again. useful references: http://stackoverflow.com/questions/1448292/what-are-the-best-benefits-of-using-pinax http://www.quora.com/Python-Web-Frameworks/Is-Pinax-for-Django-any-good?q=pinax Regards, Nandakishore On Sun, Nov 20, 2011 at 7:56 PM, Vineet Naik wrote: > Thank you Navin. Liked the idea of using pinax code for reference. > > vineet > > On Sun, Nov 20, 2011 at 11:59 AM, Navin Kabra > wrote: > > > On Sun, Nov 20, 2011 at 11:13 AM, Vineet Naik wrote: > > > >> I am confused whether to use Pinax or just Django. > >> > > > > I've done 3 non-trivial django projects in the last 3 years. I used pinax > > for 1 and plain django for the remaining. I would suggest going with > plain > > django. > > > > - I think Pinax is not "production" ready. As you've already realized, > > pinax needs to be customized before it can really used, and there aren't > > enough readymade customization hooks (like django has). So you need to > make > > changes in Pinax code. This is a nightmare as far as upgrades is > concerned > > > > - Pinax is a great project to get best practices for how to set up your > > project. By all means, study the pinax code and copy-paste from there > into > > your project > > > > - Incorporate individual apps from Pinax into your project. This is less > > painful for upgrades and customization, compared to taking all of Pinax > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Python Pune" group. > > To post to this group, send email to pythonpune at googlegroups.com. > > To unsubscribe from this group, send email to > > pythonpune+unsubscribe at googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/pythonpune?hl=en. > > > > > > -- > Vineet Naik > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From ramdaz at gmail.com Mon Nov 21 02:36:45 2011 From: ramdaz at gmail.com (Ramdas S) Date: Mon, 21 Nov 2011 07:06:45 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: Message-ID: I wo On Mon, Nov 21, 2011 at 6:35 AM, B.Nanda Kishore wrote: > I also suggest using Pinax as a reference sake only. I had to use Pinax for > one of the projects > a few months back and God! I really hated the integrations, coupling and > overriding. Then I started > using Pinax for reference sake only and started using/copying the best > things in Pinax into my > project code and life is simpler again. > > useful references: > http://stackoverflow.com/questions/1448292/what-are-the-best-benefits-of-using-pinax > http://www.quora.com/Python-Web-Frameworks/Is-Pinax-for-Django-any-good?q=pinax > > Regards, > Nandakishore > I wont recommend Pinax if you are looking for something that needs to be tweaked. It's a pain as the project size grows > > On Sun, Nov 20, 2011 at 7:56 PM, Vineet Naik wrote: > >> Thank you Navin. Liked the idea of using pinax code for reference. >> >> vineet >> >> On Sun, Nov 20, 2011 at 11:59 AM, Navin Kabra >> wrote: >> >> > On Sun, Nov 20, 2011 at 11:13 AM, Vineet Naik wrote: >> > >> >> I am confused whether to use Pinax or just Django. >> >> >> > >> > I've done 3 non-trivial django projects in the last 3 years. I used pinax >> > for 1 and plain django for the remaining. I would suggest going with >> plain >> > django. >> > >> > - I think Pinax is not "production" ready. As you've already realized, >> > pinax needs to be customized before it can really used, and there aren't >> > enough readymade customization hooks (like django has). So you need to >> make >> > changes in Pinax code. This is a nightmare as far as upgrades is >> concerned >> > >> > - Pinax is a great project to get best practices for how to set up your >> > project. By all means, study the pinax code and copy-paste from there >> into >> > your project >> > >> > - Incorporate individual apps from Pinax into your project. This is less >> > painful for upgrades and customization, compared to taking all of Pinax >> > >> > >> > ?-- >> > You received this message because you are subscribed to the Google Groups >> > "Python Pune" group. >> > To post to this group, send email to pythonpune at googlegroups.com. >> > To unsubscribe from this group, send email to >> > pythonpune+unsubscribe at googlegroups.com. >> > For more options, visit this group at >> > http://groups.google.com/group/pythonpune?hl=en. >> > >> >> >> >> -- >> Vineet Naik >> _______________________________________________ >> 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 > -- Ramdas S +91 9342 583 065 From asif.jamadar at rezayat.net Mon Nov 21 05:17:40 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Mon, 21 Nov 2011 04:17:40 +0000 Subject: [BangPypers] Transmeta in django is not working with mysql Message-ID: In one of my django application I'm using transmeta for switching between the languages. This transmeta is not working when I use my application with mysql, but if I use the same source code with sqlite transmeta will work perfectly. So what may be the cause with mysql? Thanks in advance Regards Asif From lawgon at gmail.com Mon Nov 21 06:44:43 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Mon, 21 Nov 2011 11:14:43 +0530 Subject: [BangPypers] Transmeta in django is not working with mysql In-Reply-To: References: Message-ID: <1321854286.7554.70.camel@xlquest.web> On Mon, 2011-11-21 at 04:17 +0000, Asif Jamadar wrote: > In one of my django application I'm using transmeta for switching > between the languages. This transmeta is not working when I use my > application with mysql, but if I use the same source code with sqlite > transmeta will work perfectly. So what may be the cause with mysql? > Thanks in advance looks like the project is dead. No updates since mid march 2011. It breaks with versions later than that. I am moving to django-modeltranslation. -- regards Kenneth Gonsalves From noufal at gmail.com Mon Nov 21 07:14:10 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 21 Nov 2011 11:44:10 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: Message-ID: I wouldn't recommend Django either. My experience is that it's too hard to mix and match and prefer a lighter framework like flask. On 11/21/11, Ramdas S wrote: > I wo > > On Mon, Nov 21, 2011 at 6:35 AM, B.Nanda Kishore > wrote: >> I also suggest using Pinax as a reference sake only. I had to use Pinax >> for >> one of the projects >> a few months back and God! I really hated the integrations, coupling and >> overriding. Then I started >> using Pinax for reference sake only and started using/copying the best >> things in Pinax into my >> project code and life is simpler again. >> >> useful references: >> http://stackoverflow.com/questions/1448292/what-are-the-best-benefits-of-using-pinax >> http://www.quora.com/Python-Web-Frameworks/Is-Pinax-for-Django-any-good?q=pinax >> >> Regards, >> Nandakishore >> > > I wont recommend Pinax if you are looking for something that needs > to be tweaked. It's a pain as the project size grows >> >> On Sun, Nov 20, 2011 at 7:56 PM, Vineet Naik wrote: >> >>> Thank you Navin. Liked the idea of using pinax code for reference. >>> >>> vineet >>> >>> On Sun, Nov 20, 2011 at 11:59 AM, Navin Kabra >>> wrote: >>> >>> > On Sun, Nov 20, 2011 at 11:13 AM, Vineet Naik >>> > wrote: >>> > >>> >> I am confused whether to use Pinax or just Django. >>> >> >>> > >>> > I've done 3 non-trivial django projects in the last 3 years. I used >>> > pinax >>> > for 1 and plain django for the remaining. I would suggest going with >>> plain >>> > django. >>> > >>> > - I think Pinax is not "production" ready. As you've already realized, >>> > pinax needs to be customized before it can really used, and there >>> > aren't >>> > enough readymade customization hooks (like django has). So you need to >>> make >>> > changes in Pinax code. This is a nightmare as far as upgrades is >>> concerned >>> > >>> > - Pinax is a great project to get best practices for how to set up your >>> > project. By all means, study the pinax code and copy-paste from there >>> into >>> > your project >>> > >>> > - Incorporate individual apps from Pinax into your project. This is >>> > less >>> > painful for upgrades and customization, compared to taking all of Pinax >>> > >>> > >>> > ?-- >>> > You received this message because you are subscribed to the Google >>> > Groups >>> > "Python Pune" group. >>> > To post to this group, send email to pythonpune at googlegroups.com. >>> > To unsubscribe from this group, send email to >>> > pythonpune+unsubscribe at googlegroups.com. >>> > For more options, visit this group at >>> > http://groups.google.com/group/pythonpune?hl=en. >>> > >>> >>> >>> >>> -- >>> Vineet Naik >>> _______________________________________________ >>> 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 >> > > > > -- > Ramdas S > +91 9342 583 065 > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- ~noufal http://nibrahim.net.in From asif.jamadar at rezayat.net Mon Nov 21 07:23:47 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Mon, 21 Nov 2011 06:23:47 +0000 Subject: [BangPypers] Transmeta in django is not working with mysql In-Reply-To: <1321854286.7554.70.camel@xlquest.web> References: <1321854286.7554.70.camel@xlquest.web> Message-ID: If i run my source code using django 1.3 & python 2.6 on ubuntu, transmeta is not working. But If i run the same code using django 1.2.1 & python 2.7 on windows transmeta is working. Now is this python version issue? or django version issue? Or apache configuration issue on ubuntu From lawgon at gmail.com Mon Nov 21 07:30:50 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Mon, 21 Nov 2011 12:00:50 +0530 Subject: [BangPypers] Transmeta in django is not working with mysql In-Reply-To: References: <1321854286.7554.70.camel@xlquest.web> Message-ID: <1321857053.7554.76.camel@xlquest.web> On Mon, 2011-11-21 at 06:23 +0000, Asif Jamadar wrote: > If i run my source code using django 1.3 & python 2.6 on ubuntu, > transmeta is not working. > > But If i run the same code using django 1.2.1 & python 2.7 on windows > transmeta is working. > > Now is this python version issue? or django version issue? Or apache > configuration issue on ubuntu as I said transmeta project is not maintained nowadays and does not work with the latest versions of django. -- regards Kenneth Gonsalves From naikvin at gmail.com Mon Nov 21 07:48:56 2011 From: naikvin at gmail.com (Vineet Naik) Date: Mon, 21 Nov 2011 12:18:56 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: Message-ID: Hi Noufal, What do you mean by "it's too hard to mix and match". Frankly, I have not tried any other python web framework besides django. But my initial impression of Django is that it is far ahead of the choices available in PHP. Plus there is the admin app, template inheritance and how it takes care of everything while running unit test on models. will flask be suitable for a fairly big project with complex Acl and stuff like that. On Mon, Nov 21, 2011 at 11:44 AM, Noufal Ibrahim wrote: > I wouldn't recommend Django either. My experience is that it's too > hard to mix and match and prefer a lighter framework like flask. > > On 11/21/11, Ramdas S wrote: > > I wo > > > > On Mon, Nov 21, 2011 at 6:35 AM, B.Nanda Kishore > > wrote: > >> I also suggest using Pinax as a reference sake only. I had to use Pinax > >> for > >> one of the projects > >> a few months back and God! I really hated the integrations, coupling and > >> overriding. Then I started > >> using Pinax for reference sake only and started using/copying the best > >> things in Pinax into my > >> project code and life is simpler again. > >> > >> useful references: > >> > http://stackoverflow.com/questions/1448292/what-are-the-best-benefits-of-using-pinax > >> > http://www.quora.com/Python-Web-Frameworks/Is-Pinax-for-Django-any-good?q=pinax > >> > >> Regards, > >> Nandakishore > >> > > > > I wont recommend Pinax if you are looking for something that needs > > to be tweaked. It's a pain as the project size grows > >> > >> On Sun, Nov 20, 2011 at 7:56 PM, Vineet Naik wrote: > >> > >>> Thank you Navin. Liked the idea of using pinax code for reference. > >>> > >>> vineet > >>> > >>> On Sun, Nov 20, 2011 at 11:59 AM, Navin Kabra > >>> wrote: > >>> > >>> > On Sun, Nov 20, 2011 at 11:13 AM, Vineet Naik > >>> > wrote: > >>> > > >>> >> I am confused whether to use Pinax or just Django. > >>> >> > >>> > > >>> > I've done 3 non-trivial django projects in the last 3 years. I used > >>> > pinax > >>> > for 1 and plain django for the remaining. I would suggest going with > >>> plain > >>> > django. > >>> > > >>> > - I think Pinax is not "production" ready. As you've already > realized, > >>> > pinax needs to be customized before it can really used, and there > >>> > aren't > >>> > enough readymade customization hooks (like django has). So you need > to > >>> make > >>> > changes in Pinax code. This is a nightmare as far as upgrades is > >>> concerned > >>> > > >>> > - Pinax is a great project to get best practices for how to set up > your > >>> > project. By all means, study the pinax code and copy-paste from there > >>> into > >>> > your project > >>> > > >>> > - Incorporate individual apps from Pinax into your project. This is > >>> > less > >>> > painful for upgrades and customization, compared to taking all of > Pinax > >>> > > >>> > > >>> > -- > >>> > You received this message because you are subscribed to the Google > >>> > Groups > >>> > "Python Pune" group. > >>> > To post to this group, send email to pythonpune at googlegroups.com. > >>> > To unsubscribe from this group, send email to > >>> > pythonpune+unsubscribe at googlegroups.com. > >>> > For more options, visit this group at > >>> > http://groups.google.com/group/pythonpune?hl=en. > >>> > > >>> > >>> > >>> > >>> -- > >>> Vineet Naik > >>> _______________________________________________ > >>> 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 > >> > > > > > > > > -- > > Ramdas S > > +91 9342 583 065 > > _______________________________________________ > > BangPypers mailing list > > BangPypers at python.org > > http://mail.python.org/mailman/listinfo/bangpypers > > > > > -- > ~noufal > http://nibrahim.net.in > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- Vineet Naik From sajuptpm at gmail.com Mon Nov 21 08:01:48 2011 From: sajuptpm at gmail.com (Saju M) Date: Mon, 21 Nov 2011 12:31:48 +0530 Subject: [BangPypers] howto Sqlalchemy atomic transaction ?? Message-ID: Hi, http://dpaste.com/659618/ From noufal at gmail.com Mon Nov 21 09:10:05 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 21 Nov 2011 13:40:05 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: (Vineet Naik's message of "Mon, 21 Nov 2011 12:18:56 +0530") References: Message-ID: <87vcqddhgi.fsf@sanitarium.localdomain> Vineet Naik writes: > Hi Noufal, > > What do you mean by "it's too hard to mix and match". I've done only one non trivial project with Django and my impression was that you are bound to do everything the Django way. You cannot select the ORM, templating engine etc. and expect the rest of the things to work as smoothly as before. The Django components are high quality, there's s super supportive large community around it and it's got excellent documentation so this is not that much of a problem (atleast for popular components) but I don't like frameworks making decisions for me. Also, some parts are opaque and I like to know what's going on inside. This is especially necessary when you're in your last 10%. > Frankly, I have not tried any other python web framework besides > django. But my initial impression of Django is that it is far ahead > of the choices available in PHP. Plus there is the admin app, template > inheritance and how it takes care of everything while running unit > test on models. If you're doing everything which the core team has thought of in the way they want to do it, well and good. If you want to do something differently, there's a good chance you'll hit a wall. > will flask be suitable for a fairly big project with complex Acl and > stuff like that. I see no reason why not. It's got a fairly large community around it and there are lots of plugins and things. Chances are that someone else had the same problem as you (since most web apps are commoditised these days) and has solved it. [...] -- ~noufal http://nibrahim.net.in Hegel was right when he said that we learn from history that man can never learn anything from history. -George Bernard Shaw From navin.kabra at gmail.com Mon Nov 21 09:42:25 2011 From: navin.kabra at gmail.com (Navin Kabra) Date: Mon, 21 Nov 2011 14:12:25 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: <87vcqddhgi.fsf@sanitarium.localdomain> References: <87vcqddhgi.fsf@sanitarium.localdomain> Message-ID: I have a different perspective. I think Django is a good choice, especially if you don't know what you want. On Mon, Nov 21, 2011 at 1:40 PM, Noufal Ibrahim wrote: > I've done only one non trivial project with Django and my impression was > that you are bound to do everything the Django way. You cannot select > the ORM, templating engine etc. and expect the rest of the things to > work as smoothly as before. > Maybe because none of my projects have had "extreme" requirements, I am happy to go with Django as far as the core components - i.e. I've not felt the need to go out and get a different ORM or Templating Engine or user management module. For the other requirements (like tagging, social authentication, autocomplete) I've been very happy with how easy it is to find existing third party apps to do, and also how easy ti is to extend django with your own mechanisms of doing thing. And, all of that has been possible without having to modify any django code (unlike Pinax). > Also, some parts are opaque and I > like to know what's going on inside. I've found Django code to be very accessible - so a few minutes spent reading the code has always been good enough for me to understand what's going on; so I don't agree with the opaque comment. If you're doing everything which the core team has thought of in the way > they want to do it, well and good. If you want to do something > differently, there's a good chance you'll hit a wall. > I think this statement is a bit too strong. Yes, you will run into problems if you're replacing something as fundamental as the ORM or template langauge or forms or user management. But for other things, Django is surprisingly flexible. If you're using signals, context_processors, middleware, and other things smartly, django definitely does not give the impression that "you have to do everything in the way the core teham wants to do it". From lawgon at gmail.com Mon Nov 21 10:38:13 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Mon, 21 Nov 2011 15:08:13 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: <87vcqddhgi.fsf@sanitarium.localdomain> Message-ID: <1321868297.7554.85.camel@xlquest.web> On Mon, 2011-11-21 at 14:12 +0530, Navin Kabra wrote: > I think this statement is a bit too strong. Yes, you will run into > problems > if you're replacing something as fundamental as the ORM or template > langauge quite a few people are happy with jinja and SQLAlchemy. -- regards Kenneth Gonsalves From naikvin at gmail.com Mon Nov 21 11:10:09 2011 From: naikvin at gmail.com (Vineet Naik) Date: Mon, 21 Nov 2011 15:40:09 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: <87vcqddhgi.fsf@sanitarium.localdomain> Message-ID: On Mon, Nov 21, 2011 at 2:12 PM, Navin Kabra wrote: > I have a different perspective. I think Django is a good choice, especially > if you don't know what you want. Yes, that's exactly my case. I don't really mind the framework choosing stuff for me at least to start with. I am happy with Django's template system and ORM so far. But I understand Noufal's point. For a framework in a more familiar language, I would prefer loosely coupled components too. Thanks -- Vineet Naik From Nikunj.Badjatya at emc.com Mon Nov 21 11:33:30 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Mon, 21 Nov 2011 05:33:30 -0500 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: References: Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D3E4@MX34A.corp.emc.com> Hey Philippe, Thanks exactly what I wanted. My main() is calling other scripts written in powershell(.PS1) using subprocess.call(). Will this mechanism work in that case also ? I mean will this resume the execution from the same place where it left off as desired ? Nikunj -----Original Message----- From: bangpypers-bounces+nikunj.badjatya=emc.com at python.org [mailto:bangpypers-bounces+nikunj.badjatya=emc.com at python.org] On Behalf Of Philippe May Sent: Sunday, November 20, 2011 7:25 PM To: bangpypers at python.org Subject: Re: [BangPypers] "continue" in "try..except" Resuming the execution in an except clause seems unclean and unlikely. What about the context? Where in the stack to resume? This would lead to more problems than anything else. Here i think we are basically not dealing with exceptions but signals, and this might work as expected: import signal def signal_handler(signal_number, frame): ret = raw_input('Really abort? (y/n) ') if ret == 'y': print('Committing Hara Kiri') sys.exit(0) ## Install the signal handler: signal.signal(signal.SIGINT, signal_handler) Philippe > From: Navin Kabra >> >> On Sun, Nov 20, 2011 at 2:48 PM, wrote: >> >>> Are you 100% certain that this mechanism is not available in Python.? >>> I think this is very generic usecase of exception handling. !? >>> >> >> While I'm not 100% certain that this is not available in Python, I am 100% >> certain that this is not a "generic usecase of exception handling". Can you >> give examples in other languages? >> _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From noufal at gmail.com Mon Nov 21 12:02:18 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Mon, 21 Nov 2011 16:32:18 +0530 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: <599CEBACD49B4144A61212D837EE3C0F144604D3E4@MX34A.corp.emc.com> (Nikunj Badjatya's message of "Mon, 21 Nov 2011 05:33:30 -0500") References: <599CEBACD49B4144A61212D837EE3C0F144604D3E4@MX34A.corp.emc.com> Message-ID: <87wratbux1.fsf@sanitarium.localdomain> writes: > Hey Philippe, Thanks exactly what I wanted. My main() is calling > other scripts written in powershell(.PS1) using subprocess.call(). > Will this mechanism work in that case also ? I mean will this resume > the execution from the same place where it left off as desired ? I didn't know this was on Windows and I'm don't know enough to answer. On UNIX, sending a signal using C-c will send it to all processes associated terminal (using kill will send it only to the requested PID). This means that if you're running a shell pipeline using subprocess.call, it will receive a SIGINT too and has to handle that differently. In essence, the pausing and resuming has to be done in that program since it is the thing that knows the state of installation. I'm not totally sure if this is the situation on Windows although modern ones are POSIX compliant. Generally speaking, cross process work with duct tape/glue programs are a source of trouble. I would recommend that you either port your PS program to Python to keep it in process or do the whole thing in Python. You *might* be able to send a STOP signal to the subprocess if your Python program receives an INT to make it halt but then freeing resources etc. after that will be a pain. [...] -- ~noufal http://nibrahim.net.in Some bachelors want a meaningful overnight relationship. From sajuptpm at gmail.com Mon Nov 21 12:19:54 2011 From: sajuptpm at gmail.com (Saju M) Date: Mon, 21 Nov 2011 16:49:54 +0530 Subject: [BangPypers] howto Sqlalchemy atomic transaction ?? In-Reply-To: References: Message-ID: Model ======== class VDCTemplates(DeclarativeBase): __tablename__='cd_vdc_templates' id = Column(Unicode(50), primary_key=True) vdc_id=Column(Unicode(50), ForeignKey('cd_vdc.id', ondelete="CASCADE")) template_id=Column(Unicode(50), ForeignKey('cd_account_templates.id', ondelete="CASCADE")) account_id=Column(Unicode(50), ForeignKey('cd_accounts.id', ondelete="CASCADE")) code ====== acc_template=self.create_template_data() DBSession.add(acc_template) vdc_template = VDCTemplates() vdc_template.account_id = account_id vdc_template.vdc_id = vdc_id vdc_template.template_id = acc_template.id DBSession.add(vdc_template) * Getting IntegrityError error (IntegrityError) (1452, 'Cannot add or update a child row: a foreign key constraint fails (`my_cms_ee/cd_vdc_templates`, CONSTRAINT `cd_vdc_templates_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `cd_account_templates` (`id`) ON DELETE CASCADE)') u'INSERT INTO cd_vdc_templates (id, vdc_id, template_id, account_id) VALUES (%s, %s, %s, %s)' ['6ae8e571-ebce-6977-150d-09f7127acb5b', 'ab977753-de54-6e3b-3d7c-644d12f66d63', '8e0ce099-4ba7-2e01-304c-edc18803fbce', 'b56bc9e3-288b-a98f-a974-b67f90970122'] * Its working, if i put transaction.commit() after DBSession.add(acc_template), but that not atomic. * Have any way to make it atomic ??? From Nikunj.Badjatya at emc.com Mon Nov 21 15:40:40 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Mon, 21 Nov 2011 09:40:40 -0500 Subject: [BangPypers] "continue" in "try..except" In-Reply-To: <87wratbux1.fsf@sanitarium.localdomain> References: <599CEBACD49B4144A61212D837EE3C0F144604D3E4@MX34A.corp.emc.com> <87wratbux1.fsf@sanitarium.localdomain> Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D420@MX34A.corp.emc.com> Thanks for the useful info Noufal. -----Original Message----- From: bangpypers-bounces+nikunj.badjatya=emc.com at python.org [mailto:bangpypers-bounces+nikunj.badjatya=emc.com at python.org] On Behalf Of Noufal Ibrahim Sent: Monday, November 21, 2011 4:32 PM To: Bangalore Python Users Group - India Cc: phil.nabble at hanjinet.org Subject: Re: [BangPypers] "continue" in "try..except" writes: > Hey Philippe, Thanks exactly what I wanted. My main() is calling > other scripts written in powershell(.PS1) using subprocess.call(). > Will this mechanism work in that case also ? I mean will this resume > the execution from the same place where it left off as desired ? I didn't know this was on Windows and I'm don't know enough to answer. On UNIX, sending a signal using C-c will send it to all processes associated terminal (using kill will send it only to the requested PID). This means that if you're running a shell pipeline using subprocess.call, it will receive a SIGINT too and has to handle that differently. In essence, the pausing and resuming has to be done in that program since it is the thing that knows the state of installation. I'm not totally sure if this is the situation on Windows although modern ones are POSIX compliant. Generally speaking, cross process work with duct tape/glue programs are a source of trouble. I would recommend that you either port your PS program to Python to keep it in process or do the whole thing in Python. You *might* be able to send a STOP signal to the subprocess if your Python program receives an INT to make it halt but then freeing resources etc. after that will be a pain. [...] -- ~noufal http://nibrahim.net.in Some bachelors want a meaningful overnight relationship. _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From anandagar at gmail.com Mon Nov 21 15:37:55 2011 From: anandagar at gmail.com (Anand Agarwal) Date: Mon, 21 Nov 2011 20:07:55 +0530 Subject: [BangPypers] Looking for python developers Message-ID: Hi All *We are looking for passionate and self motivated python developers for our product development. Freshers interested in learning python are also welcome to apply.* You can send me your CV on this id or at anand.agarwal at sensiblesoftwares.com *About Sensible Softwares Pvt. Ltd.* Sensible Softwares has its genesis in our passion to create software products that helps improve the life of anyone who uses it. We undertake to increase productivity of anyone who uses our software. Sensible Softwares Pvt. Ltd. was incorporated in August 2009. SSPL is a pune based company. BootStrapToday is the first product from SSPL, released in the month of June 2010. *BootStrapToday*(http://bootstraptoday.com) is an integrated and intelligent Application Life Cycle Management platform for Software development teams. This platform aims to automate process for software development teams with integrated tools as well help them intelligently collaborate to reduce productivity gap between the team members with early warning signs. * * Thanks & Regards Anand Agarwal http://bootstraptoday.com From kracethekingmaker at gmail.com Mon Nov 21 17:38:43 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Mon, 21 Nov 2011 22:08:43 +0530 Subject: [BangPypers] [pythonpune] Re: To use Pinax or just Django In-Reply-To: References: <87vcqddhgi.fsf@sanitarium.localdomain> Message-ID: >>quite a few people are happy with jinja and SQLAlchemy. I am the one who is very happy with Jinja 2. jinja 2 beats speed in mako template and django and I feel pythonic when I use jinja 2. Flask can/will suit for large ACL.You have blueprints, modules concept. You can use flask-extensions . In case you don't like sqlalchemy you can replace with pewee or storm or any thing you wish. Django admin like feature is also available , Flask-admin. Flask is micro framework which is best since you can replace all the parts except except web server. You can use django like forms else you can use wtforms and flask extensions like flask-themes are available where it is easy to develop sites like wordpress. In case anyone interested in cms like wordpress in flask there is mead - by kennethreitz .I am currently working on it, trying to figure it. You ca make django and flask or tornado to work together since all the framework works top of wsgi, but making them work all together will involve tedious work. -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From asif.jamadar at rezayat.net Tue Nov 22 05:57:24 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 22 Nov 2011 04:57:24 +0000 Subject: [BangPypers] Transmeta in django is not working with mysql In-Reply-To: <1321857053.7554.76.camel@xlquest.web> References: <1321854286.7554.70.camel@xlquest.web> <1321857053.7554.76.camel@xlquest.web> Message-ID: Thank you for your information. I'm using django_modeltranslation that did the trick for me. From lawgon at gmail.com Tue Nov 22 07:30:31 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Tue, 22 Nov 2011 12:00:31 +0530 Subject: [BangPypers] Transmeta in django is not working with mysql In-Reply-To: References: <1321854286.7554.70.camel@xlquest.web> <1321857053.7554.76.camel@xlquest.web> Message-ID: <1321943434.7554.100.camel@xlquest.web> On Tue, 2011-11-22 at 04:57 +0000, Asif Jamadar wrote: > Thank you for your information. I'm using django_modeltranslation that > did the trick for me. me too -- regards Kenneth Gonsalves From senthil at uthcode.com Wed Nov 23 00:08:51 2011 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 23 Nov 2011 07:08:51 +0800 Subject: [BangPypers] Selenium with python training In-Reply-To: <1321514010.7554.19.camel@xlquest.web> References: <5EE08D3060938441AB012CEBE184151744C012DF@INDBLRVMSG01.aditi.tech> <5EE08D3060938441AB012CEBE184151744C01331@INDBLRVMSG01.aditi.tech> <1321514010.7554.19.camel@xlquest.web> Message-ID: <20111122230851.GA2870@mathmagic> On Thu, Nov 17, 2011 at 12:43:27PM +0530, Kenneth Gonsalves wrote: > On Thu, 2011-11-17 at 15:07 +0800, Senthil Kumaran wrote: > > BTW, selenium is web functional testing, more like how user uses the > > web app. It provides hooks to variety of languages, python being one. > > Javascript knowledge would be more desirable for selenium than > > python. > > javascript? not java? I think, while recording the tests with selenium ide, DOM, XPATH, CSS and id know-hows were more useful than anything else. These concepts are language agnostic, but given that many times we try to test the javascript events on browser, I thought javascript is more useful. Java is for mobile /server side these days, right? :) -- Senthil From lawgon at gmail.com Wed Nov 23 07:20:07 2011 From: lawgon at gmail.com (Kenneth Gonsalves) Date: Wed, 23 Nov 2011 11:50:07 +0530 Subject: [BangPypers] Selenium with python training In-Reply-To: <20111122230851.GA2870@mathmagic> References: <5EE08D3060938441AB012CEBE184151744C012DF@INDBLRVMSG01.aditi.tech> <5EE08D3060938441AB012CEBE184151744C01331@INDBLRVMSG01.aditi.tech> <1321514010.7554.19.camel@xlquest.web> <20111122230851.GA2870@mathmagic> Message-ID: <1322029211.7554.120.camel@xlquest.web> On Wed, 2011-11-23 at 07:08 +0800, Senthil Kumaran wrote: > > javascript? not java? > > I think, while recording the tests with selenium ide, DOM, XPATH, CSS > and id know-hows were more useful than anything else. These concepts > are language agnostic, but given that many times we try to test the > javascript events on browser, I thought javascript is more useful. sorry - I was under the impression that selenium was written in Java > > Java is for mobile /server side these days, right? :) I would rather not express my opinion on what Java is for ;-) -- regards Kenneth Gonsalves From asif.jamadar at rezayat.net Wed Nov 23 16:47:41 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Wed, 23 Nov 2011 15:47:41 +0000 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: <1321350394.7554.5.camel@xlquest.web> References: <1321314119.1868.6.camel@xlquest.web> <1321350394.7554.5.camel@xlquest.web> Message-ID: I created the questionnaire app using 'seantis questionniare'. I test with only one questionset and it is working fine. But if I create multiple questionset and try to save the answers, only answers for the first questionset are saving. Suppose I have 5 questionset and I submitted answers for all the questions then my 'answer' model will saves only first questionset answers. Can anyone explain me why this is happening in seantis questionnaire? From amit.pureenergy at gmail.com Wed Nov 23 18:00:12 2011 From: amit.pureenergy at gmail.com (Amit Sethi) Date: Wed, 23 Nov 2011 22:30:12 +0530 Subject: [BangPypers] seantis questionnaire - Django App In-Reply-To: References: <1321314119.1868.6.camel@xlquest.web> <1321350394.7554.5.camel@xlquest.web> Message-ID: Hi Asif , Sorry if the message seems harsh in any way. As has been pointed to you earlier on the thread it is unlikely that people will know about an obscure django app. It is unlikely that even one of the developers will be able to give a direct "support question" kind of an answer. You will have to dig into the app and figure out where the problems are. For example as you mention above in your question. Please ask these kind of questions what is the "answer" model , what does it look like, how is it updated , how do you think it should be updated ? Why do you think you are not getting the behaviour that you wish to see? etc Also what are the exact steps you are taking to get these errors . Thus the what I can suggest to you is this . Install the app , get it to write some debug messages and explain to the people in explicit terms what problems you have. Please remember this is not supposed to be generic python "customer support" list . Hack around figure thing out in a better manner and ask python/programming/architecture related questions here. And please have the courtesy to read previous messages before adding to the thread. Thanks Amit -- A-M-I-T S|S From Nikunj.Badjatya at emc.com Fri Nov 25 12:42:55 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Fri, 25 Nov 2011 06:42:55 -0500 Subject: [BangPypers] Weird Try..Except Error Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D87B@MX34A.corp.emc.com> Hi All, Please look at the snippet below. When I am running my module its giving me following error. Using : Python 2.7, windows Env. {{{ # User defined modules try: from scripts import precheck from scripts import input from scripts import validate from scripts import logsetup from scripts.constants import * except ImportError, err_msg: ==> line 38 print("ERROR {0}".format(err_msg)) print("INFO Please verify the presence of above module, and restart the installation") sys.exit(1) }}} {{{ Output: C:\> install.py -f input.xml File " C:\>install.py", line 38 except ImportError, err_msg: ^ SyntaxError: invalid syntax }}} I checked the comma and spacing and didn't find any problem. Any idea.? Thanks Nikunj From noufal at gmail.com Fri Nov 25 12:53:41 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Fri, 25 Nov 2011 17:23:41 +0530 Subject: [BangPypers] Weird Try..Except Error In-Reply-To: <599CEBACD49B4144A61212D837EE3C0F144604D87B@MX34A.corp.emc.com> (Nikunj Badjatya's message of "Fri, 25 Nov 2011 06:42:55 -0500") References: <599CEBACD49B4144A61212D837EE3C0F144604D87B@MX34A.corp.emc.com> Message-ID: <8739dcto3e.fsf@sanitarium.localdomain> writes: [...] > I checked the comma and spacing and didn't find any problem. Python 3's "except" statement is different[1] You should say except ImportError as err_msg Also, your error message is misleading. Best let the import error propagate. The traceback will be more useful in fixing the problem than the error message which you're printing. [...] Footnotes: [1] http://docs.python.org/release/3.1.3/tutorial/errors.html#handling-exceptions -- ~noufal http://nibrahim.net.in The first condition of immortality is death. -Stanislaw Lec From Nikunj.Badjatya at emc.com Fri Nov 25 13:14:07 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Fri, 25 Nov 2011 07:14:07 -0500 Subject: [BangPypers] Weird Try..Except Error In-Reply-To: <1322222639.62406.YahooMailNeo@web114701.mail.gq1.yahoo.com> References: <599CEBACD49B4144A61212D837EE3C0F144604D87B@MX34A.corp.emc.com> <1322222639.62406.YahooMailNeo@web114701.mail.gq1.yahoo.com> Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D880@MX34A.corp.emc.com> Hi All, Thanks for the info. I had Python27 and Python32 both installed togethar. In Windows the PATH env variable, I had set Python27 exe and lib path. But When I do C:\> Python [PressEnter] I get 2.7 But when I run C:\> script.py [PressEnter] The script is running with Python3.2 , thts weird because I have set my Path variable with Pytho27 exe and lib. Which is causing the problem. Thanks Nikunj From: Hussain Bohra [mailto:hussainbohra_30 at yahoo.com] Sent: Friday, November 25, 2011 5:34 PM To: Badjatya, Nikunj Subject: Re: [BangPypers] Weird Try..Except Error Hi Nikunj, > print("ERROR {0}".format(err_msg)) > print("INFO Please verify the presence of above module, and restart the installation") When I see your print statements, it seems you are using python 3 instead of python 2.x > except ImportError, err_msg: This statement will throw compile time error in python 3, should be written as except ImportError as err_msg: Can you re-check your python version ? Thanks and Regards, Hussain Bohra ________________________________ From: "Nikunj.Badjatya at emc.com" To: bangpypers at python.org Sent: Friday, 25 November 2011 5:12 PM Subject: [BangPypers] Weird Try..Except Error Hi All, Please look at the snippet below. When I am running my module its giving me following error. Using : Python 2.7, windows Env. {{{ # User defined modules try: from scripts import precheck from scripts import input from scripts import validate from scripts import logsetup from scripts.constants import * except ImportError, err_msg: ==> line 38 print("ERROR {0}".format(err_msg)) print("INFO Please verify the presence of above module, and restart the installation") sys.exit(1) }}} {{{ Output: C:\> install.py -f input.xml File " C:\>install.py", line 38 except ImportError, err_msg: ^ SyntaxError: invalid syntax }}} I checked the comma and spacing and didn't find any problem. Any idea.? Thanks Nikunj _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From Nikunj.Badjatya at emc.com Fri Nov 25 13:15:34 2011 From: Nikunj.Badjatya at emc.com (Nikunj.Badjatya at emc.com) Date: Fri, 25 Nov 2011 07:15:34 -0500 Subject: [BangPypers] Weird Try..Except Error In-Reply-To: <8739dcto3e.fsf@sanitarium.localdomain> References: <599CEBACD49B4144A61212D837EE3C0F144604D87B@MX34A.corp.emc.com> <8739dcto3e.fsf@sanitarium.localdomain> Message-ID: <599CEBACD49B4144A61212D837EE3C0F144604D881@MX34A.corp.emc.com> Also, I have not set any interpreter in the shebang line to use. Anyways, Thanks All. -----Original Message----- From: bangpypers-bounces+nikunj.badjatya=emc.com at python.org [mailto:bangpypers-bounces+nikunj.badjatya=emc.com at python.org] On Behalf Of Noufal Ibrahim Sent: Friday, November 25, 2011 5:24 PM To: Bangalore Python Users Group - India Subject: Re: [BangPypers] Weird Try..Except Error writes: [...] > I checked the comma and spacing and didn't find any problem. Python 3's "except" statement is different[1] You should say except ImportError as err_msg Also, your error message is misleading. Best let the import error propagate. The traceback will be more useful in fixing the problem than the error message which you're printing. [...] Footnotes: [1] http://docs.python.org/release/3.1.3/tutorial/errors.html#handling-exceptions -- ~noufal http://nibrahim.net.in The first condition of immortality is death. -Stanislaw Lec _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From santhosh.edukulla at gmail.com Sat Nov 26 15:31:53 2011 From: santhosh.edukulla at gmail.com (Santhosh Edukulla) Date: Sat, 26 Nov 2011 20:01:53 +0530 Subject: [BangPypers] Openings in McAfee Message-ID: Hi All, We have quiet a good number of openings at various levels under Dev,QA,Automation,program management etc. Some of these also includes an hot opening for python developer. Please let me know if any of you are interested. Regards, Santhosh From delegbede at dudupay.com Sat Nov 26 15:36:01 2011 From: delegbede at dudupay.com (delegbede at dudupay.com) Date: Sat, 26 Nov 2011 14:36:01 +0000 Subject: [BangPypers] Openings in McAfee In-Reply-To: References: Message-ID: <452516822-1322318169-cardhu_decombobulator_blackberry.rim.net-1227477629-@b18.c12.bise7.blackberry> I'm. Is it open to people outside india? Regards. Sent from my BlackBerry wireless device from MTN -----Original Message----- From: Santhosh Edukulla Sender: bangpypers-bounces+delegbede=dudupay.com at python.org Date: Sat, 26 Nov 2011 20:01:53 To: Reply-To: Bangalore Python Users Group - India Subject: [BangPypers] Openings in McAfee Hi All, We have quiet a good number of openings at various levels under Dev,QA,Automation,program management etc. Some of these also includes an hot opening for python developer. Please let me know if any of you are interested. Regards, Santhosh _______________________________________________ BangPypers mailing list BangPypers at python.org http://mail.python.org/mailman/listinfo/bangpypers From srinivasaenergy at gmail.com Sun Nov 27 11:28:01 2011 From: srinivasaenergy at gmail.com (srinivasa rao) Date: Sun, 27 Nov 2011 15:58:01 +0530 Subject: [BangPypers] Openings in McAfee In-Reply-To: References: Message-ID: Hi please drop JD whom i need to send my resume and i have 6 years into python Thanks & Regards srinivasa On Sat, Nov 26, 2011 at 8:01 PM, Santhosh Edukulla < santhosh.edukulla at gmail.com> wrote: > Hi All, > > We have quiet a good number of openings at various levels under > Dev,QA,Automation,program management etc. Some of these also includes an > hot opening for python developer. > > Please let me know if any of you are interested. > > Regards, > Santhosh > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > From smrutilekha at gmail.com Mon Nov 28 06:50:40 2011 From: smrutilekha at gmail.com (Smrutilekha Swain) Date: Mon, 28 Nov 2011 11:20:40 +0530 Subject: [BangPypers] Query abt QTableWidgetItem Message-ID: Hello, I need ur help. i am creating a gui using PyQt4. i have one lineedit and a table. i want everytime i enter a QString in lineedit, it should show in 2nd row of 1st column of the table. but here i have problem. the table is not displaying any text. when i print the value, it shows "None". Here is my code: self.textLineEdit = QLineEdit() self.tableWidgetItem = QTableWidgetItem() self.table = QTableWidget() item = self.textLineEdit.text() tableItem = self.tableWidgetItem.setText(item) print tableItem self.table.setItem(1,0,tableItem) There is no error but it shows tableItem = None plz help me. i will b very grateful 2 u all..................... From vikram at iiit.ac.in Mon Nov 28 07:55:19 2011 From: vikram at iiit.ac.in (Vikram Pudi) Date: Mon, 28 Nov 2011 12:25:19 +0530 (IST) Subject: [BangPypers] Python programmer positions open at IIIT Hyderabad Message-ID: As part of a DBT sanctioned project, we need to develop a system / portal that serves as a repository of data pertaining to the metabolism (chemical reactions/pathways) of various species. Bio-labs all over India will use this portal to store, access, analyze the data that comes out of their experiments. The data is expected to be *huge*. The plan is to develop this using Python and Web2py. Several positions are available and details (salary/qualifications/etc.) are shown at: http://metabolomics.iiit.ac.in/ (Click on the Apply link at the top). The project is valid for 5 years. Those interested may kindly apply using the online portal at the above website. Metabolomics team, IIIT Hyderabad. From avinash at sultanpur.org Mon Nov 28 09:21:34 2011 From: avinash at sultanpur.org (Avinash Sultanpur) Date: Mon, 28 Nov 2011 13:51:34 +0530 Subject: [BangPypers] Python programmer positions open at IIIT Hyderabad In-Reply-To: References: Message-ID: <4ED3448E.3020406@sultanpur.org> This is because you had $final_banned_destiny = REJECT On Monday 28 November 2011 12:25 PM, Vikram Pudi wrote: > > As part of a DBT sanctioned project, we need to develop a system / > portal that serves as a repository of data pertaining to the > metabolism (chemical reactions/pathways) of various species. Bio-labs > all over India will use this portal to store, access, analyze the data > that comes out of their experiments. The data is expected to be *huge*. > > The plan is to develop this using Python and Web2py. Several positions > are available and details (salary/qualifications/etc.) are shown at: > > http://metabolomics.iiit.ac.in/ (Click on the Apply link at the top). > > The project is valid for 5 years. Those interested may kindly apply > using the online portal at the above website. > > Metabolomics team, > IIIT Hyderabad. > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers From sateeshpyper at gmail.com Mon Nov 28 13:23:19 2011 From: sateeshpyper at gmail.com (Sateesh Kumar) Date: Mon, 28 Nov 2011 17:53:19 +0530 Subject: [BangPypers] Query abt QTableWidgetItem In-Reply-To: References: Message-ID: On Mon, Nov 28, 2011 at 11:20 AM, Smrutilekha Swain wrote: > Hello, [....] > Here is my code: > > self.textLineEdit = QLineEdit() > self.tableWidgetItem = QTableWidgetItem() > self.table = QTableWidget() > > item = self.textLineEdit.text() > tableItem = self.tableWidgetItem.setText(item) > print tableItem > > self.table.setItem(1,0,tableItem) > The call self.tableWidgetItem.setText(item) returns 'None' and you are using that as the value for a table cell. Changing your code to use the earlier created widget item would fix this i.e. you need to do: self.table.setItem(1,0,self.tableWidgetItem) and also your print should be: print self.tableWidgetItem.text() instead of print tableItem reg, sateesh From asif.jamadar at rezayat.net Mon Nov 28 13:32:20 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Mon, 28 Nov 2011 12:32:20 +0000 Subject: [BangPypers] How to use special character in Message-ID: Dear all, I'm using reportlab tool generate PDF reports If character is '<' or '>' how can I use these characters in tag From gora at mimirtech.com Mon Nov 28 13:45:47 2011 From: gora at mimirtech.com (Gora Mohanty) Date: Mon, 28 Nov 2011 18:15:47 +0530 Subject: [BangPypers] How to use special character in In-Reply-To: References: Message-ID: On Mon, Nov 28, 2011 at 6:02 PM, Asif Jamadar wrote: > Dear all, > > I'm using reportlab tool generate PDF reports > > If character is '<' or ?'>' how can I use these characters in tag Your question is not very clear, but my magic 8-ball tells me that what you are probably looking for is < and > Regards, Gora From asif.jamadar at rezayat.net Mon Nov 28 13:50:55 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Mon, 28 Nov 2011 12:50:55 +0000 Subject: [BangPypers] How to use special character in In-Reply-To: References: Message-ID: I'm using Reportlab tool. In Paragraph function of reportlab I'm using . But when < and > character appears for this tag in paragraph that character is showing in the generated PDF report using reportlab. How can I handle this? From asif.jamadar at rezayat.net Tue Nov 29 07:40:21 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Tue, 29 Nov 2011 06:40:21 +0000 Subject: [BangPypers] Python Reportlan Platypus issue In-Reply-To: References: Message-ID: Sorry yesterday I was in hurry so didn't asked question properly. I'm using Reportlab tool to generate PDF report. In my source code I'm using reportlab.platypus.Paragraph class which supports some of basic html tags (like
, etc...) So my problem is using special characters with this Paragraph class with html tag . Suppose I want to display the characters '<' and '>' in my report then I will use Paragraph(' < ' ), but my generated PDF report not showing those characters. Why this is happening? What is the problem here? Regards Asif From vishnuprasadgaddam at gmail.com Tue Nov 29 10:53:48 2011 From: vishnuprasadgaddam at gmail.com (vishnu prasad) Date: Tue, 29 Nov 2011 15:23:48 +0530 Subject: [BangPypers] I need to design a website with django suggestions welcome Message-ID: Hai greetings from prasad i going to be develop one website with django framework ? a website like paying of customers life insurance premiums and payment of electiricty bills and recharge of mobile bills lic premiums of all companies (ex) icici,kotak,oriental etc...etc.,I thinking i can implement django framework how it is flexible apart from other frameworks what about zope ? which one is best django or zope ? and i need to implement third party applications for interfacing with python so how it is possible is it python framework allows interfacing third party applications (API) please suggest your valuable ideas Welcome Your Valuable Suggestions and Critics Thanks and regards Prasad From varunthacker1989 at gmail.com Tue Nov 29 17:09:57 2011 From: varunthacker1989 at gmail.com (Varun Thacker) Date: Tue, 29 Nov 2011 21:39:57 +0530 Subject: [BangPypers] Choosing between 2 client libraries for Beanstalk Message-ID: Hi, I want to use Beanstalk (http://kr.github.com/beanstalkd/) on AWS. For using a Python client library I found 2 options- http://code.google.com/p/pybeanstalk/ https://github.com/earl/beanstalkc/ If anyone has used any one of them please share their experience and also help me choose between them. -- Regards, Varun Thacker http://varunthacker.wordpress.com From kracethekingmaker at gmail.com Tue Nov 29 17:25:57 2011 From: kracethekingmaker at gmail.com (kracekumar ramaraju) Date: Tue, 29 Nov 2011 21:55:57 +0530 Subject: [BangPypers] I need to design a website with django suggestions welcome In-Reply-To: References: Message-ID: On Tue, Nov 29, 2011 at 3:23 PM, vishnu prasad wrote: > Hai greetings from prasad > i going to be develop one website with django framework ? a website like > paying of customers life insurance premiums and payment of electiricty > bills and recharge of > mobile bills lic premiums of all companies (ex) icici,kotak,oriental > etc...etc.,I thinking i can implement django framework how it is flexible > apart from other frameworks > what about zope ? which one is best django or zope ? and i need to > implement third party applications for interfacing with python so how it > is possible is it python framework allows interfacing third party > applications (API) please suggest your valuable ideas > > This seems to be trivial application involving money, in case you aren't familiar with framework, it is not advised to learn from this venture or application. Django has quite big community and re usable app, take your time and decide which will suit you. Welcome Your Valuable Suggestions and Critics > > Thanks and regards > > Prasad > _______________________________________________ > BangPypers mailing list > BangPypers at python.org > http://mail.python.org/mailman/listinfo/bangpypers > -- * "Talk is cheap, show me the code" - Linus Torvalds Winning Regards KraceKumar.R http://kracekumar.wordpress.com +91-97906-58304 * *+91-85530-29521* * * From asif.jamadar at rezayat.net Wed Nov 30 16:00:47 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Wed, 30 Nov 2011 15:00:47 +0000 Subject: [BangPypers] Django admin URL redirect problem in admin page Message-ID: Dear All, In one of my django app, I extended the django User model and created a new 'UserProfile ' model. But when I'm trying to add new user through this model in admin page, the URL is not redirecting to successful page, instead its stopped on 'admin/auth/user/add/?_popup=1' this URL. (user is created but not redirecting to success page) Here is the code class UserProfile(User): age = models.CharField(max_length=20, blank=True, null=True) education = models.CharField(max_length=50, blank=True, null=True, choices=EDUCATION_CHOICES) class TestPopulation(models.Model): user = models.ManyToManyField(UserProfile, blank=True, null=True) questionnaire = models.ManyToManyField(Questionnaire, blank=True, null=True) def __unicode__(self): return "%s" % (self.user) This creating creating the user object in admin page but not redirecting to successpage, instead its stopped at 'admin/auth/user/add/?_popup=1' Any suggestions?