A stupid newbie question about output...

2009-10-20 Thread J
Can someone explain why this code results in two different outputs? for os in comp.CIM_OperatingSystem (): print os.Name.split(|)[0] + Service Pack, os.ServicePackMajorVersion osVer = os.Name.split(|)[0] + Service Pack, os.ServicePackMajorVersion print osVer the first print statement

Re: A stupid newbie question about output...

2009-10-20 Thread nn
On Oct 20, 2:23 pm, J dreadpiratej...@gmail.com wrote: Can someone explain why this code results in two different outputs? for os in comp.CIM_OperatingSystem ():  print os.Name.split(|)[0] + Service Pack, os.ServicePackMajorVersion  osVer = os.Name.split(|)[0] + Service Pack,

Re: A stupid newbie question about output...

2009-10-20 Thread Ethan Furman
J wrote: Can someone explain why this code results in two different outputs? for os in comp.CIM_OperatingSystem (): print os.Name.split(|)[0] + Service Pack, os.ServicePackMajorVersion osVer = os.Name.split(|)[0] + Service Pack, os.ServicePackMajorVersion print osVer the first print

Re: A stupid newbie question about output...

2009-10-20 Thread J
On Tue, Oct 20, 2009 at 14:53, Ethan Furman et...@stoneleaf.us wrote: osVer = %s Service Pack %d % (os.Name.split(|)[0],        os.ServicePackMajorVersion) This way, osVer is a string, and not a tuple. Thanks for the help... The tuple thing is a new concept to me... at least the vocabulary

Re: A stupid newbie question about output...

2009-10-20 Thread Aahz
In article mailman.1745.1256065337.2807.python-l...@python.org, J dreadpiratej...@gmail.com wrote: The tuple thing is a new concept to me... at least the vocabulary is, I'll go look that up now and learn info on tuples. It's been ages since I did any python programming, and even back then it was

Re: A stupid newbie question about output...

2009-10-20 Thread J
On Tue, Oct 20, 2009 at 16:25, Aahz a...@pythoncraft.com wrote: In article mailman.1745.1256065337.2807.python-l...@python.org, J  dreadpiratej...@gmail.com wrote: The tuple thing is a new concept to me... at least the vocabulary is, I'll go look that up now and learn info on tuples. It's been