On Apr 7, 5:12 am, Terry Reedy wrote:
> On 4/6/2011 7:58 PM, Nobody wrote:
>
> > On Wed, 06 Apr 2011 02:20:22 -0700, Pierre GM wrote:
>
> >> I need to run a third-party binary from a python script and retrieve
> >> its output (and its error messages). I u
On Apr 7, 1:58 am, Nobody wrote:
> On Wed, 06 Apr 2011 02:20:22 -0700, Pierre GM wrote:
> > I need to run a third-party binary from a python script and retrieve
> > its output (and its error messages). I use something like
> >>>> process = subprocess.Popen(o
All,
I need to run a third-party binary from a python script and retrieve
its output (and its error messages). I use something like
>>> process = subprocess.Popen(options, stdout=subprocess.PIPE,
>>> stderr=subprocess.PIPE)
>>> (info_out, info_err) = process.communicate()
That works fine, except
On May 7, 5:32 am, Lie Ryan wrote:
> Pierre GM wrote:
> > All,
> > I need to log messages to both the console and a given file. I use the
> > following code (on Python 2.5)
>
> >>>> import logging
> >>>> #
> >>>> logging.b
All,
I need to log messages to both the console and a given file. I use the
following code (on Python 2.5)
>>> import logging
>>> #
>>> logging.basicConfig(level=logging.DEBUG,)
>>> logfile = logging.FileHandler('log.log')
>>> logfile.setLevel(level=logging.INFO)
>>> logging.getLogger('').addHandl
On Wednesday 07 February 2007 12:43:34 Dongsheng Ruan wrote:
> I got feed back saying" list object is not callable". But I can't figure
> out what is wrong with my code.
> for i in range(l):
> print A(i)
You're calling A, when you want to access one of its elements: use the
straight bracket