[BangPypers] executing shell commands through python script

kracekumar ramaraju kracethekingmaker at gmail.com
Tue Aug 14 09:57:02 CEST 2012


I use `envoy` as alternate to subprocess.
https://github.com/kennethreitz/envoy/

Here is an example how to use it https://gist.github.com/3347296.

Disclaimer: I used to contribute to envoy.


On Tue, Aug 14, 2012 at 11:24 AM, Palak Mathur <palakmathur at gmail.com>wrote:

> 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
> >
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
*
Thanks & Regards

"Talk is cheap, show me the code" -- Linus Torvalds
kracekumar
www.kracekumar.com
*


More information about the BangPypers mailing list