Re: [BangPypers] BangPypers Digest, Vol 18, Issue 26

2009-02-19 Thread bhaskar jain
I had encountered a similar problem. I converted both the dates to time since epoch and then computed their difference and then made the new time... On Thu, Feb 19, 2009 at 4:51 PM, wrote: > Send BangPypers mailing list submissions to >bangpypers@python.org > > To subscribe or unsubscrib

[BangPypers] link

2009-09-03 Thread bhaskar jain
Nice link - http://aymanh.com/python-debugging-techniques We can have this thread were we discuss our own debugging techniques. I uses syslog :( and kind of like 'inspect' and 'traceback' modules. --Bhaskar. ___ BangPypers mailing list BangPypers@python.

Re: [BangPypers] link

2009-09-03 Thread bhaskar jain
:) He is Guido! I am a mere mortal! On Thu, Sep 3, 2009 at 10:46 PM, Noufal Ibrahim wrote: > On Thu, Sep 3, 2009 at 10:43 PM, bhaskar jain > wrote: > > Nice link - http://aymanh.com/python-debugging-techniques > > We can have this thread were we discuss our own debugging

Re: [BangPypers] link

2009-09-04 Thread bhaskar jain
vim! On Fri, Sep 4, 2009 at 11:54 AM, Noufal Ibrahim wrote: > On Fri, Sep 4, 2009 at 11:44 AM, srid wrote: > > On Thu, Sep 3, 2009 at 8:09 PM, Roshan Mathews > wrote: > >> I recently read of an IDE for python which > >> code-stepping and a fancy debugger. Don't remember which one it was > >> th

Re: [BangPypers] python-sap webservices

2009-09-09 Thread bhaskar jain
"__future__ is a special module used to change the behaviour of the parser, so it is extremely important that it occur in the beginning of your module. Just move the imports to the top of your code, and that's all there is to it." On Thu, Sep 10, 2009 at 10:02 AM, sudhakar s wrote: > Hi, Thi

[BangPypers] SWIG

2009-09-14 Thread bhaskar jain
Hello, I have an external library which uses SWIG to generate bindings for many languages like python, perl etc. So they have the interface (.i files) present and also a 'binding' directory and separate dirs for diff languages. So for 'Python', they have the wrapper functions (.c files) in the

Re: [BangPypers] SWIG

2009-09-14 Thread bhaskar jain
the standard reference count. I believed the interface file (.i file) has to be hand-written. Can you please elaborate on the Makefile approach. --Bhaskar. On Tue, Sep 15, 2009 at 12:25 AM, Gora Mohanty wrote: > On Tue, 15 Sep 2009 00:04:01 +0530 > bhaskar jain wrote: > [...] >

Re: [BangPypers] SWIG

2009-09-15 Thread bhaskar jain
7; between the scripting language and the underlying C function. Only concern is there may be some 'code bloat' --Bhaskar. On Tue, Sep 15, 2009 at 8:26 AM, bhaskar jain wrote: > Thanks for the response. > > What i faced was intentionally passing unexpected/nonsense data caus

Re: [BangPypers] Place the timer in Python script

2009-09-18 Thread bhaskar jain
>>>btw, dunno if you've heard about this really neat web application. It is a simple text box with a couple of buttons that answers questions such as these. I >>>forgot it's name. It's something like golgol or some such Great answer! http://lmgtfy.com/ On Fri, Sep 18, 2009 at 3:43 PM, steve wr

Re: [BangPypers] Nested try-catch

2009-10-06 Thread bhaskar jain
Anand, nice find.. But i read this in python docs - " Warning Assigning the traceback return value to a local variable in a function that is handling an exception will cause a circular reference. This will prevent anything referenced by a local variable in the same function or by the traceback f

[BangPypers] Fwd: Nested try-catch

2009-10-07 Thread bhaskar jain
My mails seem not to go :( -- Forwarded message -- From: bhaskar jain Date: Wed, Oct 7, 2009 at 9:21 AM Subject: Re: [BangPypers] Nested try-catch To: Bangalore Python Users Group - India Anand, nice find.. But i read this in python docs - " Warning Assigning the trac

[BangPypers] sort query

2009-10-24 Thread bhaskar jain
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()) >>> print d.keys().sort() None We can so sorted(d.keys()) and it works but was just wondering whether sort which modifies in-place fails when the loca

