First of all,<br>Thanks for the suggestions, MRAB and norseman. "split()" was what I was looking for. Now I have a follow up question. In my application I create radio buttons in a frame. These radio buttons are constructed whenever a button is clicked. Therefore the list of items are dynamically changing.<br>
<br>What I want to do is to remove the current radio buttons and then recreate a new set of radio buttons using a new string list. I could not see a command for deleting or removing a set of radio buttons. I use Tkinter.<br>
<br>I can provide more details.<br>Thanks a lot.<br><br>PS: I apologize if this creates a new thread. I am new to the list.<br>Aytekin<br><br><br><div class="gmail_quote">On Wed, May 20, 2009 at 11:17 AM, Aytekin Vargun <span dir="ltr"><<a href="mailto:varguna@gmail.com">varguna@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><a href="mailto:python-list@python.org" target="_blank"></a><br>Hello everybody,<br>I have a question about the way I use os.popen. I am open to other alternative suggestions like using subprocess or communicate.<br>
<br>I have an executable (say read_cell_types.exe) that produces string outputs. For example, after one execution I got the following outputs in one line:<br>
<br>Neurons Microglia Astrocytes<br><br>In another execution, there might be different numbers of strings. <br><br>What I would like to do is to get these strings after running read_cell_types.exe from my python program dynamically  and construct radio buttons from the list of strings. In order to do this I need to construct a list of strings first as in<br>

<br>["Neurons" "Microglia" "Astrocytes"]<br><br>Then it is easy to construct the radio buttons.<br><br>When I use the following code<br><br clear="all">command = "read_cell_types " + fileName2            <br>

child = os.popen(command)<br>data = child.read()<br> allObjects=data<br><br>allObjects (or data) contains the letters of all string words. I think it is probably like ["N" "e" "u" "r"  ...]<br>

<br>How can I construct ["Neurons" "Microglia" "Astrocytes"] instead?<br><br>I will really appreciate your help.<br>Thanks a lot.<br><br>PS: fileName2 is a parameter  that I am passing to read_cell_types.exe<br>

<br>Aytekin<br><font color="#888888"><br>-- <br>My web page: <a href="http://www.cs.rpi.edu/%7Evargua" target="_blank">http://www.cs.rpi.edu/~vargua</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>My web page: <a href="http://www.cs.rpi.edu/~vargua">http://www.cs.rpi.edu/~vargua</a><br>