[BangPypers] executing shell commands through python script

Palak Mathur palakmathur at gmail.com
Tue Aug 14 07:54:44 CEST 2012


I also use subprocess module. Actually, I think that is the only available
module which you would and should prefer to use as commands module has been
deprecated.

Regards,
Palak Mathur
http://palakmathur.wordpress.com
http://vicharvahak.wordpress.com
http://aatmiyata.wordpress.com
http://palakmathur.blogspot.com


On Tue, Aug 14, 2012 at 10:21 AM, Yoganand Anandaraju <yoganand at gmx.com>wrote:

> I use subprocess.call to execute shell commands. Take a look at this
> http://docs.python.org/library/subprocess.html
>
> ----- Original Message -----
> From: brijithp at 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 <kpguy1975 at 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 at python.org > http://mail.python.org/mailman/listinfo/bangpypers_______________________________________________
>   BangPypers mailing list BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>
>
> Regards,
>  Yoganand
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>


More information about the BangPypers mailing list