how to write data that has been read from a text file to a multiline

how would i convert the list to a string?
one suggestion was to make it:

irradiance = process(data)
self.Irradiance_Execute.SetValue(''.join(irradiance))

is this correct???

···

--- Robin Dunn <robin@alldunn.com> wrote:

jan rienyer gadil wrote:

> now i am having problem on where to put the:
> def process(list_of_lines):
> data_points =
> for line in list_of_lines:
> data_points.append(int(line))
> return data_points
>
> since everytime i write this after the
eventButton, i
> get an error.

What error?

>
> and also will this be correct on writing to the
> wxtextctrl:
>
> irradiance = process(data)
> self.Irradiance_Execute .SetValue(irradiance)
>

Almost. You'll want to convert your list to a
string first.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax
with wxPython!

---------------------------------------------------------------------

To unsubscribe, e-mail:
wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

jan rienyer gadil wrote:

how would i convert the list to a string?
one suggestion was to make it:

irradiance = process(data)
self.Irradiance_Execute.SetValue(''.join(irradiance))

is this correct???

Yes, that would work if what you want is all the list items to be joined together with no spaces or anything else between them. Use ' '.join if you want spaces between them, or '-' to separate by dashes, or whatever. Or you can just use str(irradiance) to get a representation of the list with the commas and the [ and ].

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!