How do I implement two decorators in Python both of which would eventually want to call the calling function

2011-08-05 Thread Devraj
Hi all, I am trying to simply my Web application handlers, by using Python decorators. Essentially I want to use decorators to abstract code that checks for authenticated sessions and the other that checks to see if the cache provider (Memcache in this instance) has a suitable response. Consider

Re: Problems installing Python on server

2008-01-28 Thread Devraj
Also be careful and setup all the paths that is required for compiling various Python modules etc. On Jan 29, 8:28 am, Yansky <[EMAIL PROTECTED]> wrote: > I asked my hosting company if they would upgrade Python on my server > to the latest version. They responded with: > > "Sorry no. We tend to st

Where do glade files go?

2008-01-28 Thread Devraj
Hi everyone, I am writing an application using Python/GTK/Hildon/Glade. I will be creating a debian package as the final distribution mechanism for the package. What would be the ideal place to put glade files that my application uses on the target system? Thanks. -- http://mail.python.org/mailm

Re: open excel file while it is being used.

2008-01-10 Thread Devraj
Hi Barry, Obviously what you are trying to do is detect file locks. I am not exactly sure how to do this in Python but from previous system administration jobs here are some scenarios that you might want to watch out for. - I know for one that if you are accessing the file on a Samba share, file

Detecting OS platform in Python

2008-01-10 Thread Devraj
Hi everyone, My Python program needs reliably detect which Operating System its being run on, infact it even needs to know which distribution of say Linux its running on. The reason being its a GTK application that needs to adapt itself to be a Hildon application if run on devices like the N800.

Re: Help needed

2008-01-10 Thread Devraj
Sorry to diverge from the topic, but is there a reason you need to develop something like again? I would assume that there would be numerous utilities that would do this for you. If you want these features in your applications, why don't you consider incorporating existing tools/libraries into you

Writing GTK UI for Python apps in XUL

2007-11-02 Thread Devraj
Hi everyone, Is it possible to write UI code in XUL for a GTK Python application? I found NuFox, which does the reverse (lets me write Python to generate XUL) Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 weirdness when https_proxy environment variable is exported

2007-10-29 Thread Devraj
Hi John, Thanks for that. Do you have any web urls that I can see an example of the hack? On Oct 28, 3:50 am, [EMAIL PROTECTED] (John J. Lee) wrote: > Devraj <[EMAIL PROTECTED]> writes: > > I have been extensively using Python's urllib2 while developing a > > projec

urllib2 weirdness when https_proxy environment variable is exported

2007-10-25 Thread Devraj
this a bug in the urllib2 libraries or am I completely missing something here? Attached is a dump of the error messages. Any experiences/information/ finding are welcome. Thanks for your time. Regards, Devraj -- Notice the BadStatusLine exception at the end of the error messages, the https_

HTTPS Proxy authentication

2007-10-23 Thread Devraj
Hi Everyone, I have successfully used the ConnectHTTPSHandler class published at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195 to handle HTTPS proxy connections. Has anyone implemented a Basic authentication handler for ConnectHTTPSHandler? Or can I use urllib2 to handle the auth

Re: Best Python Linux distribution

2007-10-17 Thread Devraj
I would recommend a Debian based distribution like Ubuntu or Debian itself :) On Oct 17, 10:29 pm, Anthony Perkins <[EMAIL PROTECTED]> wrote: > Hi everyone, > > What is the best GNU/Linux distribution (or the most preferred) for > developing Python applications? Ideally I would like one with both

Re: urlgrabber cookie handling?

2007-10-17 Thread Devraj
Hi John, Thanks for getting back to me. I did find the ASPN article. If I figure this out then I will make sure I post the code somewhere for public consumption. On Oct 18, 6:13 am, [EMAIL PROTECTED] (John J. Lee) wrote: > Devraj <[EMAIL PROTECTED]> writes: > > Hi everyone, &g

urlgrabber cookie handling?

2007-10-16 Thread Devraj
Hi everyone, I have been battling to make my code work with a HTTPS proxy, current my code uses urllib2 to to most things and works well, except that urllib2 doesn't handle HTTPS proxies. Urlgrabber (http://linux.duke.edu/projects/urlgrabber/help/ urlgrabber.grabber.html) looks very promising exc

Re: urllib.ProxyHandler HTTPS issues

2007-10-11 Thread Devraj
Thanks John. Will investigate sending the CONNECT command to handle proxies. Do you recommend doing this for HTTP proxies as well or should I just use the ProxyHandler for HTTP proxies? On Oct 12, 4:29 am, [EMAIL PROTECTED] (John J. Lee) wrote: > Devraj <[EMAIL PROTECTED]> write

urllib.ProxyHandler HTTPS issues

2007-10-10 Thread Devraj
Hi everyone, I have been reading various documents/posts on the web about handling proxy options in urllib2. Some of them suggest that urllib2 doesn't handle HTTPS and others say it does. I have successfully written code that relays HTTP connections via a proxy but have failed to do the same for H

Re: ActiveRecord for Python/MySQL

2007-08-26 Thread Devraj
Thanks On Aug 26, 5:26 pm, EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > Devraj wrote: > > My application uses MySQL as a backend and am using the MySQL/Python > > bindings. Are there any libraries that provide a database abstraction > > layer like Activerecords

ActiveRecord for Python/MySQL

2007-08-25 Thread Devraj
Hi everyone, My application uses MySQL as a backend and am using the MySQL/Python bindings. Are there any libraries that provide a database abstraction layer like Activerecords for Python?' Any resources/links will be appreciated. Thanks for your time. -- http://mail.python.org/mailman/listinf