Re: [BangPypers] Anyone knows something about VPS Hosting?

2008-01-14 Thread Anand Chitipothu
On 1/14/08, Darkseid [EMAIL PROTECTED] wrote: I've had a very good experience with slicehost.com. If you're feeling wealthy (or have high traffic), Amazon's EC2 is an excellent option too. Even I am very happy with slicehost. ___ BangPypers mailing

Re: [BangPypers] How to check file size before downloading it

2008-05-07 Thread Anand Chitipothu
On Wed, May 7, 2008 at 4:49 PM, Gurpreet Sachdeva [EMAIL PROTECTED] wrote: Is there a way in urllib to check file size (from the webserver) before downloading it? Or any other python module from this? If you are on *nix, you can use curl -I to make a HEAD request, which contains Content-Length

Re: [BangPypers] How to check file size before downloading it

2008-05-07 Thread Anand Chitipothu
On Wed, May 7, 2008 at 5:41 PM, Anand Balachandran Pillai [EMAIL PROTECTED] wrote: Make a HEAD request. Here is one way of doing it, using urllib2. class HeadRequest(urllib2.Request): A request class which performs a HEAD request def get_method(self): return 'HEAD' req

Re: [BangPypers] How to sort the IP(s)

2008-05-08 Thread Anand Chitipothu
On Thu, May 8, 2008 at 2:47 PM, Anand Balachandran Pillai [EMAIL PROTECTED] wrote: Do you really need any kind of additional processing ? The basic sort algorithm is smart enough to do this by itself, l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1'] l.sort() l

Re: [BangPypers] BangPypers Digest, Vol 9, Issue 7

2008-05-08 Thread Anand Chitipothu
On Thu, May 8, 2008 at 3:23 PM, Anand Chitipothu [EMAIL PROTECTED] wrote: I have downloaded this picture and in my system, when I checked it, it's size is 132k ie du --si la-brea-tar-pits-address.jpg 132kla-brea-tar-pits-address.jpg It seems to me like a mismatch

Re: [BangPypers] Redirection of standard output to a variable

2008-05-13 Thread Anand Chitipothu
On Tue, May 13, 2008 at 3:18 PM, KartheeK [EMAIL PROTECTED] wrote: Hi Rishabh, My script needs to fetch some critical config files from 200+ servers, process them and put them back in place. I need to make sure at each step that I am doing the right thing. So, I though i would make sure to

Re: [BangPypers] Do u have any python training requirement ?

2008-06-19 Thread Anand Chitipothu
Note: Would be happy to get in touch with fellow trainer / consultant in this group. Hi Sree, I offer training in Python. http://pythonprogramming.jottit.com Anand ___ BangPypers mailing list BangPypers@python.org

Re: [BangPypers] HOW TO ACCESS THE FORUM

2008-08-25 Thread Anand Chitipothu
On Mon, Aug 25, 2008 at 2:26 PM, Gopal Ghosh [EMAIL PROTECTED] wrote: Dear all, I am a registered user of bangpypers, but i don't know how to access the forum or how to check the other threads you can browse archive from here: http://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] help needed with dictionary

2008-08-29 Thread Anand Chitipothu
On Fri, Aug 29, 2008 at 3:27 PM, sunny_plone [EMAIL PROTECTED] wrote: hi, sorry for late reply. i want to create a address book which has fields like name, phno, email id etc which are keys and i want each key to hav multiple values as many users will enter their names. so name key

Re: [BangPypers] FYI

2008-08-29 Thread Anand Chitipothu
On Fri, Aug 29, 2008 at 3:56 PM, Kore, Amol (Amol) [EMAIL PROTECTED] wrote: Please unsubscribe me with bangpyers user list. Go to http://mail.python.org/mailman/listinfo/bangpypers and you will find unsubscribe option at the end of that page. ___

Re: [BangPypers] which framework is better pylon or django

2008-09-08 Thread Anand Chitipothu
On Tue, Sep 9, 2008 at 9:17 AM, Sibtey Mehdi [EMAIL PROTECTED] wrote: Hi I am planning to develop a website but I don't have any idea about the python framework. I found 2 or 3 framework (pylon, Django, turbo Gear) on net but couldn't understand which one should be used. Can you suggest me

Re: [BangPypers] linux / scripting fundamentals

2008-09-16 Thread Anand Chitipothu
Am planning for series of weekend training program in the space of linux/python/java/etc mainly focused on open source technologies. details: http://sites.google.com/a/slashgnu.co.in/weekend-training/ It is free? I couldn't find any fee details in the above link.

