Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60011

Re: My first real request for help

From Gene Heskett <gheskett@wdtv.com>
Subject Re: My first real request for help
Date 2013-11-19 12:19 -0500
References <201311190431.15449.gheskett@wdtv.com> <201311191119.27188.gheskett@wdtv.com> <20131119103108.67abf14b@bigbox.christie.dr>
Newsgroups comp.lang.python
Message-ID <mailman.2926.1384881559.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tuesday 19 November 2013 12:12:49 Tim Chase did opine:

> On 2013-11-19 11:19, Gene Heskett wrote:
> >>> Traceback (most recent call last):
> >>>   File "/usr/bin/axis", line 3326, in <module>
> >>>   
> >>>     _dynamic_tabs(inifile)
> >>>   
> >>>   File "/usr/bin/axis", line 3182, in _dynamic_tabs
> >>>   
> >>>     child = Popen(cmd)
> > 
> > You are suggesting I edit /usr/lib/python2.6/subprocess.py?
> 
> I think Peter is suggesting that line 3182 in _dynamic_tabs should
> either read (the better way)

Now, this is a puzzle.
_dynamic_tabs is not a file in /usr/lib/python2.6, nor does it "grep" in 
that directory.

I need another clue, how much are they? :).
> 
>   child = Popen([cmd, args])
> 
> or (the not-so-good way)
> 
>   child = Popen(cmd, shell=True)
> 
> If you drop a breakpoint right before that line, you should be able
> to tell what it's trying to pass into Popen:
> 
>   print("DEBUGGING: %s" % repr(cmd))
>   child = Popen(...)
> 
> which should give you insight into what's being called.
> 
> -tkc
> 
> 
> PS: yes, I know about using "%r" in the format string rather than
> "%s" plus a repr() call, but weird things happen in the event that
> the parameter is a tuple; it could also have been written
> 
>   print("DEBUGGING: %r" % (cmd,))
> 
> but I find that a tad uglier.

Thanks Tim.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)

Once I finally figured out all of life's answers, they changed the 
questions.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: My first real request for help Gene Heskett <gheskett@wdtv.com> - 2013-11-19 12:19 -0500

csiph-web