If any user input is
involved, there will almost certainly be security problems. If not, it
will frequently break anyway.
As Guido pointed out, you can specify shell=True to get this latter
behavior. But if you do this, you often sacrifice correctness and/or
security. It's not a good ha
On Tue, Apr 22, 2008 at 03:33:30PM -0300, Facundo Batista wrote:
> 2008/4/22, Andrew McNabb <[EMAIL PROTECTED]>:
>
> > That's the best thing about subprocess. Whenever I've used APIs that
> > accept a single string instead of list of arguments, I've q
s that
accept a single string instead of list of arguments, I've quickly
descended into quoting hell.
--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
pgpSAT3OjJ1is.pgp
Description: PGP signature
___
igration period.
I kind of like the idea of doing the following:
import sys
major_version = sys.version_info[0]
if major_version == 2:
import script2
script2.main()
elif major_version == 3:
import script3
script3.main()
It really shouldn't be too bad, I think.
--
Andrew McNabb
h
s just pointing out that with generator expressions, you
can write:
>>> lst = list(x**2 for x in xrange(10))
>>>
which would make it less necessary to the equivalent syntax:
>>> lst = [x**2 for x in xrange(10)]
>>>
--
Andrew McNabb
http://www.
lled the next time through. You lookup 'abs' each
time just in case it's changed.
--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
signature.asc
Description: Digital signature
___
ethod. However,
once you've already used the + operator to join two strings, you are
much more likely to consider sum() for concatenating a list of strings.
I remember being confused the first time I tried it and found that it
didn't work.
In the end, though, it's really not
nd concatenating as
strong as you do.
When we write 'a' + 'b', I don't see any problem with saying that we're
adding 'a' and 'b', and I don't think there's anything unclear about
sum(['a', 'b', 'c']).
--
And
On Thu, Jun 07, 2007 at 06:50:57PM -0400, Jim Jewett wrote:
> On 6/7/07, Andrew McNabb <[EMAIL PROTECTED]> wrote:
> > On Wed, Jun 06, 2007 at 07:06:05PM -0400, Jim Jewett wrote:
> > > (There were mixed opinions on Technical symbols, and no one has spoken
> > > up
function decorators get something like:
def private(func):
pass
Would these be unified, or would something completely different happen?
--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
pgpKWGV2CS5BV.pgp
Description: PGP signatu
10 matches
Mail list logo