Re: [BangPypers] HTML Parsing in python

2009-09-10 Thread Dhananjay Nene
Do you require tolerance for non well formed xml / html ? If y, you may consider sgmlop http://effbot.org/zone/sgmlop-index.htm On Thu, Sep 10, 2009 at 7:07 PM, Baishampayan Ghose b.gh...@gmail.comwrote: Can anyone suggest me a good library for html parsing in python ? I googled a found few

Re: [BangPypers] [OT] Guido's Tweet on Top Posting

2009-09-11 Thread Dhananjay Nene
Comments inline On Fri, Sep 11, 2009 at 2:12 PM, Baishampayan Ghose b.gh...@gmail.comwrote: why? in the first place I am extremely sensitive to top posting, but have never used usenet or been in a C forum. I only learned about interleaved posting in about 2002 or so. And the vast

Re: [BangPypers] [OT] Guido's Tweet on Top Posting

2009-09-11 Thread Dhananjay Nene
Kenneth, Comments inline, On Fri, Sep 11, 2009 at 2:50 PM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Friday 11 Sep 2009 2:41:48 pm Dhananjay Nene wrote: I haven't since a convincing argument either way on the topic why should newer folks adopt or not adopt a Usenet sensibility. IMO

Re: [BangPypers] [OT] Guido's Tweet on Top Posting

2009-09-11 Thread Dhananjay Nene
Correction inline (sorry for one more post just for that) On Fri, Sep 11, 2009 at 3:09 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Kenneth, Comments inline, On Fri, Sep 11, 2009 at 2:50 PM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Friday 11 Sep 2009 2:41:48 pm Dhananjay Nene

[BangPypers] Recommendation of hotels nr Pycon event