Re: [BangPypers] Python use in IT service sector

2009-01-11 Thread Anand Chitipothu
My company is into DSP Design Consultancy and Tech Trainings, in the area of Digital Signal Processing, Digital Image Processing, and Front end VLSI space. For our kind of work Matlab is a good commercial s/w but it's once license would rip-us -off by 3 lakh Rs. Since mine is a self

Re: [BangPypers] Python use in IT service sector

2009-01-11 Thread Anand Chitipothu
C++ is a very tricky language, but once learnt, it is sheer ecstacy. You must be joking. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] how to learn programming

2009-01-20 Thread Anand Chitipothu
Algorithms play important role.I am not biased towards specific language but I have found those how have programmed in C/C++ are generally better(in problem solving) than who program in other languages. I completely disagree. If you want to learn algorithms, then you better work with a

Re: [BangPypers] how to learn programming

2009-01-23 Thread Anand Chitipothu
On Sat, Jan 24, 2009 at 10:50 AM, Chetan Nichkawde chetan.nichka...@gmail.com wrote: Dynamic typing and memory management eases a lot of thing for Python programmers. Agreed. However, I think for a newbie these concepts a must to know. Agreed. Therefore, I think a fresher to should begin

Re: [BangPypers] date/time difference between two dates

2009-02-19 Thread Anand Chitipothu
Not just these functions, but almost the entire time/datetime functions mimic their C counterparts. I always find datetime module very painful to deal with. May be it is because it has borrowed too much from C instead of being pythonic. Just give one example: import datetime t =

Re: [BangPypers] User Groups at devcamp

2009-03-19 Thread Anand Chitipothu
On Fri, Mar 20, 2009 at 10:52 AM, Darkseid lorddae...@gmail.com wrote: That's a nice idea - do you think it would be useful to host user groups as part of dev camp? This may involve no more than priniting (say) BangPyper stickers which can be added to participants name tags, and setting aside a

Re: [BangPypers] Command line goodies

2009-03-25 Thread Anand Chitipothu
Really ? FYI, Python is full of one-liners both of the command-line variety and the code variety. I don't agree. It is painful to write command liners with python. Look at this perl one liner that replaces .py with .txt. ls *.py | perl -ne 's/.py$/.txt/; print $_;' Try writing it in Python

Re: [BangPypers] unladen-swallow

2009-04-02 Thread Anand Chitipothu
2009/4/2 Baishampayan Ghose b.gh...@gmail.com: Bingo!  It seems like cPickle is fast until you play with something like a recent version of simplejson...now that's fast.  And then it's like, boy is cPickle slow.  Pretty soon you're jsonifying everything.  :) And simplejson is fast until you

[BangPypers] magic in datetime module?

2009-04-02 Thread Anand Chitipothu
I'm noticed a strange Import error in some web.py template. I nailed down the problem to the following python code. __builtins__ = {} import datetime now = datetime.datetime.utcnow() print now.strftime(%m %Y) It fails with the following error. Traceback (most recent call last): File foo.py,

Re: [BangPypers] magic in datetime module?

2009-04-03 Thread Anand Chitipothu
2009/4/3 Anand Chitipothu anandol...@gmail.com: I'm noticed a strange Import error in some web.py template. I nailed down the problem to the following python code. __builtins__ = {} import datetime now = datetime.datetime.utcnow() print now.strftime(%m %Y) It fails with the following

Re: [BangPypers] magic in datetime module?

2009-04-03 Thread Anand Chitipothu
__builtins__ = {} import subprocess Traceback (most recent call last):  File stdin, line 1, in module ImportError: __import__ not found Try running this as script. It works! ___ BangPypers mailing list BangPypers@python.org

Re: [BangPypers] magic in datetime module?

2009-04-03 Thread Anand Chitipothu
Let me re-write the code to remove the confusion between command-line and interpreter modes. import datetime now = datetime.datetime.utcnow() __builtins__ = {} print now.strftime(%m %Y) Why should this fail? I did some hack to see who is calling import. import datetime now =

Re: [BangPypers] magic in datetime module?

2009-04-03 Thread Anand Chitipothu
I have a basic doubt - why do you want to set a module as core as __builtins__ to {} in your code ? If you can answer that reasonably, it makes sense to investigate this or raise a bug. Otherwise, I don't think it is good coding. It is used in web.py templating engine to restrict the

Re: [BangPypers] magic in datetime module?

2009-04-03 Thread Anand Chitipothu
   web.py is a great framework, but this is bad coding for sure.   I guess you need to do some hack like,     oldbuiltins=__builtins__     __builtins__ = {}    Then before calling code that breaks,     __builtins__ = oldbuiltins call breaking code here  But this is damn ugly and

