On 26 May 2014 17:42, Rahul Gopan <rahulpce...@gmail.com> wrote:
>
>
>
> -----Original Message-----
> From: "Rahul G" <ra...@visolve.com>
> Sent: ‎26-‎05-‎2014 05:41 PM
> To: "rahulpce...@gmail.com" <rahulpce...@gmail.com>
> Subject: Python script hangs after using logging module
>
> Hello,
>
> I tried to make a log file in a python script. After adding the line below
>
>
> logging.basicConfig(filename='LOG_FILE.log',
>                     filemode='w',
>                     format='%(asctime)s %(message)s',
>                     level=logging.DEBUG)
>
> Now when I try to run a binary file using os.system or commands.getoutput, 
> script simply hangs. Binary file is supposed to provide me the number of 
> items available within two numbers in a particular branch
>
> Usage of that command : range <branch> <Begin_number> <End_number>
>
> Without using the above logging line, I could run this command.
>
> I used trace python -m trace --trace myscript.sh to see where exactly it 
> hangs.Last few lines from the output of trace work of python is
>
> commands.py(58): import os
> commands.py(59): pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
> commands.py(60): text = pipe.read()

I see no reason from the above that a logging statement like the above
would cause the script to hang. Please show us your complete script.
If it is tool long, use pastebin.com, and post the link here.

Regards,
Gora
_______________________________________________
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers

Reply via email to