Re: [Tutor] Strings

2014-11-06 Thread William Becerra
Thank you guys On Thu, Nov 6, 2014 at 3:39 AM, Dave Angel wrote: > William Becerra Wrote in message: > > > > have the following code: > names = "John, Cindy, Peter" > def find(str, ch, s): > index = 0 > while index < len(str): > if s==1: > for char in names[:4]: >

Re: [Tutor] Subprocess how to use?

2014-11-06 Thread Albert-Jan Roskam
- On Thu, Nov 6, 2014 12:57 AM CET Cameron Simpson wrote: >On 05Nov2014 14:05, jarod...@libero.it wrote: >> I need to use external program from my scirpt. >> code = "intersectBed -a %s -b /database/Refseq_Gene2.bed -wa -wb|cut -f >> 4,8|uniq > tmp.tmp1"%("gene5.tmp.

Re: [Tutor] Subprocess how to use?

2014-11-06 Thread jarod...@libero.it
Dear All thanks so much for the suggestion !!! One thing is not clear to me: How can write more safe string to send on subprocess.Popen() without %s? What is the best way to do this? thanks so much! ___ Tutor maillist - Tutor@python.org To unsubscr

Re: [Tutor] Subprocess how to use?

2014-11-06 Thread Cameron Simpson
On 06Nov2014 22:18, jarod...@libero.it wrote: Dear All thanks so much for the suggestion !!! One thing is not clear to me: How can write more safe string to send on subprocess.Popen() without %s? What is the best way to do this? The safest way is to use shell=False and pass a python list wit