Re: [BangPypers] magic in datetime module?

2009-04-03 Thread Anand Chitipothu
2009/4/3 Noufal Ibrahim nou...@gmail.com: There was a thread on python-dev recently about sandboxing code by restricting the variables provided. A lot of people broke it (you can check the archives for break this code or something similar). This one?

Re: [BangPypers] Django and Fcgi

2009-04-15 Thread Anand Chitipothu
The apache log files say that the script dispatch.fcgi ended prematurely. I am unable to figure out the problem. Please help. Which probably means the dispatch.fcgi is not executable. Make sure it is executable and #! /usr/bin/env python is added in the first line. You should be able to

Re: [BangPypers] Python Day India

2009-04-28 Thread Anand Chitipothu
This is a very good idea. We have been talking of a Pycon but this gives a forum for people to come together to discuss the topics for a shorter time period. Certainly this would lead to ideas which can be used for a larger Pycon India. +1 -1 Meeting in june/july will be too late to plan

Re: [BangPypers] Python Day India

2009-04-28 Thread Anand Chitipothu
nice idea. This can give us an idea how many guys will turn iup for actual event No, it only dilutes the spirit of PyCon. some people may decide to attend only one of these two. ___ BangPypers mailing list BangPypers@python.org

Re: [BangPypers] Python Day India

2009-05-01 Thread Anand Chitipothu
I remember reading somewhere that ICH is moved out. Let's have it at Thoughtworks. Thoughtworks is too far. How about Barista at church street? ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] Python Day India

2009-05-01 Thread Anand Chitipothu
 You seem to have a subversive agenda on MG Road that day.  Perhaps a date ;) ? It takes me about 1 and half to 2 hours to reach ThoughtWorks and it just takes less than an hour to reach M G Road. Totally it saves 2 hours of my time.  I am OK with meeting on MG Road or church street. Thanks.

Re: [BangPypers] Python Day India

2009-05-01 Thread Anand Chitipothu
This discussion has turned into a design by committee orgy. The only way this will work is if someone takes charge, makes decisions, and asks the list for approval and publicity, not suggestions. You're better off correcting for bad decisions than expecting a crowd to make them in the first

Re: [BangPypers] Python Day India

2009-05-01 Thread Anand Chitipothu
Another date again? :) Well, there are 5 people signed up for for May 3 meeting. So we are going forward with it.. We can meet up on May 8th, if majority folks feel the need. Saturday is May 9th, not May 8th. +1 for May 9th. ___ BangPypers mailing

Re: [BangPypers] PyCon India logo contest!

2009-05-21 Thread Anand Chitipothu
2009/5/21 Noufal Ibrahim nou...@gmail.com: Here's another one. This one's mine. :) That looks good. Here is another idea if you want to try. Take europython logo[1] and fill the circle with tricolors and write pycon india 2009 using the font used in your logo. [1]: http://www.europython.eu/

Re: [BangPypers] Reg Expression problem and Unicode...

2009-05-26 Thread Anand Chitipothu
text = The Price £7 pattern = u£\d m = re.search(pattern, text, re.UNICODE) print m.group(0) Your text is in utf-8 encoding and pattern in unicode. Make text unicode solves the issue. text = uThe Price £7 pattern = u£\d m = re.search(pattern, text, re.UNICODE) print

Re: [BangPypers] Responding to people who lack the curiosity

2009-06-12 Thread Anand Chitipothu
2009/6/12 Srijayanth Sridhar srijaya...@gmail.com: As we speak: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/339092 Jayanth Don't blame the poor chap here. Blame microsoft for that cryptic error message. 'nmake' is not recognized as an internal or external command, operable

Re: [BangPypers] which is better solution of the question

2009-06-16 Thread Anand Chitipothu
The zip solution is succinct. Also, by the virtue of being a built-in function zip() should be faster than the second approach. Complexity of first solution is O(n) and complexity of second solution is O(n^2) because it using values.index function, which is O(n).

Re: [BangPypers] HTML Parsing in python

2009-09-10 Thread Anand Chitipothu
2009/9/10 Puneet Aggarwal look4pun...@gmail.com: Hi BangPypers, Can anyone suggest me a good library for html parsing in python ? I googled a found few libararies BeautifulSoup, HTMLParser, SGMLParser etc. Can anyone suggest me which should I go for from your experience. I recommend

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

