Re: split parameter line with quotes

2008-01-14 Thread Ricardo Aráoz
teddyber wrote: > here's the solution i have for the moment : > > t = shlex.shlex(data) > t.wordchars = t.wordchars + "/+.-" > r='' > while 1: > token = t.get_token() > if not token: > break > if not token==',': r = r+token >

Re: split parameter line with quotes

2008-01-11 Thread teddyber
here's the solution i have for the moment : t = shlex.shlex(data) t.wordchars = t.wordchars + "/+.-" r='' while 1: token = t.get_token() if not token: break if not token==',': r = r+token else: r = r +

Re: split parameter line with quotes

2008-01-11 Thread teddyber
i know this is some kind of bad design but the problem is that i receive this string from a jabber server and i cannot do anything to change this. i should try to verify if that's correct implementation of jabber protocol still... On 11 jan, 22:02, "Russ P." <[EMAIL PROTECTED]> wrote: > On Jan 11,

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 string into a list of pairs > > 'key=valu

RE: split parameter line with quotes

2008-01-11 Thread Reedick, Andrew
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of teddyber > Sent: Friday, January 11, 2008 1:51 PM > To: python-list@python.org > Subject: split parameter line with quotes > > Hello, > > first i'm a newbie to python (but i searched the Inte

Re: split parameter line with quotes

2008-01-11 Thread Russ P.
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). > > i'm looking for some way to split up a string into a list of pairs > > 'key=value'. This co

Re: split parameter line with quotes

2008-01-11 Thread Russ P.
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). > 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

Re: split parameter line with quotes

2008-01-11 Thread Paul McGuire
On Jan 11, 12: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 string into a list of pairs > 'key=value'. This code should be able to handle this particular > example string : > > qop

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 string into a list of pairs > > 'key=value'. This code sh

Re: split parameter line with quotes

2008-01-11 Thread Joshua Kugler
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 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,rc

Re: split parameter line with quotes

2008-01-11 Thread Nanjundi
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 string into a list of pairs > 'key=value'. This code should be able to handle this particular > example string : > > qop=