wxArrayString is strange ?!

3rs wrote:

the best solution i've found ... (and the only which works, and is
simple) is that :

def run(file):
    inp, outp, errp = popen3(file)
    out = ""
    while 1:
        l = outp.readline()
        if not l: break
        out+=l
    #errLines = errp.readlines()

    print out

i'd like to use wx to do that ... but i can't make it simple

The general rule is: use python for what it's good at, and
wxPython for stuff only it can do.

The above can be a lot simpler; why use the while loop?
Just do:
def run(file):
    inp, outp, errp = popen3(file)
    out = string.join(outp.readlines())
    print out

And since you're ignoring inp, and errp, why not use:

    print string.join(os.popen(file).readlines())

/Will Sadkin
Parlance Corporation
www.nameconnector.com

thanks a lot for this comment ...
i keep your one line example

i still have just trouble with decoding the output

Will Sadkin wrote:

···

3rs wrote:

the best solution i've found ... (and the only which works, and is
simple) is that :

def run(file):
   inp, outp, errp = popen3(file)
   out = ""
   while 1:
       l = outp.readline()
       if not l: break
       out+=l
   #errLines = errp.readlines()

   print out

i'd like to use wx to do that ... but i can't make it simple

The general rule is: use python for what it's good at, and wxPython for stuff only it can do.

The above can be a lot simpler; why use the while loop? Just do:
def run(file):
   inp, outp, errp = popen3(file)
   out = string.join(outp.readlines())
   print out

And since you're ignoring inp, and errp, why not use:

   print string.join(os.popen(file).readlines())

/Will Sadkin
Parlance Corporation
www.nameconnector.com

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