Re: [BangPypers] How to model these entities?

2015-03-29 Thread Dhananjay Nene
One reason I am not fond of singletons is that they make unit testing a lot harder Dhananjay On Wed, Mar 25, 2015 at 7:02 PM, Abhaya Agarwal abhaya.agar...@gmail.com wrote: Hi, I need to model four entities that share some attributes and behaviors and also have some unique attributes and

Re: [BangPypers] Iterators

2014-04-02 Thread Dhananjay Nene
On Tue, Apr 1, 2014 at 11:19 PM, Anand Chitipothu anandol...@gmail.comwrote: On Tue, Apr 1, 2014 at 11:16 PM, Noufal Ibrahim KV nou...@nibrahim.net.inwrote: On Tue, Apr 01 2014, Pradip Caulagi wrote: It is rather late in the day to bring this up but ... I heard they are removing

Re: [BangPypers] Issue with list comprehension

2013-10-30 Thread Dhananjay Nene
Thats surprising. The code runs just fine http://ideone.com/06qjoM (Ans: 986) As an aside I renamed _sum to sum_ When avoiding naming conflicts, its recommended to postfix a underscore Prefixing an underscore is to provide a hint that the value that gets assigned to the variable is going to

Re: [BangPypers] BangPypers Digest, Vol 74, Issue 3

2013-10-23 Thread Dhananjay Nene
On Thu, Oct 3, 2013 at 2:02 PM, Aditya Laghate adi...@thinrhino.net.in wrote: On Thu, Oct 03, 2013 at 01:18:24PM +0530, Dhananjay Nene wrote: Its in the downloaded tar.gz. You'll find the jar in lib/src Besides the community edition clearly mentions Free, open-source, Apache 2 license I

Re: [BangPypers] Object Oriented Programming in python

2013-10-22 Thread Dhananjay Nene
On Mon, Oct 21, 2013 at 11:40 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Mon, Oct 21, 2013 at 7:11 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Since you suggested that Superior constructs implemented inferiorly. and did not respond to the line which wondered if that was based

Re: [BangPypers] Object Oriented Programming in python

2013-10-22 Thread Dhananjay Nene
Am going to sign out of this discussion. It would not be correct to say it is reaching the point of diminishing returns. In fact for myself it has turned more interesting. But its turned a bit esoteric. Have been doing up some more reading and I drew a few conclusions for myself * Terms don't

Re: [BangPypers] Object Oriented Programming in python

2013-10-21 Thread Dhananjay Nene
On Mon, Oct 21, 2013 at 10:55 AM, Saager Mhatre saager.mha...@gmail.com wrote: On Oct 15, 2013 4:10 AM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Tue, Oct 15, 2013 at 1:46 AM, Pranav Raj pranav09...@hotmail.com wrote: Hi fellow python lovers, I wanted to do OOPS programming

Re: [BangPypers] Object Oriented Programming in python

