[BangPypers] Fwd: Python script hangs after using logging module

Noufal Ibrahim KV noufal at nibrahim.net.in
Tue May 27 09:13:02 CEST 2014

On Tue, May 27 2014, Rahul Gopan wrote:

> ---------- Forwarded message ----------
> From: Rahul Gopan <rahulpcet19 at gmail.com>
> Date: Tue, May 27, 2014 at 12:06 PM
> Subject: Re: [BangPypers] Python script hangs after using logging module
> To: Noufal Ibrahim KV <noufal at nibrahim.net.in>
> 1. Used subprocess.check_output. . Same result , it hangs 2. Am trying
> to run a bin file /bin/range <branch> <Begin_No> <End_No> which is
> supposed to provide me the number of items available between the
> Begin_No and End_No. I guess its not waiting for any input, it works
> like charm outside the python code.  3. Running the command outside
> works file. It hangs only when i use logging.basicConfig(filename=
> 'Log_file.log',filemode='w',format='%(asctime)s
> %(message)s',level=logging.DEBUG) before executing the command
> /bin/range 4. Without logging line it works fine so i guess there wont
> be any issue with being same directory or environment.  5. Creating
> the file manually outside the script works. No issue with that.


The only other thing I can think of is to use strace. On the python
program itself and on the /bin/range program. I think that's where the
problem is. It's probably behaving differently when launched from a
shell and non-interactively.


More information about the BangPypers mailing list