2009-09-11 Thread Anand Chitipothu
2009/9/11 Dhananjay Nene dhananjay.n...@gmail.com: I am curious about the objective .. to the best of my knowledge wsgi is essentially blocking (unless my understanding is incorrect), whereas tornado is primarily non-blocking. So would you see any specific advantages of deploying a wsgi app

Re: [BangPypers] Implementing a fast factorial function in python

2009-09-14 Thread Anand Chitipothu
 16 fac = int(str(fac * i).strip('0')) % 10 This is ugly hack. Can you think of something more mathematical? Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] Implementing a fast factorial function in python

2009-09-14 Thread Anand Chitipothu
The key point i think is we do not need factorial but modulus 10**5 without trailing zeros. Didn't helped though :( may be a better implementation could help I think the right solution will NOT involve 10**12 computations. Think about it. ___

[BangPypers] volunteers required

2009-09-23 Thread Anand Chitipothu
We require some volunteers during the PyCon conference for the tasks given below. Please signup. * Registration support We need 2-3 people to help at the registration desk during first half of day 1. * Food coordination We need 2-3 people to coordinate food at tea and lunch times. * Direction

[BangPypers] Nested try-catch

2009-10-06 Thread Anand Chitipothu
I encountered a tricky situation with nested try-catch. Here is the sample code: def f(): raise Exception(f) def g(): raise Exception(g) try: f() except: # do cleanup try: g() except: pass # ignore raise This code raises Exception(g) instead of

Re: [BangPypers] [ANN][X-Post] SciPy India conference in Dec. 2009

2009-10-06 Thread Anand Chitipothu
I am not objecting to their choice of CMS, I am objecting to the blog post - which clearly sends the message that 'python sucks'. They only cribbed about Plone, Pinax and Django-cms. I can't see anything in that blog post that sounds as python sucks. Did I miss anything? Can you please tell me

Re: [BangPypers] Nested try-catch

2009-10-06 Thread Anand Chitipothu
Well, i am wondering why you are extracting the exc_info() rather than saving off the exception object itself: try:    f() except Exception, e    saved = e    try:        g()    except:        pass # ignore    raise e I have not tested this on 3.0 but i am assuming this should work.

Re: [BangPypers] [ANN][X-Post] SciPy India conference in Dec. 2009

2009-10-07 Thread Anand Chitipothu
On Wed, Oct 7, 2009 at 3:41 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Wed, Oct 7, 2009 at 3:26 PM, Anand Chitipothu anandol...@gmail.com wrote: django, plone has about one issue every two years - usually minor and not affecting anything critical. There is something

Re: [BangPypers] [ANN][X-Post] SciPy India conference in Dec. 2009

2009-10-07 Thread Anand Chitipothu
On Wed, Oct 7, 2009 at 3:48 PM, Kenneth Gonsalves law...@au-kbc.org wrote: On Wednesday 07 Oct 2009 3:32:33 pm Anand Chitipothu wrote:   +1. You got to be a forgiving Solomon to remain so cool after reading that post and I am not one when it comes to rants which are baseless. If you agree

Re: [BangPypers] [ANN][X-Post] SciPy India conference in Dec. 2009

2009-10-07 Thread Anand Chitipothu
I think its because its just so damn easy to roll-your-own that it doesnt matter. I'm sure many people on this list have rolled their own blogs, etc perhaps combining some existing apps for the purpose (My blog http://www.rajeevsebastian.com uses lifeflow with some custom mods and a custom

Re: [BangPypers] [ANN][X-Post] SciPy India conference in Dec. 2009

2009-10-07 Thread Anand Chitipothu
Possible. But writing a software requires time and you need to maintain it. how much time? I wrote and deployed the ilugc.org.in site in two hours and deployed it in 10 minutes and I can happily sleep at night because I know there will be no need for security patches and maintainence. The

Re: [BangPypers] array in python

2009-10-08 Thread Anand Chitipothu
Harshal, I don't think anybody in this mailing list has experience with GNU Radio. Have you tried asking in GNU Radio mailing lists? http://gnuradio.org/trac/wiki/MailingLists Anand On Thu, Oct 8, 2009 at 6:15 AM, harshal jadhav jadhav.hars...@gmail.com wrote: Hi Everybody, I am Harshal

Re: [BangPypers] A link I found today

2009-10-12 Thread Anand Chitipothu
On Mon, Oct 12, 2009 at 4:05 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Oct 12, 2009 at 4:02 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Oct 12, 2009 at 3:47 PM, Anand Chitipothu anandol...@gmail.com wrote: On Mon, Oct 12, 2009 at 2:42 PM, Baiju