2013-10-21 Thread Dhananjay Nene
On Mon, Oct 21, 2013 at 11:53 AM, Saager Mhatre saager.mha...@gmail.com wrote: On Oct 21, 2013 11:39 AM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Mon, Oct 21, 2013 at 10:55 AM, Saager Mhatre saager.mha...@gmail.com wrote: Which generally lead to poor (or at least poorer

Re: [BangPypers] Object Oriented Programming in python

2013-10-21 Thread Dhananjay Nene
On Mon, Oct 21, 2013 at 3:02 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Oct 21, 2013 12:09 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Mon, Oct 21, 2013 at 11:53 AM, Saager Mhatre saager.mha...@gmail.com wrote: On Oct 21, 2013 11:39 AM, Dhananjay Nene dhananjay.n

Re: [BangPypers] Object Oriented Programming in python

2013-10-21 Thread Dhananjay Nene
On Mon, Oct 21, 2013 at 6:42 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Oct 21, 2013 3:21 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Mon, Oct 21, 2013 at 3:02 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Oct 21, 2013 12:09 PM, Dhananjay Nene dhananjay.n

Re: [BangPypers] Object Oriented Programming in python

2013-10-21 Thread Dhananjay Nene
On Mon, Oct 21, 2013 at 11:46 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Fri, Oct 18, 2013 at 11:33 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Tue, Oct 15, 2013 at 2:33 PM, Dhruv Baldawa dhruvbald...@gmail.com wrote: Also take a look at videos by Raymond Hettinger http

Re: [BangPypers] Object Oriented Programming in python

2013-10-20 Thread Dhananjay Nene
On Fri, Oct 18, 2013 at 5:58 PM, s|s supr.e.etse...@gmail.com wrote: On Fri, Oct 18, 2013 at 11:31 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Tue, Oct 15, 2013 at 4:44 PM, s|s supr.e.etse...@gmail.com wrote: Hi Pranav, I would pose a counter question regarding object oriented

Re: [BangPypers] Object Oriented Programming in python

2013-10-18 Thread Dhananjay Nene
On Tue, Oct 15, 2013 at 2:33 PM, Dhruv Baldawa dhruvbald...@gmail.com wrote: Also take a look at videos by Raymond Hettinger http://pyvideo.org/speaker/138/raymond-hettinger I have some serious reservations on how OO is packaged here. Wanted to post a detailed and articulate opinion, but it is

Re: [BangPypers] Object Oriented Programming in python

2013-10-18 Thread Dhananjay Nene
On Tue, Oct 15, 2013 at 4:44 PM, s|s supr.e.etse...@gmail.com wrote: Hi Pranav, I would pose a counter question regarding object oriented programming. How did you learn OOP concepts? I am assuming like most of us, probably through a C++ or Java course. These courses ingrain a certain

Re: [BangPypers] First python interview

2013-10-15 Thread Dhananjay Nene
On Tue, Oct 15, 2013 at 11:25 AM, Navin Kabra na...@smriti.com wrote: If I were interviewing you, I would not really be checking your python knowledge (unless you claimed to be good in Python in your resume). I would really check how good you are in Java (your primary language), and your

Re: [BangPypers] Object Oriented Programming in python

2013-10-14 Thread Dhananjay Nene
On Tue, Oct 15, 2013 at 1:46 AM, Pranav Raj pranav09...@hotmail.com wrote: Hi fellow python lovers, I wanted to do OOPS programming in python, but i just found out that there are no private variables in python. Does anyone know why python classes have no private variables and why python's

Re: [BangPypers] the pyCharm from Jetbrains has been opensourced i.e. its free now!

2013-10-04 Thread Dhananjay Nene
On Fri, Oct 4, 2013 at 4:30 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Oct 3, 2013 9:40 AM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Thu, Oct 3, 2013 at 8:19 AM, Mandar Vaze / मंदार वझे mandarv...@gmail.com wrote: Downloaded it, bit not used it, yet. (still using vim

Re: [BangPypers] BangPypers Digest, Vol 74, Issue 3

2013-10-03 Thread Dhananjay Nene
On Thu, Oct 3, 2013 at 1:01 PM, Aditya Laghate adi...@thinrhino.net.in wrote: On Thu, Oct 03, 2013 at 12:24:27PM +0530, Venu Murthy wrote: As far as I know, this is permanent move Rahul, Pycharm is going to have two versions, the basic one is opensourced for ever and then there one with more

Re: [BangPypers] the pyCharm from Jetbrains has been opensourced i.e. its free now!

2013-10-02 Thread Dhananjay Nene
On Thu, Oct 3, 2013 at 8:19 AM, Mandar Vaze / मंदार वझे mandarv...@gmail.com wrote: Downloaded it, bit not used it, yet. (still using vim) But I have heard so much praise about pycharm from everyone in every (python related) forum that I can't wait to use it Any links to the discussions?

Re: [BangPypers] Fwd: How to do clustering in python.

2013-09-30 Thread Dhananjay Nene
On Mon, Sep 30, 2013 at 4:37 PM, uday sankar sankar.u...@gmail.com wrote: Hi, I have a engine built in python. I implemented a webserver in python it will listen to the request sent and will responsed back with the necessary result. Now the problem is that I am able to run this engine in one

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Dhananjay Nene
On Fri, Sep 27, 2013 at 2:49 AM, Amber Jain i.amber.j...@gmail.com wrote: On Fri, Sep 27, 2013 at 2:25 AM, Bibhas m...@bibhas.in wrote: I used Kivy a year back. Not sure of it's state now. You could look into it once. +1 for Kivy (under active development). The same code runs unmodified on

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Dhananjay Nene
On Fri, Sep 27, 2013 at 6:52 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 2:19 AM, Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Dhananjay Nene
On Fri, Sep 27, 2013 at 7:21 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 7:06 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Overall background: I write desktop apps but not in python, I do write the backends in python. So my desktop awareness is more generic. I did

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Dhananjay Nene
On Fri, Sep 27, 2013 at 7:35 PM, Noufal Ibrahim nou...@nibrahim.net.in wrote: Sriram Karra karra@gmail.com writes: [...] Isn't that the case with any cross-platform toolkit - if the intent is to be cross platform? Yes but going inside the browser is more of a sacrifice than other

Re: [BangPypers] What are you using for developing desktop GUIs?

2013-09-27 Thread Dhananjay Nene
On Fri, Sep 27, 2013 at 10:04 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 8:55 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: In most cases I find users want a installer. Basically just point and click. So if there is no installer where a user selects a install

Re: [BangPypers] (no subject)

2013-09-25 Thread Dhananjay Nene
On Wed, Sep 25, 2013 at 7:09 PM, Vineet Naik naik...@gmail.com wrote: On Tue, Sep 24, 2013 at 6:19 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Tue, Sep 24, 2013 at 6:11 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: [..] which just trashed the ordering of an and followed

Re: [BangPypers] (no subject)

2013-09-24 Thread Dhananjay Nene
On Tue, Sep 24, 2013 at 10:38 AM, bab mis bab...@outlook.com wrote: Hi ,Any XML parser which gives the same kind of data structure as yaml parser gives in python. Tried with xmlmindom but ir's not of a proper datastrucure ,every time i need to read by element and create the dict. Just think

Re: [BangPypers] (no subject)

2013-09-24 Thread Dhananjay Nene
On Tue, Sep 24, 2013 at 5:48 PM, Vineet Naik naik...@gmail.com wrote: Hi, On Tue, Sep 24, 2013 at 10:38 AM, bab mis bab...@outlook.com wrote: Hi ,Any XML parser which gives the same kind of data structure as yaml parser gives in python. Tried with xmlmindom but ir's not of a proper

Re: [BangPypers] (no subject)

2013-09-24 Thread Dhananjay Nene
On Tue, Sep 24, 2013 at 6:04 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Tue, Sep 24, 2013 at 5:48 PM, Vineet Naik naik...@gmail.com wrote: Hi, On Tue, Sep 24, 2013 at 10:38 AM, bab mis bab...@outlook.com wrote: Hi ,Any XML parser which gives the same kind of data structure as yaml

Re: [BangPypers] (no subject)

2013-09-24 Thread Dhananjay Nene
On Tue, Sep 24, 2013 at 6:11 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Tue, Sep 24, 2013 at 6:04 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Tue, Sep 24, 2013 at 5:48 PM, Vineet Naik naik...@gmail.com wrote: Hi, On Tue, Sep 24, 2013 at 10:38 AM, bab mis bab

Re: [BangPypers] Pyladies Bangalore in Times of India

2013-09-23 Thread Dhananjay Nene
On Mon, Sep 23, 2013 at 11:24 AM, Annapoornima Koppad a.kop...@gmail.com wrote: Dear All, Pyladies Bangalore was recently featured in Times of India dated, 22nd sept and later on 23 sept as well. [1]. I am not able to find the link for the 23rd edition. I thank Anand Chitipothu for making

Re: [BangPypers] decorator help

2013-09-20 Thread Dhananjay Nene
On Fri, Sep 20, 2013 at 6:06 PM, babmis bab...@outlook.com wrote: I want to print entry and exit message for functions , i have bunch of such function . How can i do it in decorator. from functools import wraps def trace(f): ... @wraps(f) ... def wrap(*args, **kwargs): ...

Re: [BangPypers] need help w.r.t itertools

2013-09-16 Thread Dhananjay Nene
On Mon, Sep 16, 2013 at 12:27 PM, Suyash Bhatt bhatt.suy...@gmail.com wrote: thanks for the response.. what if i have another list *e = [*'*my1name1is1','**my2name2is1','xyz','abc']* *and in the list d, I want only the elements which are present in e..* * Python 2.7.3 (default, Apr 10 2013,

Re: [BangPypers] Do you pin your requirements.txt ?

2013-09-16 Thread Dhananjay Nene
On Mon, Sep 16, 2013 at 4:18 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Sep 16, 2013 8:46 AM, Dhananjay Nene dhananjay.n...@gmail.com wrote: let me state that while I pin requirements.txt To be just a little pedantic here- you pin version of dependencies, not the entire

Re: [BangPypers] Do you pin your requirements.txt ?

2013-09-14 Thread Dhananjay Nene
On Sat, Sep 14, 2013 at 2:56 PM, Noufal Ibrahim nou...@nibrahim.net.inwrote: Baishampayan Ghose b.gh...@gmail.com writes: Oh! Is that a big deal? Of course we pin our requirements (in all languages) and that's how it should be done. Otherwise you can't get repeatable builds. ~BG I

Re: [BangPypers] Do you pin your requirements.txt ?

2013-09-14 Thread Dhananjay Nene
, Noufal Ibrahim nou...@nibrahim.net.in wrote: Dhananjay Nene dhananjay.n...@gmail.com writes: [...] The difficulty with that approach (I've never actually done it) is that it requires versioning these bundles, make them available to your installation scripts and code to them (lately

Re: [BangPypers] Do you pin your requirements.txt ?

2013-09-14 Thread Dhananjay Nene
directly used specified the transient dependency as = x.0 say. Or then perhaps I couldn't understand something. -- Kiran Jonnalagadda http://jace.zaiki.in/ http://hasgeek.com/ (Sent from my phone) On Sep 14, 2013 11:58 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Sat, Sep 14

Re: [BangPypers] Python packages and modules (was: Favorite tips/techniques)

2013-09-13 Thread Dhananjay Nene
On Fri, Sep 13, 2013 at 3:58 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Fri, Sep 13, 2013 at 1:10 PM, Saju M sajup...@gmail.com wrote: Saager, As per python module-import semantics, sub-modules don't end up as names in the package-module[*] unless explicitly added. I didn't get

Re: [BangPypers] Python packages and modules (was: Favorite tips/techniques)

2013-09-13 Thread Dhananjay Nene
On Fri, Sep 13, 2013 at 6:50 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Fri, Sep 13, 2013 at 3:58 PM, Saager Mhatre saager.mha...@gmail.com wrote: On Fri, Sep 13, 2013 at 1:10 PM, Saju M sajup...@gmail.com wrote: Saager, As per python module-import semantics, sub-modules don't

Re: [BangPypers] Python packages and modules (was: Favorite tips/techniques)

2013-09-13 Thread Dhananjay Nene
On 13 Sep 2013 19:21, Saager Mhatre saager.mha...@gmail.com wrote: Your result is not bad, but I still prefer my original approach. No offence. :) None perceived :) Oh, and I'm still waiting on an answer for [3]. ;) I have my theories :) Don't know the facts. - d

Re: [BangPypers] Python Wats

2013-09-12 Thread Dhananjay Nene
On Thu, Sep 12, 2013 at 11:22 PM, Shabda Raaj sha...@agiliq.com wrote: whole qx business than Python programmers are with os and subprocess. That because subprocess and os module have a very bad api. I prefer using envoy whenevr I can. https://github.com/kennethreitz/envoy Interesting.

Re: [BangPypers] Do you pin your requirements.txt ?

2013-09-12 Thread Dhananjay Nene
On Fri, Sep 13, 2013 at 12:38 AM, Saager Mhatre saager.mha...@gmail.com wrote: On Thu, Sep 12, 2013 at 6:30 PM, Abdul Muneer abdulmun...@gmail.com wrote: I also pin requirements. But when I do 'pip freeze', I remove the packages that are installed as a dependency to main libraries which were

Re: [BangPypers] Favorite tips/techniques

2013-09-10 Thread Dhananjay Nene
Ignoring classes for the moment, how likely do you think you would have a dict like that :) On a separate note if you are using primitive types, I cannot think of any scenarios, where not coercing keys to be of the same type would be considered inappropriate (except in case of reverse dicts) On

[BangPypers] Appropriate list conduct (was Re: Fwd: Fw: Fwd: https://github.com/pythonhacker/ladies.py)

2013-09-08 Thread Dhananjay Nene
Top posting since am making some rather broad comments rather than to specific lines in particular. This is a thread which has been bothering me since morning. For a number of reasons. None of them have to do with the very essence of the thread, since I never got to see the repository and the

Re: [BangPypers] python framework for android

2012-01-09 Thread Dhananjay Nene
On Wed, Jan 4, 2012 at 12:25 PM, Kenneth Gonsalves law...@gmail.com wrote: On Wed, 2012-01-04 at 14:24 +0800, Senthil Kumaran wrote: On Wed, Jan 4, 2012 at 2:18 PM, Kenneth Gonsalves law...@gmail.com wrote: am looking at kivy right now Looks neat. I would like to try that one too.

Re: [BangPypers] google api and facebook api ?

2011-11-15 Thread Dhananjay Nene
On Sat, Nov 12, 2011 at 7:35 PM, vishnu prasad vishnuprasadgad...@gmail.com 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

Re: [BangPypers] Timestamp error

2011-11-10 Thread Dhananjay Nene
On Thu, Nov 10, 2011 at 5:05 PM, Shashidhar Paragonda shashidha...@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.

Re: [BangPypers] Generate Dynamic lists

2011-11-06 Thread Dhananjay Nene
On Mon, Nov 7, 2011 at 5:11 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Fri, Oct 21, 2011 at 12:10 AM, Asif Jamadar asif.jama...@rezayat.netwrote: So I'm trying to generate dynamic choices for django form. Here i'm usig formset concept (CODE is mentioned below) Suppose i

[BangPypers] [JOB] Vayana Services seeking curious and committed python programmers

2011-09-23 Thread Dhananjay Nene
Vayana Services helps Small and Medium Enterprises (SMEs), get working capital loans from banks and helps bank expand their lending reach. We keep the technology simple to the point of being invisible to end customers. We work on Python, Scala and Erlang with our SAAS offerings deployed on AWS and

Re: [BangPypers] Embedded python mail server

2011-08-24 Thread Dhananjay Nene
24, 2011 at 12:42 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Wed, Aug 24, 2011 at 12:03 PM, Gopalakrishnan Subramani gopalakrishnan.subram...@gmail.com wrote: Use the http://hg.python.org/cpython/file/2.7/Lib/smtpd.py server. smtpd is a proxy so only look at the client interface

Re: [BangPypers] Embedded python mail server

2011-08-24 Thread Dhananjay Nene
Just discovered http://www.lastcraft.com/fakemail.php On Wed, Aug 24, 2011 at 12:37 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Wed, Aug 24, 2011 at 12:34 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Wed, Aug 24, 2011 at 12:25 PM, Gopalakrishnan Subramani

Re: [BangPypers] Embedded python mail server

2011-08-24 Thread Dhananjay Nene
in shell .. works and looks like a very appropriate tool. Dhananjay On Wed, Aug 24, 2011 at 1:10 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Just discovered http://www.lastcraft.com/fakemail.php On Wed, Aug 24, 2011 at 12:37 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote

[BangPypers] Embedded python mail server

2011-08-23 Thread Dhananjay Nene
What would be good options to embed a python mail server ? The scope is strictly restricted to automated testing. So the embedded mail server (embedded in the test cases) acts as the server which receives email and is in turn further queried to ensure receipt of email correctly. One option is

Re: [BangPypers] Embedded python mail server

2011-08-23 Thread Dhananjay Nene
On Wed, Aug 24, 2011 at 11:06 AM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/24 Dhananjay Nene dhananjay.n...@gmail.com: What would be good options to embed a python mail server ? The scope is strictly restricted to automated testing. So the embedded mail server (embedded in the test

[BangPypers] Would pypy result in a recast of what are the more efficient pythonic idioms ?

2011-08-11 Thread Dhananjay Nene
I had done some benchmarking of code in various languages 3 years ago. I had not chosen to implement either the most efficient code, instead preferring to stick to a specific style of implementation. (The experiment is documented at

Re: [BangPypers] PyPy outperforms C in microbenchmark

2011-08-03 Thread Dhananjay Nene
On Wed, Aug 3, 2011 at 1:22 PM, Noufal Ibrahim nou...@gmail.com wrote: Anand Balachandran Pillai abpil...@gmail.com writes: On Wed, Aug 3, 2011 at 12:50 PM, Noufal Ibrahim nou...@gmail.com wrote: PyPy outperforms C in a little benchmark capitalising on gcc's inability to optimise across

Re: [BangPypers] PyPy outperforms C in microbenchmark

2011-08-03 Thread Dhananjay Nene
On Wed, Aug 3, 2011 at 9:58 PM, Gopalakrishnan Subramani gopalakrishnan.subram...@gmail.com wrote: I could not understand the PyPy intention in having another run-time. Can we see having PyPy running Python programs, 1.  As a challenge? (A language can have its own runtime with little

Re: [BangPypers] if not with comparision statement in python

2011-08-02 Thread Dhananjay Nene
On Tue, Aug 2, 2011 at 11:12 AM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Aug 1, 2011 at 7:51 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Mon, Aug 1, 2011 at 7:26 PM, Anand Balachandran Pillai abpil...@gmail.com wrote:  IMHO, map/filter/reduce and the inevitable

Re: [BangPypers] parsing xml

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 12:43 AM, Noufal Ibrahim nou...@gmail.com wrote: Dhananjay Nene dhananjay.n...@gmail.com writes: [...] re.search(distance\s*(\d+)\s*/distance,data).group(1) would appear to be the most succinct and quite fast. Adjust for whitespace as and if necessary

[BangPypers] #lazyweb - How would the wsgi lite proposal help in ..

2011-08-01 Thread Dhananjay Nene
After Armin Ronacher's post http://lucumr.pocoo.org/2011/7/27/the-pluggable-pipedream/ P. J. Eby responded with http://dirtsimple.org/2011/07/wsgi-is-dead-long-live-wsgi-lite.html with an implementation at https://bitbucket.org/pje/wsgi_lite/ While I could potentially read up the details and

Re: [BangPypers] if not with comparision statement in python

2011-08-01 Thread Dhananjay Nene
On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar asif.jama...@rezayat.net wrote: What if I have two lists for both minimum and maximum values Minimum  Maximum 0               10 11              20 21              30 31              40 Now how should I check if actual result is not laying

Re: [BangPypers] parsing xml

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 12:46 AM, Noufal Ibrahim nou...@gmail.com wrote: Venkatraman S venka...@gmail.com writes: Hang around in #django or #python. The most elegant code that you *should* write would invariably be pretty fast (am not ref to asm). I agree with you here. Pythonicity is best

Re: [BangPypers] if not with comparision statement in python

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/1 Dhananjay Nene dhananjay.n...@gmail.com: On Sat, Jul 30, 2011 at 2:15 PM, Asif Jamadar asif.jama...@rezayat.net wrote: What if I have two lists for both minimum and maximum values Minimum  Maximum 0

Re: [BangPypers] if not with comparision statement in python

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 5:07 PM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/1 Dhananjay Nene dhananjay.n...@gmail.com: On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/1 Dhananjay Nene dhananjay.n...@gmail.com: On Sat, Jul 30, 2011 at 2:15 PM, Asif

Re: [BangPypers] if not with comparision statement in python

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 4:41 PM, Baishampayan Ghose b.gh...@gmail.com wrote: On Mon, Aug 1, 2011 at 4:38 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: I also find map much more atomic and portable construct to think in - after all every list comprehension is syntactic sugar around map

Re: [BangPypers] #lazyweb - How would the wsgi lite proposal help in ..

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 5:41 PM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/1 Dhananjay Nene dhananjay.n...@gmail.com: [..] How could the above proposal (if it does) help in a) Creating simpler, lighter frameworks (eg. flask) b) Help support greater asynchronicity (a la tornado

Re: [BangPypers] if not with comparision statement in python

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 5:44 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Mon, Aug 1, 2011 at 5:07 PM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/1 Dhananjay Nene dhananjay.n...@gmail.com: On Mon, Aug 1, 2011 at 4:17 PM, Anand Chitipothu anandol...@gmail.com wrote: 2011/8/1

Re: [BangPypers] parsing xml

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 7:51 PM, Noufal Ibrahim nou...@gmail.com wrote: Anand Balachandran Pillai abpil...@gmail.com writes: On Mon, Aug 1, 2011 at 6:08 AM, Anand Chitipothu anandol...@gmail.comwrote: [...] It is more subtler than that. List comprehensions are faster than map functions

Re: [BangPypers] List Comprehensions Vs. map/filter (Was: if not with comparision statement in python)

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 8:30 PM, Anand Chitipothu anandol...@gmail.com wrote: I knew there was a way to better implement flatmap - its a combination of itertools.chain.from_iterable and map. Here's a much cleaner code from itertools import chain print filter(lambda (x,y,z) : x*x + y*y == z*z,

Re: [BangPypers] List Comprehensions Vs. map/filter (Was: if not with comparision statement in python)

2011-08-01 Thread Dhananjay Nene
On Mon, Aug 1, 2011 at 8:30 PM, Anand Chitipothu anandol...@gmail.com wrote: I was trying to translate Python list-comprehensions into Javascript and here is what I've come up with. $pyjs.listcomp(    function(x, y, z) { return [x, y, z]},    [        range(1, 100),        function(x) {

Re: [BangPypers] parsing xml

2011-07-31 Thread Dhananjay Nene
On Thu, Jul 28, 2011 at 3:18 PM, Kenneth Gonsalves law...@gmail.com wrote: hi, here is a simplified version of an xml file: ?xml version=1.0 encoding=UTF-8? gpx metadata author nameCloudMade/name email id=support

Re: [BangPypers] [OT] language fanaticism

2011-07-16 Thread Dhananjay Nene
On Sat, Jul 16, 2011 at 3:30 PM, Noufal Ibrahim nou...@gmail.com wrote: Dhananjay Nene dhananjay.n...@gmail.com writes: [...] I suspect it all boils down to whether I value my time and my customer's money over or under my preferred language. Once thats clear - the path ahead also

Re: [BangPypers] Python and Employment

2011-07-16 Thread Dhananjay Nene
On Fri, Jul 15, 2011 at 6:51 PM, kunal ghosh kunal...@gmail.com wrote: Hi all, I read a lot of emails in this list and others, posting job offerings. They all list, years of experience required by a candidate to be considered for the job. But what is the metric to measure this experience.

Re: [BangPypers] [OT] language fanaticism

2011-07-15 Thread Dhananjay Nene
On Thu, Jul 14, 2011 at 10:03 AM, Noufal Ibrahim nou...@gmail.com wrote: My basic point is that if there's a tool written already that *does* the job you want done, would you stay away from it purely because its not in your favourite language? No. Boils down to whether I am going to be a

Re: [BangPypers] [OT] language fanaticism

2011-07-15 Thread Dhananjay Nene
On Thu, Jul 14, 2011 at 2:33 PM, Kenneth Gonsalves law...@gmail.com wrote: On Thu, 2011-07-14 at 10:31 +0530, Baishampayan Ghose wrote: what fun! I don't understand how Django apps can automatically guarantee a certain level of security while PHP applications can't. Are you trying to

[BangPypers] Cool developments on the PyPy front

2011-06-30 Thread Dhananjay Nene
This is an informational post only. I've been watching some of the performance developments on PyPy, but this one made me feel real good. Apparently PyPy is going to lose the GIL and implement locking via STM http://morepypy.blogspot.com/2011/06/global-interpreter-lock-or-how-to-kill.html --

Re: [BangPypers] The myth of free software

2011-05-19 Thread Dhananjay Nene
Precisely my question on your original post. On Tue, May 17, 2011 at 11:23 AM, Santosh Rajan santra...@gmail.com wrote: Are you talking to thin air? You haven't quoted anything??? On Tue, May 17, 2011 at 11:19 AM, Noufal Ibrahim nou...@gmail.com wrote: You're confusing open source, free

Re: [BangPypers] The myth of free software

2011-05-19 Thread Dhananjay Nene
On Wed, May 18, 2011 at 6:41 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Wed, May 18, 2011 at 6:34 PM, Santosh Rajan santra...@gmail.com wrote: Ok I will agree to stop, under one condition, can you please explain the code I have written above? Well, thank you for the

[BangPypers] Interesting post on Ruby concurrency model

2011-02-23 Thread Dhananjay Nene
http://merbist.com/2011/02/22/concurrency-in-ruby-explained/ Posting here since there's probably a lot of matters here which pythonistas would be interested in. While there are a few comments on the post, the twittersphere had actually some far more interesting discussions.

Re: [BangPypers] Interesting post on Ruby concurrency model

2011-02-23 Thread Dhananjay Nene
On Thu, Feb 24, 2011 at 8:08 AM, Ramdas S ram...@gmail.com wrote: On Thu, Feb 24, 2011 at 1:58 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: http://merbist.com/2011/02/22/concurrency-in-ruby-explained/ nice one. I didn't quite follow some of the stuff. For eg:the fiber in Ruby, do we

Re: [BangPypers] NoSQL

2011-02-13 Thread Dhananjay Nene
On Sun, Feb 13, 2011 at 3:06 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Sun, Feb 13, 2011 at 2:21 PM, Noufal Ibrahim nou...@gmail.com wrote: On Sun, Feb 13 2011, Anand Balachandran Pillai wrote: I am sure many of you must have gone through this discussion, but sharing

Re: [BangPypers] NoSQL

2011-02-13 Thread Dhananjay Nene
This is not in response to any specific comment as opposed to an addition to the overall thread, and just a quick formatting of some of my findings on the matter. a. Understanding of CAP theorem http://www.julianbrowne.com/article/viewer/brewers-cap-theorem and its relevance in the specific set

Re: [BangPypers] Ideas for Python concurrency...

2011-02-08 Thread Dhananjay Nene
On Tue, Feb 8, 2011 at 2:15 PM, Vishal vsapr...@gmail.com wrote: On Tue, Feb 8, 2011 at 2:10 PM, Baishampayan Ghose b.gh...@gmail.com wrote: Mutliprocessing means, data copying, talking to each other through PIPES, also it has its issues with running on Windows (all function calls

Re: [BangPypers] refactoring

2010-12-06 Thread Dhananjay Nene
On Wed, Dec 1, 2010 at 4:33 PM, Kenneth Gonsalves law...@au-kbc.org wrote: hi, I know that this has cropped up in a parallel thread, but anyway I would like a new thread on this. In a LUG list a ruby guy made a statement that 'No self respecting developer could function without having read

Re: [BangPypers] regular expression for Indian landline numbers

2010-11-25 Thread Dhananjay Nene
On Thu, Nov 25, 2010 at 3:11 PM, Kenneth Gonsalves law...@au-kbc.orgwrote: hi, on looking at the telephone book, Indian landline numbers have three forms 3 digit STD code followed by 8 digits 4 digit STD code followed by 7 digits 5 digit STD code followed by 6 digits the first digit of

Re: [BangPypers] regular expression for Indian landline numbers

2010-11-25 Thread Dhananjay Nene
On Fri, Nov 26, 2010 at 11:40 AM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Fri, 2010-11-26 at 11:30 +0530, Mandar Vaze / मंदार वझे wrote: look at http://en.wikipedia.org/wiki/Mobile_telephone_numbering_in_India (But kenneth may have already looked at this) no, I had not looked at

Re: [BangPypers] regular expression for Indian landline numbers

2010-11-25 Thread Dhananjay Nene
On Fri, Nov 26, 2010 at 11:59 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Fri, Nov 26, 2010 at 11:40 AM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Fri, 2010-11-26 at 11:30 +0530, Mandar Vaze / मंदार वझे wrote: look at http://en.wikipedia.org/wiki

Re: [BangPypers] parsing directory and subdirecties

2010-11-19 Thread Dhananjay Nene
On Sat, Nov 20, 2010 at 5:28 AM, Vasudevan N vasudevan...@gmail.com wrote: The simplest way would be to use recursive calls. Vasu, a. That could still entail a loop on a files per directory basis b. If you avoid the loop and recurse on a per file (eg by shaving the head off the sequence and

Re: [BangPypers] parsing directory and subdirecties

2010-11-18 Thread Dhananjay Nene
On Thu, Nov 18, 2010 at 10:46 AM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Thu, 2010-11-18 at 10:26 +0530, Asokan Pichai wrote: On 18 November 2010 09:35, Nitin Kumar nitin.n...@gmail.com wrote: hi all, is there any simple way where a can parse into directory and subdirectories

Re: [BangPypers] Access xml file form python script

2010-11-01 Thread Dhananjay Nene
On Sun, Oct 31, 2010 at 5:12 PM, Avinash TM avinas...@gmail.com wrote: Hi All, I have created a simple xml document i.e., preferences.xml as follows ?xml version=1.0? object object name=category value=cricket property name=titleCricket/property property name=subscribers element

Re: [BangPypers] When *not* to use Python

2010-10-26 Thread Dhananjay Nene
On Tue, Oct 26, 2010 at 11:47 AM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Oct 25, 2010 at 7:33 AM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Wed, Oct 20, 2010 at 4:57 PM, Noufal Ibrahim nou...@gmail.com wrote: Assuming that most of the people here

Re: [BangPypers] When *not* to use Python

2010-10-24 Thread Dhananjay Nene
On Wed, Oct 20, 2010 at 4:57 PM, Noufal Ibrahim nou...@gmail.com wrote: Assuming that most of the people here are mostly python enthusiasts or learners, I'm wondering when you would *not* use Python. Let's not conflate this with Open Source/Closed Source etc. Python is the language which

Re: [BangPypers] install feedparser

2010-09-29 Thread Dhananjay Nene
On Thu, Sep 30, 2010 at 12:02 AM, Avinash TM avinas...@gmail.com wrote: Hi all, While I am working with feedparser , i downloaded feedparser-4.1.zip then unziped also , it becomes feedparser.py (executable) . Then if i tried this below command #python feedparser.py install it will show

[BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
While python's multimethod module allows function overloading based on types, here's another approach to do the same based on a switching function (clojure style) or on a set of conditions. Clojure style multimethod functions in

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
, Dhananjay Nene dhananjay.n...@gmail.com wrote: While python's multimethod module allows function overloading based on types, here's another approach to do the same based on a switching function (clojure style) or on a set of conditions. Clojure style multimethod functions in python

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
On Mon, Aug 23, 2010 at 8:13 PM, Baishampayan Ghose b.gh...@gmail.comwrote: While python's multimethod module allows function overloading based on types, here's another approach to do the same based on a switching function (clojure style) or on a set of conditions. Clojure style

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
On Mon, Aug 23, 2010 at 8:36 PM, Baishampayan Ghose b.gh...@gmail.comwrote: Dhananjay, Could you help explain in light of the following (the argument lists are in bold). The switcher function is provided exactly the same arguments as the various multimethods. Probably something about

Re: [BangPypers] Dictionary : An elementary question

2010-08-19 Thread Dhananjay Nene
Lots of good answers. Warning: *this answer is ultra simplistic one to explain the implementation succinctly*. A little more from an implementation perspective dict operations usually involve converting a dict into a hash. This hash is then converted into a bucket. And sometimes when one gets

Re: [BangPypers] Do you think a more declarative RE syntax would make the world a better place ?

2010-08-09 Thread Dhananjay Nene
On Mon, Aug 9, 2010 at 5:04 PM, Vishal vsapr...@gmail.com wrote: Hello fellas, I am trying to create a python function that can take an plain english description of a regular expression and return the regular expression to the caller. Currently I am thinking of the description in YAML

Re: [BangPypers] string to list query

2010-08-05 Thread Dhananjay Nene
Here's a slightly different approach def splitter(input): buffer = [] slash = False for char in input : if len(buffer) == 0 : buffer.append(char) elif char == '/' : buffer.append(char) slash = True elif slash :

  1   2   >