On Fri, Jun 10, 2011 at 11:03 AM, Kurt Smith wrote:
> On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips
> wrote:
> > How do I write my script so it picks up argument from the output of
> commands
> > that pipe input into my script?
>
> def main():
>import
On Fri, Jun 10, 2011 at 10:41 AM, MRAB wrote:
> On 10/06/2011 18:21, Mark Phillips wrote:
>
>> I have a script that processes command line arguments
>>
>> def main(argv=None):
>> syslog.syslog("Sparkler stared processing")
>> if argv is None:
I have a script that processes command line arguments
def main(argv=None):
syslog.syslog("Sparkler stared processing")
if argv is None:
argv = sys.argv
if len(argv) != 2:
syslog.syslog(usage())
else:
r = parseMsg(sys.argv[1])
syslog.syslog(r)
ret
Thanks to everyone for their suggestions. I learned a lot from them!
Mark
On Mon, Oct 4, 2010 at 11:54 PM, Chris Rebert wrote:
> On Mon, Oct 4, 2010 at 10:33 PM, Arnaud Delobelle
> wrote:
> > MRAB writes:
> >> On 05/10/2010 02:10, Mark Phillips wrote:
> >>> I
I have the following string - "['1', '2']" that I need to convert into a
list of integers - [1,2]. The string can contain from 1 to many integers. Eg
"['1', '7', '4',..,'n']" (values are not sequential)
What would be the best way to do this? I don't want to use eval, as the
string is coming fr