Using os.system() and string concatenation
From: Wayne Witzel III (wwitzel3_at_gmail.com)
Date: 10/12/04
- Next message: Jeff Shannon: "Re: From dictionary keys to variables"
- Previous message: Shalabh Chaturvedi: "Re: Alternatives for pickle?"
- Next in thread: Steven Bethard: "Re: Using os.system() and string concatenation"
- Maybe reply: Steven Bethard: "Re: Using os.system() and string concatenation"
- Maybe reply: Fredrik Lundh: "Re: Using os.system() and string concatenation"
- Maybe reply: Wayne Witzel III: "Re: Using os.system() and string concatenation"
- Reply: Donn Cave: "Re: Using os.system() and string concatenation"
- Maybe reply: Steven Bethard: "Re: Using os.system() and string concatenation"
- Maybe reply: Wayne Witzel III: "Re: Using os.system() and string concatenation"
- Maybe reply: Steven Bethard: "Re: Using os.system() and string concatenation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 12 Oct 2004 11:43:28 -0700 To: Python Mailing List <python-list@python.org>
Using Python 2.3
Currently I process three files and build the output of those files in
to lists using for statements.
I think take those lists and provide them to an os.system() call.
cmd = "/usr/sbin/useradd"
os.system(cmd + list1[0] + list1[1] + list2[0] + list3[0])
This executes without any errors, but doesn't execute the command
supplied to os.system(). Now if I place them all in cmd first, then
supply it to os.system() it executes just fine. So there really isn't
a problem, just wanting to know what would cause such behavior.
Thanks,
Wayne
- Next message: Jeff Shannon: "Re: From dictionary keys to variables"
- Previous message: Shalabh Chaturvedi: "Re: Alternatives for pickle?"
- Next in thread: Steven Bethard: "Re: Using os.system() and string concatenation"
- Maybe reply: Steven Bethard: "Re: Using os.system() and string concatenation"
- Maybe reply: Fredrik Lundh: "Re: Using os.system() and string concatenation"
- Maybe reply: Wayne Witzel III: "Re: Using os.system() and string concatenation"
- Reply: Donn Cave: "Re: Using os.system() and string concatenation"
- Maybe reply: Steven Bethard: "Re: Using os.system() and string concatenation"
- Maybe reply: Wayne Witzel III: "Re: Using os.system() and string concatenation"
- Maybe reply: Steven Bethard: "Re: Using os.system() and string concatenation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|