Re: accessing individual element in a list.

2005-07-01 Thread future_retro
the square brackets round the output of split got me. Have plit into a new list and all works as expeted. Cheers, MW. -- http://mail.python.org/mailman/listinfo/python-list

Re: accessing individual element in a list.

2005-07-01 Thread [EMAIL PROTECTED]
>>> import wmi >>> c = wmi.WMI() >>> for printdriver in c.Win32_PrinterDriver(): ... pd = printdriver.Name >>> print pd AGFA-AccuSet v52.3,3,Windows NT x86 >>> pd[1] # type(pd) == str u'G' >>> pd.split(',') # split returns a new list, and you do not save it [u'AGFA-AccuSet v52.3', u'3', u'Wi

accessing individual element in a list.

2005-07-01 Thread future_retro
hi all,could someone clear this up for me. I'm sure it's probably very simple but I can't seem to get my head round it. doing the following >>> import wmi >>> c = wmi.WMI() >>> for printdriver in c.Win32_PrinterDriver(): ... pd = printdriver.Name >>> print pd AGFA-AccuSet v52.3,3,Windows