On 27/05, Rahul Gopan wrote: > > #!/usr/local/bin/python2.7 > import commands > import subprocess > import logging > logging.basicConfig(filename='Log_file.log',filemode='w',format='%(asctime)s > %(message)s',level=logging.DEBUG) > items = commands.getoutput('COMMAND <branch> <Begin_no> <End_no> | wc -l') > print items > > -- Hangs -- > > Help me to resolve it
1. No reason for the code to hang, unless you 'command' is wrong. 2. you have only configured logging, but not putting anything into the log file! Going by the format in the getoutput, I can guess that you are looking for some information wrt a version control system. Check if the command works outside the python code. _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers