Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-02 Thread Laurent Pointal
ksals wrote: On May 1, 5:29 pm, John Gordon gor...@panix.com wrote: In 3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com ksals kbsals5...@gmail.com writes: The original choice looks like this when I print it: print(choice) ('ksals', '', 'alsdkfj', '3', '') I need to

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-02 Thread ksals
On May 2, 1:57 pm, Laurent Pointal laurent.poin...@free.fr wrote: ksals wrote: On May 1, 5:29 pm, John Gordon gor...@panix.com wrote: In 3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com ksals kbsals5...@gmail.com writes: The original choice looks like this when I print

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-02 Thread Chris Angelico
On Thu, May 3, 2012 at 3:57 AM, Laurent Pointal laurent.poin...@free.fr wrote: If you have it as a string, you can use eval() (not safe!) on the string to retrieve the tuple, then list() on the tuple to get a list. Are you saying that eval is not safe (which it isn't), or that it has to be

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread John Gordon
In 316efebe-7f54-4054-96b1-51c7bb7b7...@f5g2000vbt.googlegroups.com ksals kbsals5...@gmail.com writes: Please help a newbe. I have a string returned from an esygui multchoicebox that looks like this: ('ksals', '', 'alsdkfj', '3', '') I need to convert this to this: ['ksals', '',

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread Pedro Kroger
Have you tried to use the function list?: foo = (1,2,3) list(foo) Cheers, Pedro -- http://pedrokroger.net On May 1, 2012, at 5:18 PM, ksals wrote: Please help a newbe. I have a string returned from an esygui multchoicebox that looks like this: ('ksals', '', 'alsdkfj', '3', '') I need

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread ksals
On May 1, 4:26 pm, John Gordon gor...@panix.com wrote: In 316efebe-7f54-4054-96b1-51c7bb7b7...@f5g2000vbt.googlegroups.com ksals kbsals5...@gmail.com writes: Please help a newbe.  I have a string returned from an esygui multchoicebox that looks like   this:  ('ksals', '', 'alsdkfj', '3',

Re: Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread John Gordon
In 3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com ksals kbsals5...@gmail.com writes: The original choice looks like this when I print it: print(choice) ('ksals', '', 'alsdkfj', '3', '') I need to submit these as defaults to a multenterbox. Each entry above ksals, ,

RE: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread Prasad, Ramit
That looks like a tuple which contains five strings. The original choice looks like this when I print it: print(choice) ('ksals', '', 'alsdkfj', '3', '') Based on the print statement, choice is a tuple or a string. try doing `print(type(choice))`. On the assumption it is a tuple and

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread ksals
On May 1, 5:29 pm, John Gordon gor...@panix.com wrote: In 3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com ksals kbsals5...@gmail.com writes: The original choice looks like this when I print it: print(choice) ('ksals', '', 'alsdkfj', '3', '') I need to submit these as

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread Cameron Simpson
Disclaimer: I have never used esygui. On 01May2012 21:29, John Gordon gor...@panix.com wrote: | In 3b5f65c4-cd95-4bb4-94f2-0c69cf2b1...@d20g2000vbh.googlegroups.com ksals kbsals5...@gmail.com writes: | The original choice looks like this when I print it: | | print(choice) | ('ksals', '',

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-01 Thread Cameron Simpson
The tutorial suggests multchoicebox returns an interable of chosen items, in fact probably a seqeunce. So... On 01May2012 14:50, ksals kbsals5...@gmail.com wrote: | This is a small excert to show you what I get | | for choice in easygui.multchoicebox(msg1, title,qstack): | if