Re: split parameter line with quotes

2008-01-11 Thread teddyber
r = r+token else: r = r + ' ' self.DEBUG(r,'ok') for pair in r.split(' '): key,value=pair.split('=', 1) print(key+':'+value) i know this is not perfect still but i'm coming a long way f

Re: split parameter line with quotes

2008-01-11 Thread teddyber
t; wrote: > On Jan 11, 12:53 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > > > > On Jan 11, 10:50 am, teddyber <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > first i'm a newbie to python (but i searched the Internet i swear).

Re: split parameter line with quotes

2008-01-11 Thread teddyber
wow! that's perfect this shlex module! thanks for pointing this! On 11 jan, 20:36, Joshua Kugler <[EMAIL PROTECTED]> wrote: > teddyber wrote: > > first i'm a newbie to python (but i searched the Internet i swear). > > i'm looking for some way to split up a

Re: split parameter line with quotes

2008-01-11 Thread teddyber
On 11 jan, 20:28, Nanjundi <[EMAIL PROTECTED]> wrote: > On Jan 11, 1:50 pm, teddyber <[EMAIL PROTECTED]> wrote: > > > Hello, > > > first i'm a newbie to python (but i searched the Internet i swear). > > i'm looking for some way to split up a strin

split parameter line with quotes

2008-01-11 Thread teddyber
Hello, first i'm a newbie to python (but i searched the Internet i swear). i'm looking for some way to split up a string into a list of pairs 'key=value'. This code should be able to handle this particular example string : qop="auth,auth-int,auth-conf",cipher="rc4-40,rc4-56,rc4,des, 3des",maxbuf=