List conversion

yawgmoth7 yawgmoth7 at gmail.com
Thu Mar 30 01:06:35 EST 2006


Hello, I have a piece of code:

                          command = raw_input("command> ")
               words = string.split(command, ' ')
               temparg = words
               if len(words)<= 3:
                       temparg = words[4:]
               else:
                       temparg = words[5:]
                       funcarg = string.upper(temparg)
                       str(funcarg)
                       continue

There's a little snippet of code from my script, it all looks fine,
well, then I have a function that looks something like:

def nick(funcarg):
       sock.send(funcarg\r\n)
Well, that's okay, but i get this error when I try to run that command
at the commmand prompt like enviroment I wrote:

TypeError: send() argument 1 must be string or read-only buffer, not list

Well, that is why I put in the str(funcarg) line, hoping that it would
convert it to a string, instead of being a list, does anyone have any
suggestions, thanks, bye.
--
gurusnetwork.org ( Note, it's not dead..under heavy contruction).
Gurus'Network - Are you a guru?
/me goes off and codes.



More information about the Python-list mailing list