Why use backticks?

Warnes, Gregory R gregory_r_warnes at groton.pfizer.com
Thu May 8 20:55:05 EDT 2003


There is a patch on sourceforge to make the commands module work on
MS-Windows systems:
http://sourceforge.net/tracker/index.php?func=detail&aid=713428&group_id=547
0&atid=305470

-Greg

> -----Original Message-----
> From: Paul Watson [mailto:pwatson at redlinec.com]
> Sent: Wednesday, May 07, 2003 11:16 PM
> To: python-list at python.org
> Subject: Re: Why use backticks?
> 
> 
> Yes, but the commands module appears to be UNIX only.
> 
> "Jeff Epler" <jepler at unpythonic.net> wrote in message
> news:mailman.1052357472.17747.python-list at python.org...
> > On Wed, May 07, 2003 at 05:16:38PM -0500, Paul Watson wrote:
> > > Backticks in Python do not mean the same thing as they do 
> in Perl.  Your
> > > Perl friend would need to do something like:
> >
> > .. or they could use the commands module.
> > >>> commands.getoutput("uname -a")
> > 'Linux parrot 2.4.20-9 #1 Wed Apr 2 13:42:50 EST 2003 i686 i686 i386
> > GNU/Linux'
> >
> > I notice this even has the last-newline-stripping feature 
> of Perl's ``.
> > (I also don't see how to turn this off, in case the 
> program's output is
> > binary...)
> >
> > Jeff
> >
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.





More information about the Python-list mailing list