Can I Redirect debug output from HTTPConnection to a file?

2007-07-10 Thread Harel
I'm using httplib.HTTPConnection to perform http connections and
during the beta period of the application I wanted to log its verbose
output [set_debuglevel(5)]. However, raising the debuglevel just
outputs it to stdout. can I redirect that to a file? My app uses the
logging module for logging and I'd like to use that to log into the
standard log it generates.

Any ideas?
Thanks,
Harel

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can I Redirect debug output from HTTPConnection to a file?

2007-07-10 Thread Harel
I'll answer myself then:

import os
ioLogFile = file(LOG_FILE_PATH + IO_LOG_FILE, "w") #get a log file
created
os.dup2(config.ioLogFile.fileno(), 1)  #route stdout (file descriptor
1) to the log file's one

Thanks
Harel

On Jul 10, 10:32 am, Harel <[EMAIL PROTECTED]> wrote:
> I'm using httplib.HTTPConnection to perform http connections and
> during the beta period of the application I wanted to log its verbose
> output [set_debuglevel(5)]. However, raising the debuglevel just
> outputs it to stdout. can I redirect that to a file? My app uses the
> logging module for logging and I'd like to use that to log into the
> standard log it generates.
>
> Any ideas?
> Thanks,
> Harel


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trouble with email package

2007-07-24 Thread Harel
Hi there,
What was the solution you found?
Could you please post it? I'm having the same problem... ;o(
Thanks!
Harel

On Jul 16, 2:53 pm, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> Hallöchen!
>
> Ingrid Bronger writes:
> > [...]
>
> > The Content-Transfer-Encoding is wrong.  Okay (well, not okay but)
> > then I added message["Content-Transfer-Encoding"] = "8bit" to my
> > code and got
>
> > Content-Type: text/plain; charset="utf-8"
> > MIME-Version: 1.0
> > Content-Transfer-Encoding: base64
> > Content-Transfer-Encoding: 8bit
>
> > Hallöchen!
>
> I found the cause of this part of my trouble.
>
> Tschö,
> Torsten.
>
> --
> Torsten Bronger, aquisgrana, europa vetus
>   Jabber ID: [EMAIL PROTECTED]
>   (Seehttp://ime.webhop.orgfor ICQ, MSN, etc.)


-- 
http://mail.python.org/mailman/listinfo/python-list


Memory leak involving traceback objects

2012-03-08 Thread Ran Harel
I have the same problem with python 2.6.2.
I have upgraded to 2.7.1 and the leak is gone.
-- 
http://mail.python.org/mailman/listinfo/python-list