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

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

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

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

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

<    1   2