2009-09-11 Thread Dhananjay Nene
Just did my travel reservations for travelling to banglore for Pycon. Need recommendations on hotels that are relatively near the event premises (its in IISc right ?). Preferably looking for something less than 3k per night (though I am told such a price category no longer exists in Bangalore

Re: [BangPypers] Friendfeed's web server framework open sourced

2009-09-14 Thread Dhananjay Nene
http://www.apparatusproject.org/blog/2009/09/twisted-web-vs-tornado-performance-test/ On Mon, Sep 14, 2009 at 6:27 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Fri, Sep 11, 2009 at 10:32 PM, Anand Chitipothu anandol...@gmail.comwrote: 2009/9/11 Dhananjay Nene dhananjay.n

Re: [BangPypers] Friendfeed's web server framework open sourced

2009-09-14 Thread Dhananjay Nene
One more study with slightly different results hyperlinked below inline On Mon, Sep 14, 2009 at 6:43 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: http://www.apparatusproject.org/blog/2009/09/twisted-web-vs-tornado-performance-test/ On Mon, Sep 14, 2009 at 6:27 PM, Anand Balachandran

Re: [BangPypers] Perl or Python ?

2009-10-13 Thread Dhananjay Nene
On Mon, Oct 12, 2009 at 2:09 PM, Gopinath R gopiindia...@gmail.com wrote: Hi everyone, It is my pleasure finding this mailing list. I am a Open Source guy. but not an expert. I m strong in Shell Scripting. I need to learn one more open source language for excellent job opportunities. I am

Re: [BangPypers] Posting style

2009-10-21 Thread Dhananjay Nene
On Tue, Oct 20, 2009 at 5:31 PM, Kenneth Gonsalves law...@au-kbc.orgwrote: On Tuesday 20 Oct 2009 5:28:52 pm Noufal Ibrahim wrote: On Tue, Oct 20, 2009 at 3:53 PM, Baiju M mba...@zeomega.com wrote: Hi, I hope this link would be useful for some newly joined members:

Re: [BangPypers] sort query

2009-10-24 Thread Dhananjay Nene
On Sat, Oct 24, 2009 at 1:32 PM, bhaskar jain bhaskar.jain2...@gmail.comwrote: Hello, Can sort not modify read-only location. d {'a': 1, 'c': 3, 'b': 2} id(d) 412816 id(d.keys()) 404296 type(d.keys()) type 'list' print d.keys().sort() None We can so sorted(d.keys()) and

Re: [BangPypers] sort query

2009-10-24 Thread Dhananjay Nene
On Sat, Oct 24, 2009 at 4:49 PM, bhaskar jain bhaskar.jain2...@gmail.comwrote: Thanks all for replying. Let me be clear, [..snip..] Now if we have, d = {'a':1, 'b':2} l = d.keys().sort() print l None d.keys() is a list which references the keys of the dictionary. But the sort

Re: [BangPypers] Google Go

2009-11-11 Thread Dhananjay Nene
On Wed, Nov 11, 2009 at 2:23 PM, varunthac...@aol.in wrote: I just heard about Google Go.My first reaction was of excitement.But when i read about it i'm clueless as to what is it aiming for? What do every feel about it? this is the link to the blog post announcing Go.

Re: [BangPypers] Google Go

2009-11-11 Thread Dhananjay Nene
On Wed, Nov 11, 2009 at 6:46 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Wed, Nov 11, 2009 at 2:23 PM, varunthac...@aol.in wrote: I just heard about Google Go.My first reaction was of excitement.But when i read about it i'm clueless as to what is it aiming for? What do every feel

Re: [BangPypers] import module error

2009-11-16 Thread Dhananjay Nene
This is likely to help http://dbfpy.sourceforge.net/ Note the import statements change based on the version On Mon, Nov 16, 2009 at 8:23 PM, Ranganath s rangana...@gmail.com wrote: Hi all, i downloaded the dbf module and installed the module using the command python setup.py

Re: [BangPypers] Suggest me a book for ORM

2009-12-01 Thread Dhananjay Nene
Srinivas, While I am not aware of a book, some useful readings are likely to be found in the Data section at http://www.ambysoft.com/onlineWritings.html (I read a lot of his articles many years ago, and did find them quite useful then. Dhananjay Srinivas Reddy Thatiparthy wrote: Hi all,

Re: [BangPypers] Tuples vs Lists, perfromance difference

2009-12-24 Thread Dhananjay Nene
On Thu, Dec 24, 2009 at 2:36 PM, Senthil Kumaran orsent...@gmail.comwrote: On Thu, Dec 24, 2009 at 11:19:18AM +0530, Navin Kabra wrote: Nope. With JIT compilation, a JVM can actually beat C++ This seems a controversial statement to make. I have seen this come up time and again at various

Re: [BangPypers] How should I do it?

2010-01-14 Thread Dhananjay Nene
This seems to be an output of print_r of PHP. If you have a flexibility, try to have the PHP code output the data into a language neutral format (eg json, yaml, xml etc.) and then parse it in python using the appropriate parser. If not you may have to write a custom parser. I did google to find if

Re: [BangPypers] How should I do it?

2010-01-15 Thread Dhananjay Nene
On Fri, Jan 15, 2010 at 12:01 PM, Eknath Venkataramani eknath.i...@gmail.com wrote: I have a txt file in the following format: [code] confident = { count = 4, trans = { ashahvasahta = 0.74918568, atahmavaishahvaasa = 0.09095465, pahraaram\.nbha = 0.06990729, mailatae

Re: [BangPypers] The merge : Unladen Swallow into CPython

2010-01-21 Thread Dhananjay Nene
On Thu, Jan 21, 2010 at 12:10 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Thu, Jan 21, 2010 at 10:59 AM, Noufal Ibrahim nou...@gmail.com wrote: http://thread.gmane.org/gmane.comp.python.devel/109919 Looks it's really lead laden rather than unladen. An interpreter binary

Re: [BangPypers] The merge : Unladen Swallow into CPython

2010-01-21 Thread Dhananjay Nene
On Thu, Jan 21, 2010 at 7:57 PM, Noufal Ibrahim nou...@gmail.com wrote: On Thu, Jan 21, 2010 at 6:57 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: [..] I think the comparison of a VM enhanced CPython vs. traditional CPython is a little unfair when conducted from a binary size

Re: [BangPypers] Regarding Python popularity

2010-02-08 Thread Dhananjay Nene
On Mon, Feb 8, 2010 at 4:20 PM, Kenneth Gonsalves law...@au-kbc.org wrote: could you fix your mail client please - the formatting is a mess and I cannot make out what is quoted and what is not Hmm.. begs the question what could I do about it .. its GMail web client :D Not sure if I have a

Re: [BangPypers] Regarding Python popularity

2010-02-08 Thread Dhananjay Nene
On Mon, Feb 8, 2010 at 4:50 PM, Noufal Ibrahim nou...@gmail.com wrote: On Mon, Feb 8, 2010 at 4:24 PM, Kenneth Gonsalves law...@au-kbc.org wrote: On Monday 08 Feb 2010 4:17:23 pm Dhananjay Nene wrote: So to put it simply - there is no simple cut and dry answer. If you look beyond

Re: [BangPypers] Regarding Python popularity

2010-02-08 Thread Dhananjay Nene
On Mon, Feb 8, 2010 at 5:57 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Feb 8, 2010 at 5:06 PM, Navin Kabra navin.ka...@gmail.com wrote: On Mon, Feb 8, 2010 at 4:58 PM, Shashwat Anand anand.shash...@gmail.com wrote: Mine one of senior (at Amazon) suggested me Go

Re: [BangPypers] which one is the best pythonic way .

2010-02-08 Thread Dhananjay Nene
On Tue, Feb 9, 2010 at 1:03 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Anand Balachandran Pillai wrote: On Tue, Feb 9, 2010 at 10:52 AM, Srinivas Reddy Thatiparthy srinivas_thatipar...@akebonosoft.com wrote: Thanks for the replies and I avoid using lambdas.. Btw,Shall I avoid

[BangPypers] Simple python database library

2010-03-03 Thread Dhananjay Nene
Looking for a simple opensource python database library Objectives : - Should work at a level of abstraction above DB-Api. I should not have to change code generally except for changing database configuration parameters. - Should be able to write code independent of the database (except where the

Re: [BangPypers] Simple python database library

2010-03-03 Thread Dhananjay Nene
Hi, On Wed, Mar 3, 2010 at 6:51 PM, steve st...@lonetwin.net wrote: Hi, On 03/03/2010 04:36 PM, Dhananjay Nene wrote: Looking for a simple opensource python database library Objectives : - Should work at a level of abstraction above DB-Api. I should not have to change code generally

Re: [BangPypers] Simple python database library

2010-03-05 Thread Dhananjay Nene
On Fri, Mar 5, 2010 at 3:14 PM, Noufal Ibrahim nou...@gmail.com wrote: Are there any real harcode SQLAlchemy people here on the group? A talk on the ORM would be much appreciated I'm sure. I might add that I've worked with ORMs almost regularly since 1996 in C++, Java and Python.

Re: [BangPypers] Simple python database library

2010-03-05 Thread Dhananjay Nene
On Fri, Mar 5, 2010 at 3:58 PM, Noufal Ibrahim nou...@gmail.com wrote: On Fri, Mar 5, 2010 at 3:37 PM, Kenneth Gonsalves law...@au-kbc.org wrote: On Friday 05 Mar 2010 3:22:12 pm Dhananjay Nene wrote: I might add that I've worked with ORMs almost regularly since 1996 in C++, Java

Re: [BangPypers] Simple python database library

2010-03-05 Thread Dhananjay Nene
On Fri, Mar 5, 2010 at 3:59 PM, steve st...@lonetwin.net wrote: I personally prefer SQLObject because it comes across as being more pythonic than SQLAlchemy, of course YMMV. Quite likely .. but it doesn't try to be pythonic, its focused more on staying consistent with its relational

Re: [BangPypers] Simple python database library

2010-03-05 Thread Dhananjay Nene
On Fri, Mar 5, 2010 at 12:49 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: I've decided to go ahead with SQLAlchemy even though that was not my favourite. FWIW I'm just documenting my thoughts : Cons : Why I would've not preferred SQL Alchemy a. Dependency into a large full function

Re: [BangPypers] [COMMERCIAL] CodersCombat project hosting servicefor all

2010-04-14 Thread Dhananjay Nene
On Wed, Apr 14, 2010 at 5:44 PM, Azhagu selvan azhagusel...@gmx.com wrote: CodersCombat is not for hosting a *single* person's code somewhere on the web. It's meant to be a online collaboration platform for a team of devs. Rs.600 gives you a project and three user logins. So ours is dead

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 12:02 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Apr 26, 2010 at 12:00 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Apr 26, 2010 at 11:52 AM, Noufal Ibrahim nou...@gmail.com wrote: On Mon, Apr 26, 2010 at 11:49 AM,

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 12:11 PM, Noufal Ibrahim nou...@gmail.com wrote: On Mon, Apr 26, 2010 at 12:00 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: [..] If you don't think that as a huge business opportunity, I wonder what kind of Python consultant you are ;-)[..] Oh. I do.

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 1:53 PM, Noufal Ibrahim nou...@gmail.com wrote: On Mon, Apr 26, 2010 at 1:48 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: [..] I don't see a normal business transaction processing runtime getting influenced particularly. Python is a candidate for replacing

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 2:08 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Apr 26, 2010 at 1:48 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Whoa! what becomes law ? From what i can understand it primarily refers to the preferred mechanism of documenting

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 3:18 PM, Sirtaj Singh Kang sir...@sirtaj.netwrote: On 26-Apr-10, at 2:25 PM, Dhananjay Nene wrote: [snip] I do see one strong plus here for Python. That is a very natural language for expression (as in being one of the most readable programming languages for non

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 3:46 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Mon, Apr 26, 2010 at 3:18 PM, Sirtaj Singh Kang sir...@sirtaj.netwrote: This is not a deal-breaker of course, and this decision to use Python is a sensible, pragmatic one (lots of python programmers around

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 4:12 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Apr 26, 2010 at 3:46 PM, Dhananjay Nene dhananjay.n...@gmail.com wrote: On Mon, Apr 26, 2010 at 3:18 PM, Sirtaj Singh Kang sir...@sirtaj.net wrote: This is not a deal-breaker of course

Re: [BangPypers] Wall street may embrace Python

2010-04-26 Thread Dhananjay Nene
On Mon, Apr 26, 2010 at 5:12 PM, Sirtaj Singh Kang sir...@sirtaj.netwrote: On 26-Apr-10, at 4:47 PM, Rajeev J Sebastian wrote: [snip] With all due respect, I disagree that a DSL is useful for this purpose. In fact, I would disagree with DSLs in most cases, especially if its supposed to be

Re: [BangPypers] if we compare Rails and django

2010-05-01 Thread Dhananjay Nene
To the best of my knowledge ajax, java scripts require you to carefully select a good client side library. I would suggest jquery. I have no clue about video streaming. There is little in your question to help decide the choice of the framework. However the frameworks are the carts. The languages

Re: [BangPypers] Please help me get the CD ROM of PYTHON PROGRAMMING FOR ABSOLUTE BEGINNERS

2010-05-04 Thread Dhananjay Nene
On Tue, May 4, 2010 at 7:09 PM, VAIBHAV KATIYAR kkvaib...@gmail.com wrote: Dear All, I an a non programmer and just started to learn PYTHON language. I downloaded a textbook called PYTHON PROGRAMMING FOR ABSOLUTE BEGINNERS By MICHAEL DAWSON from the internet. But that does not

Re: [BangPypers] Please help me get the CD ROM of PYTHON PROGRAMMING FOR ABSOLUTE BEGINNERS

2010-05-04 Thread Dhananjay Nene
On Tue, May 4, 2010 at 10:45 PM, Noufal Ibrahim nou...@gmail.com wrote: On Tue, May 4, 2010 at 7:09 PM, VAIBHAV KATIYAR kkvaib...@gmail.com wrote: Dear All, I an a non programmer and just started to learn PYTHON language. I downloaded a textbook called PYTHON PROGRAMMING

Re: [BangPypers] python for parsing

2010-05-23 Thread Dhananjay Nene
On Mon, May 24, 2010 at 12:51 AM, Rahul R rahul8...@gmail.com wrote: Hello everyone , I am new to this community . recently i attended a python workshop in my college and got a lot mesmerised by the language so finally decided to port my mini project which i have partially written using LEX

Re: [BangPypers] extracting unicode text from pdfs

2010-05-24 Thread Dhananjay Nene
You may want to try out pdfminer. Its very similar to xpdf in structure and should give you the parsed data into unicode directly. On Mon, May 24, 2010 at 7:13 PM, Eknath Venkataramani eknath.i...@gmail.com wrote: I have around 45 pdfs to convert into raw text containing text in _HINDI_ .

Re: [BangPypers] Extracting tar.gz file

2010-05-26 Thread Dhananjay Nene
Instinctively, the error seems to be opening the file and not with the tarfile decoding. You may want to check if open(sample.tar.gz,r) works. Dhananjay On Thu, May 27, 2010 at 6:19 AM, murugadoss murugadoss2...@gmail.comwrote: Hi all, I am trying to extract tar.gz file using python script.

Re: [BangPypers] Extracting tar.gz file

2010-05-26 Thread Dhananjay Nene
On Thu, May 27, 2010 at 6:39 AM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Instinctively, the error seems to be opening the file and not with the tarfile decoding. You may want to check if open(sample.tar.gz,r) works. Dhananjay On Thu, May 27, 2010 at 6:19 AM, murugadoss murugadoss2

Re: [BangPypers] Extracting tar.gz file

2010-05-26 Thread Dhananjay Nene
, Dhananjay Nene dhananjay.n...@gmail.comwrote: Instinctively, the error seems to be opening the file and not with the tarfile decoding. You may want to check if open(sample.tar.gz,r) works. Dhananjay On Thu, May 27, 2010 at 6:19 AM, murugadoss murugadoss2...@gmail.com wrote: Hi all

[BangPypers] Simple queries which can be googled for Was: splitting the string

2010-05-29 Thread Dhananjay Nene
On Sat, May 29, 2010 at 2:47 PM, murugadoss murugadoss2...@gmail.comwrote: Hi, I want to split the string using the delimiter, can any please suggest me way to do it in python for example: one;two;three;four (string) i need to split this string using ; like one,two,three,four I am

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 :

Re: [BangPypers] python speed comparison

2010-08-05 Thread Dhananjay Nene
On Fri, Jul 23, 2010 at 1:26 PM, Emil Chacko emilcha...@gmail.com wrote: Below given is solution to a puzzle( http://projecteuler.net/index.php?section=problemsid=14) in python and c Python: import time startT=time.time() maxlen=0 longest=0 for i in xrange(1,100): last=i cnt=0

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

[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] 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

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

[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] 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] 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] [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

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

[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

[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

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

  1   2   >