I use subprocess.call to execute shell commands. Take a look at this 
http://docs.python.org/library/subprocess.html 

----- Original Message -----
From: briji...@gmail.com
Sent: 08/14/12 08:51 AM
To: Bangalore Python Users Group - India
Subject: Re: [BangPypers] executing shell commands through python script

 try this. http://docs.python.org/library/commands.html Regards, Brijith P On 
Tue, Aug 14, 2012 at 3:15 AM, Vikram K <kpguy1...@gmail.com> wrote: > i am able 
to run the following command from the shell (i am working on Mac > Snow 
Leopard): > > cgatools evidence2sam --beta --evidence-dnbs > 
evidenceDnbs-chr11-GS000010026-ASM-T1.tsv.bz2 --reference build36.crr > 
--output CGI_10026_CLL046_chr11_NUMA1_N.sam --extract-genomic-region > 
chr11,71391559,71469221 --add-mate-sequence > > The command i give above 
executes perfectly and i get the desired results. > Problem is that i need to 
execute variations of this command around two > hundred times on the shell. Can 
i embed this command in a python script (i > think one of the functions in the 
os module might be able to do what i > want). Thanks. > 
_______________________________________________ > BangPypers mailing list > 
BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers 
_______________________________________________
  BangPypers mailing list BangPypers@python.org 
http://mail.python.org/mailman/listinfo/bangpypers



Regards,
 Yoganand
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to