Re: [BangPypers] A link I found today

2009-10-12 Thread Anand Chitipothu
On Mon, Oct 12, 2009 at 4:12 PM, Anand Chitipothu anandol...@gmail.com wrote: On Mon, Oct 12, 2009 at 4:05 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Oct 12, 2009 at 4:02 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Oct 12, 2009 at 3:47 PM, Anand

Re: [BangPypers] A link I found today

2009-10-12 Thread Anand Chitipothu
xkcd cartoon on floating point issues: http://www.xkcd.com/217/ Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] A link I found today

2009-10-12 Thread Anand Chitipothu
On Mon, Oct 12, 2009 at 4:15 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: On Mon, Oct 12, 2009 at 4:08 PM, Rajeev J Sebastian rajeev.sebast...@gmail.com wrote: I am not however a fan of the decimal module since it uses strings as the base type. What else should it use then

Re: [BangPypers] Perl or Python ?

2009-10-14 Thread Anand Chitipothu
On Wed, Oct 14, 2009 at 1:20 PM, Roshan Mathews rmath...@gmail.com wrote: On Wed, Oct 14, 2009 at 1:03 PM, Baiju M mba...@zeomega.com wrote: Koha (http://www.koha.org) is great web application written in Perl. Looks interesting.  It's weird since someone just asked for library management

Re: [BangPypers] Perl or Python ?

2009-10-14 Thread Anand Chitipothu
On Wed, Oct 14, 2009 at 4:16 PM, Kenneth Gonsalves law...@au-kbc.org wrote: On Wednesday 14 Oct 2009 4:12:00 pm Roshan Mathews wrote: On Wed, Oct 14, 2009 at 4:01 PM, Kenneth Gonsalves law...@au-kbc.org wrote: On Wednesday 14 Oct 2009 3:52:05 pm Roshan Mathews wrote: The point still stands

Re: [BangPypers] An interesting beginner post at Stackoverflow

2009-10-21 Thread Anand Chitipothu
On Wed, Oct 21, 2009 at 12:05 PM, Sidharth Kuruvila sidharth.kuruv...@gmail.com wrote: Hi,  d = {a:Hello}  print d.setdefault(a, blah)  Even though the string blah is not being used an object has to be created to represent it. Even worse, you could put some complex expression in there

Re: [BangPypers] An interesting beginner post at Stackoverflow

2009-10-21 Thread Anand Chitipothu
What do you mean when you use the word interned? $ pydoc intern Help on built-in function intern in module __builtin__: intern(...) intern(string) - string ``Intern'' the given string. This enters the string in the (global) table of interned strings whose purpose is to speed up

Re: [BangPypers] sort query

2009-10-24 Thread Anand Chitipothu
On Sat, Oct 24, 2009 at 3:35 PM, Sidharth Kuruvila sidharth.kuruv...@gmail.com wrote: Hi Anand. Looks like Python dictionary implementation is doing something clever. d.keys() returns the cached object if its refcount == 1 and returns a new object if refcount 1. I don't think that's

Re: [BangPypers] psycopg2 problem

2009-10-26 Thread Anand Chitipothu
I was trying to connect to postgre db with Python psycopg2 . The code for connecting the db is    import psycopg2    try:        dbconn = psycopg2.connect( dbname=%s user=%s\        host='localhost' password=%s ) % ( dbname,dbuser, dbpass )    except:        raise You are trying to pass

Re: [BangPypers] psycopg2 problem

2009-10-26 Thread Anand Chitipothu
On Mon, Oct 26, 2009 at 5:00 PM, JAGANADH G jagana...@gmail.com wrote: On Mon, Oct 26, 2009 at 4:46 PM, Anand Chitipothu anandol...@gmail.comwrote: I was trying to connect to postgre db with Python psycopg2 . The code for connecting the db is    import psycopg2    try

Re: [BangPypers] psycopg2 problem

2009-10-26 Thread Anand Chitipothu
Right . Any how I am facing new problem now. See the error. Any hint ?   dbcursor.execute( SELECT id,text FROM %s ) % indbtname psycopg2.ProgrammingError: syntax error at or near % LINE 1: SELECT id,text FROM %s You should construct the query first and then pass the query as argument to

Re: [BangPypers] FW: Exception file, lineno, method inforamtion needed

2009-10-26 Thread Anand Chitipothu
On Mon, Oct 26, 2009 at 5:41 PM, Anand Balachandran Pillai abpil...@gmail.com wrote: Forwarding a question from a friend, since he could not reach the list due to some reason... --- From: edukulla

Re: [BangPypers] [Inpycon] {Cross Post }-- Django project for schools

2009-10-27 Thread Anand Chitipothu
On Wed, Oct 28, 2009 at 1:03 AM, Ramdas S ram...@gmail.com wrote: Hey, I heard someone mention about working on some open source project for schools on Django somewhere in one of the groups. Can the developers of this project, kindly stand up please ? Contact dinesh at servelots.com. He is

Re: [BangPypers] December user group meeting

2009-12-13 Thread Anand Chitipothu
On Fri, Dec 11, 2009 at 3:15 PM, Noufal Ibrahim nou...@gmail.com wrote: It's as nice a time as ever to bring this up and see if there are any interesting talks that could be delivered on 18 or 25th. Why on a friday? How about doing on Sunday 20th? ___

Re: [BangPypers] mobile application development

2009-12-16 Thread Anand Chitipothu
I might add that you can't code in Python on the Android, since it runs only Java apps. I heard there are efforts to bring X language apps into Android, but none is yet mature. You can use Jython! Anand ___ BangPypers mailing list

Re: [BangPypers] Tuples vs Lists, perfromance difference

2009-12-24 Thread Anand Chitipothu
On Thu, Dec 24, 2009 at 4:40 PM, Anand Chitipothu anandol...@gmail.com wrote: I didn't quite follow you here, I'm sorry.  I was chatting with someone in IRC a week back, and here's his theory. He says in languages such as Python or Perl, almost all I/O, database etc are all optimized in C

Re: [BangPypers] How should I do it?

2010-01-15 Thread Anand Chitipothu
On Fri, Jan 15, 2010 at 4:00 PM, Baishampayan Ghose b.gh...@gmail.com wrote: It is a clever hack, taking advantage of the nature of the data. But it is far more faster than the other approaches posted here. I thought eval was evil :) The date looks like valid json. You can use

