wxArrayString is strange ?!

i can't instanciate an wxArrayString object

i did that :

as = wxArrayString()

and python tell me :

NameError: global name 'wxArrayString' is not defined

what's wrong with me ?!

3rs wrote:

i need to use wxArrayString ...
to be able to use : wxExecute(string cmd, wxArrayString output )

no ?!

No. Use the form of wxExecute that takes a wxProcess, as shown in the demo. Or just use os.popen.

···

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

but i need to get the output ...
so i want to do it in mode SYNC ...
to get the output ...

(in the demo ; it's complex, and async !)

Robin Dunn wrote:

···

3rs wrote:

i need to use wxArrayString ...
to be able to use : wxExecute(string cmd, wxArrayString output )

no ?!

No. Use the form of wxExecute that takes a wxProcess, as shown in the demo. Or just use os.popen.

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

Uwe C. Schroeder wrote:

···

how about

result=os.popen('cmd').read()

On Thursday 02 October 2003 10:57 am, 3rs wrote:

but i need to get the output ...
so i want to do it in mode SYNC ...
to get the output ...

(in the demo ; it's complex, and async !)

Robin Dunn wrote:
   

3rs wrote:
     

i need to use wxArrayString ...
to be able to use : wxExecute(string cmd, wxArrayString output )

no ?!
       

No. Use the form of wxExecute that takes a wxProcess, as shown in the
demo. Or just use os.popen.
     

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