Re: [BangPypers] sort query

2009-10-24 Thread bhaskar jain
Thanks all for replying. Let me be clear, >>> l = [2,1] >>> id(l[0]) 8402300 >>> id(l[1]) 8402312 >>> l.sort() >>> id(l[0]) 8402312 >>> id(l[1]) 8402300 So if we had [l] --> [0] -> 2 [1] -> 1 after the sort, the index [0] binds to the '1'

Re: [BangPypers] sort query

2009-10-24 Thread bhaskar jain
>>>On Sat, Oct 24, 2009 at 5:09 PM, Sidharth Kuruvila < sidharth.kuruv...@gmail.com> wrote: >>>So do a lot of hard thinking before you say something is broken. I have never questioned the correctness, rather wanted to clear my doubt. >>> d = {'a':1, 'b':2, 'c':3} >>> id(d.keys()) 404296 >>> d

Re: [BangPypers] sort query

2009-10-24 Thread bhaskar jain
Just to add - Doubt is cleared. Thanks all !! --Bhaskar. On Sat, Oct 24, 2009 at 11:49 PM, bhaskar jain wrote: > >>>On Sat, Oct 24, 2009 at 5:09 PM, Sidharth Kuruvila < > sidharth.kuruv...@gmail.com> wrote: > >>>So do a lot of hard thinking before you say some

Re: [BangPypers] ElementTree nodes

2009-10-25 Thread bhaskar jain
On Mon, Oct 26, 2009 at 12:31 AM, Noufal Ibrahim wrote: >>>Can you try this with an element that has zero children? From effbot's >>>docs, I think that's the difference. "The boolean interpretation will most likely change in future versions, so that all elements evaluate to true, also if they hav

Re: [BangPypers] ElementTree nodes

2009-10-25 Thread bhaskar jain
On Mon, Oct 26, 2009 at 1:53 AM, Sidharth Kuruvila < sidharth.kuruv...@gmail.com> wrote: >>>It turns out any object that returns len(o) as 0 >>>will evaluate as false. Not always. doc says - "instances of user-defined classes, if the class defines a __nonzero__() or __len__() method, when that me

[BangPypers] escaping for xml

2009-10-25 Thread bhaskar jain
Hello, I am stuck while escaping "<" and ">" in the xml file using xml.dom.minidom. I tried to get the unicode hex value and use that instead ( http://slayeroffice.com/tools/unicode_lookup/) Tried to use the standard "<" and ">" but still with no success. I saw similar bugs in python bugz

Re: [BangPypers] escaping for xml

2009-10-25 Thread bhaskar jain
sorry forgot to mention that tried with specifying the encoding in toxml() too but with same results. >>> e.toxml("UTF-8") '&lt;hello&gt;bhaskar&lt;/hello&gt;' >>> e.toxml("utf-8") '&lt;hello&gt;bhaskar&lt;/he

Re: [BangPypers] escaping for xml

2009-10-26 Thread bhaskar jain
>>>On Mon, Oct 26, 2009 at 8:33 PM, Shivaraj M S wrote: > > This may be a solution if I am not getting you wrong. > 1.write the whole string to a file > 2.feed that to xml.dom.minidom.parse > 3.retrieve whole or childnodes from toxml Thank you for the reply. My problem was that i had an elemen

Re: [BangPypers] Help regarding saml2

2010-02-11 Thread bhaskar jain
On Thu, Feb 11, 2010 at 2:53 PM, Dhananjay Nene wrote: > AFAIK while saml2 can help support session management across domains, it is > unlikely to be doing it for you. You can use it for authentication and > combined with a SSO protocol you could allow credentials to be transferred > across variou

Re: [BangPypers] Help regarding saml2

2010-02-11 Thread bhaskar jain
On Fri, Feb 12, 2010 at 10:19 AM, K.Manikandan wrote: > > > Would'nt simple cookies help you here since your domain is the same. > > > > SAML is for identity federation and is too big a monster for your use > > case. > > Have used SAML recently and AFAIK python-saml works for GoogleApps only. > >