Re: [BangPypers] Regarding Python popularity

2010-02-08 Thread Anand Chitipothu
On Mon, Feb 8, 2010 at 3:22 PM, Srinivas Reddy Thatiparthy srinivas_thatipar...@akebonosoft.com wrote: 1.The other day my friend was saying ;Since python is opensource ,so many companies fear that their product's byte code could be reverse engineered.To protect  their Intellectual Property

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

2010-02-08 Thread Anand Chitipothu
On Tue, Feb 9, 2010 at 10:22 AM, Srinivas Reddy Thatiparthy srinivas_thatipar...@akebonosoft.com wrote: I have written  four solutions to a problem(self explanatory) ,out of them ,which one is the  pythonic way of doing  and is there any other ways of solving it? 1.sum([i for i in

Re: [BangPypers] Error :Attempt to overwrite cell while using xlwt to create excel sheets

2010-02-10 Thread Anand Chitipothu
On Wed, Feb 10, 2010 at 5:17 PM, nikunj badjatya nikunjbadja...@gmail.com wrote: Hi, I am using xlwt 0.7.2 and Python 2.6. I come across a situation wherein one of the rows of the excel sheet created was being overwritten. And it was flagging the following error. File

Re: [BangPypers] Enclosing lexical context

2010-04-15 Thread Anand Chitipothu
2010/4/15 Picachu Nioto picachu.ni...@gmail.com: Could some one explain to me this sentence, I read in an example online Python doesn't implement assignment of variables bound in an enclosing lexical context Example, a=[b] Consider the following example: a = 1 def f(): b = 2 def

Re: [BangPypers] Any compiled all PEP's into pdf

2010-05-27 Thread Anand Chitipothu
pytext2pdf can be obtained from http://code.activestate.com/recipes/532908-text-to-pdf-converter-rewrite/ (yeah, I wrote it, so this is a bit of self-trumpeting!) Wow, that looks interesting. Do you know how to make it work with unicode text? Anand

Re: [BangPypers] 2D plotting libraries.

2010-06-04 Thread Anand Chitipothu
2010/6/4 Shiv Shankar fsla...@gmail.com: Hello, I have a finite 2 dimensional plane. I have a set of co-ordinates, which is basically the movement of an object. The co-ordinates are derived from a set of equations considering various factors. After a set of initial research and tryouts i

Re: [BangPypers] python with c bindings

2010-06-15 Thread Anand Chitipothu
2010/6/15 Rahul R rahul8...@gmail.com: On Tue, Jun 15, 2010 at 11:24 AM, kunal ghosh kunal...@gmail.com wrote: On Tue, Jun 15, 2010 at 12:45 PM, Rahul R rahul8...@gmail.com wrote: well recently i learned about handling shell scripts inside c files . well i  was wondering since python is

Re: [BangPypers] July meetup

2010-07-21 Thread Anand Chitipothu
2010/7/21 Noufal Ibrahim nou...@gmail.com: Hello everyone,        We'll need atleast a mini meetup in July atleast to collect registration money from offline registrants.        How's this Sunday look? Once finalized, we can send mail to all the offline registrants in Bangalore to inform

Re: [BangPypers] July meetup

2010-07-29 Thread Anand Chitipothu
2010/7/29 Habibullah Pagarkar habibpagar...@gmail.com: Hello folks, Slight change of plans. The builders at our Domlur office want to perform some electrical maintenance work this weekend. I hope meeting at the Koramangala office instead at the same time wouldn't be too inconvenient. The

Re: [BangPypers] July meetup

2010-07-29 Thread Anand Chitipothu
2010/7/29 Noufal Ibrahim nou...@gmail.com: vijay vnbang2...@yahoo.com writes: All,     Do let me know if this is fine with every one. [...] Fine by me. +1. Is the venue final then? I've not seen may +1s. I need to send a mail to offline registrants about the usergroup meeting. I'm out

Re: [BangPypers] diffrerence between lambda function and ordinary one

2010-08-06 Thread Anand Chitipothu
2010/8/6 Rahul R rahul8...@gmail.com: i was writing some basic code . for understanding lambda functions , but couldnt understand the difference between a lambda function and an ordinary function. for example def f (x): return x**2 ... print f(8) 64 g = lambda x: x**2 print g(8) 64

Re: [BangPypers] python speed comparison

2010-08-06 Thread Anand Chitipothu
Readability counts. Here is my attempt. def memoize(f): cache = {} def g(a): if a not in cache: cache[a] = f(a) return cache[a] return g @memoize def solve(n): if n == 1: return 1 elif n%2 == 0: return 1 + solve(n/2) else:

Re: [BangPypers] cgi help

2010-10-06 Thread Anand Chitipothu
2010/10/6 Dipo Elegbede delegb...@dudupay.com: here is the code as pasted on pastebin: http://pastebin.com/K2Fxq6ac please help. It only returns the header and a blank page. There is an error in your program. Try running the program directly with python to see the error. Anand

Re: [BangPypers] refactoring

2010-12-01 Thread Anand Chitipothu
2010/12/1 Santosh Rajan santra...@gmail.com: I don't want to start an argument here. That is a good way to start an argument. :) But here is my personal take on this. 1) A self respecting developer will NOT need to refactor his code in the first place. 2) Given the movement towards

Re: [BangPypers] Fwd: [OT] Wikipedia

2010-12-15 Thread Anand Chitipothu
2010/12/16 Venkatraman S venka...@gmail.com: On Thu, Dec 16, 2010 at 12:26 AM, JAGANADH G jagana...@gmail.com wrote: Do you have more than 600 GB space available ? The total volume of 7zip file is about 70 GB . Unzipping it will result around 600 GB Have more than 1.5TB space. As I said,

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

2011-02-08 Thread Anand Chitipothu
2011/2/8 Vishal vsapr...@gmail.com: Hello, This might sound crazy..and dont know if its even possible, but... Is it possible that the Python process, creates copies of the interpreter for each thread that is launched, and some how the thread is bound to its own interpreter ? This will

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

2011-02-08 Thread Anand Chitipothu
2011/2/8 Vishal vsapr...@gmail.com: On Tue, Feb 8, 2011 at 2:02 PM, Anand Chitipothu anandol...@gmail.comwrote: 2011/2/8 Vishal vsapr...@gmail.com: Hello, This might sound crazy..and dont know if its even possible, but... Is it possible that the Python process, creates copies

[BangPypers] [OT] NoSQL Bangalore Meetup

2011-02-25 Thread Anand Chitipothu
Hi, NoSQL Bangalore meetup is happening this sunday. Venue: C42 - http://maps.google.co.in/maps?q=C42 Time: Sunday, Feb 27 - 15:00 Sorry for OT post. Posting it here as I've noticed lot of interest in nosql here. Anand ___ BangPypers mailing list

Re: [BangPypers] [OT] NoSQL Bangalore Meetup

2011-02-26 Thread Anand Chitipothu
2011/2/26 Senthil Kumaran orsent...@gmail.com: On Sat, Feb 26, 2011 at 09:55:57AM +0530, Anand Chitipothu wrote: NoSQL Bangalore meetup is happening this sunday. Venue: C42 - http://maps.google.co.in/maps?q=C42 I got interested in this query. I am glad, it asks Did you mean: Calle 42

Re: [BangPypers] editor for restructured text

2011-04-28 Thread Anand Chitipothu
2011/4/28 Kenneth Gonsalves law...@gmail.com: On Thu, 2011-04-28 at 13:34 +0530, Noufal Ibrahim wrote: I have tried to learn emacs several times - each time ending in failure and frustration Fair enough. The ReST mode for Emacs' is really excellent though especially for large amounts of

Re: [BangPypers] WSGI app instrumentation - middleware or other

2011-06-08 Thread Anand Chitipothu
2011/6/8 Sirtaj Singh Kang sir...@sirtaj.net: Hi all, I'd like to hear from python web devs on strategies for instrumenting production wsgi apps for perfomance and availability monitoring. Are there existing tools that you use? What sort of things do you monitor (db connection state,

Re: [BangPypers] WSGI app instrumentation - middleware or other

2011-06-08 Thread Anand Chitipothu
2011/6/8 Noufal Ibrahim nou...@gmail.com: Sriram Narayanan sriram...@gmail.com writes: Solaris, opensolaris, openindiana, freebsd, OSX. Also see crispeditor for dtrace on linux. [...] Interesting. I think it should be possible (and would be useful) to drop statistics obtained using

Re: [BangPypers] Iterating list of tuples

2011-07-04 Thread Anand Chitipothu
2011/7/4 Asif Jamadar asif.jama...@rezayat.net: Suppose I have list of tuples data = [    (10, 25, 18, 17, 10, 12, 26, 5),    ] for value in data:     if data[value]5:                print greater    else:       print lesser But the code giving me error so can I know how iterate list

Re: [BangPypers] Iterating list of tuples

2011-07-04 Thread Anand Chitipothu
       for i in data[0]: # Iterate over elements of the tuple             if i 5:                print greater             else:                print lesser `value` in your code does not mean the index, it's the actual element itself. It is unsaid rule that variables i, j and k are used

Re: [BangPypers] Infogami Problems

2011-07-15 Thread Anand Chitipothu
2011/7/15 Rajeev J Sebastian rajeev.sebast...@gmail.com: Hi, I'm trying to setup an instance of infogami (without openlibrary etc), but running into problems. I think I might have made some basic config error, probably could be easily fixed. This is what I did: created a new virtualenv

Re: [BangPypers] Infogami Problems

2011-07-15 Thread Anand Chitipothu
2011/7/15 Rajeev J Sebastian rajeev.sebast...@gmail.com: On Fri, Jul 15, 2011 at 3:11 PM, Anand Chitipothu anandol...@gmail.com wrote: Could anyone provide some suggestions? Try running sample_run.py install Hi Anand, Could you suggest the best git branch of infogami to clone? The one I

Re: [BangPypers] Infogami Problems

2011-07-16 Thread Anand Chitipothu
2011/7/16 Rajeev J Sebastian rajeev.sebast...@gmail.com: On Fri, Jul 15, 2011 at 7:15 PM, Anand Chitipothu anandol...@gmail.com wrote: I pushed some changes just now, including a fix for install. Hi Anand, This seems to work great. We had some issues creating a new type: we added

Re: [BangPypers] parsing xml

2011-07-28 Thread Anand Chitipothu
2011/7/28 Kenneth Gonsalves law...@gmail.com: 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 domain=cloudmade.com /                link

Re: [BangPypers] parsing xml

2011-07-28 Thread Anand Chitipothu
2011/7/28 Venkatraman S venka...@gmail.com: parsing using minidom is one of the slowest. if you just want to extract the distance and assuming that it(the tag) will always be consistent, then i would always suggest regexp. xml parsing is a pain. regexp is a bad solution to parse xml. minidom

Re: [BangPypers] parsing xml

2011-07-28 Thread Anand Chitipothu
2011/7/29 Venkatraman S venka...@gmail.com: On Fri, Jul 29, 2011 at 10:47 AM, Anand Chitipothu anandol...@gmail.comwrote: 2011/7/28 Venkatraman S venka...@gmail.com: parsing using minidom is one of the slowest. if you just want to extract the distance and assuming that it(the tag

Re: [BangPypers] parsing xml

2011-07-28 Thread Anand Chitipothu
2011/7/29 Baishampayan Ghose b.gh...@gmail.com: minidom is the fastest solution if you consider the programmer time instead of developer time.  Minidom is available in standard library, you don't have to add another dependency and worry about PyPI downtimes and lxml compilations failures.

  1   2   3   >