Re: Using os.system() and string concatenation
From: Steven Bethard (steven.bethard_at_gmail.com)
Date: 10/12/04
- Next message: exarkun_at_divmod.com: "Re: [twisted+wxPython] widgets do not work?"
- Previous message: Prashant Pai: "mxDateTime package question"
- Maybe in reply to: Wayne Witzel III: "Using os.system() and string concatenation"
- Next in thread: Wayne Witzel III: "Re: Using os.system() and string concatenation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: python-list@python.org Date: Tue, 12 Oct 2004 20:15:57 +0000 (UTC)
Wayne Witzel III <wwitzel3 <at> gmail.com> writes:
> No, I was properly inserting the spaces. When I changed it to a print
> statement and executed the resulting output, it worked just fine.
Not sure if I understand exactly what you said here, but just to be clear, the
print statement inserts spaces:
>>> x, y, z = 'x', 'y', 'z'
>>> print x, y, z
x y z
>>> x + y + z
'xyz'
>>> print x + y + z
xyz
>>> import sys
>>> sys.stdout.write(x + y + z)
xyz
So if you're saying the output of a print statement works, but the string
concatenation doesn't then yes, it does sound like you're not inserting spaces.
Could you put
print cmd + list1[0] + list1[1] + list2[0] + list3[0]
at the end of your script and tell us what it outputs?
Steve
- Next message: exarkun_at_divmod.com: "Re: [twisted+wxPython] widgets do not work?"
- Previous message: Prashant Pai: "mxDateTime package question"
- Maybe in reply to: Wayne Witzel III: "Using os.system() and string concatenation"
- Next in thread: Wayne Witzel III: "Re: Using os.system() and string concatenation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]