[wingide-users] __import__ 64bit package in Wing

John Burnett JBurnett at blizzard.com
Wed May 14 21:07:02 MDT 2008


> If you can install a 32 bit build of Python, or of the particular
libraries
> you need, then it may work.

Unfortunately, that's not possible with this app... it's 64-bit through
and through, with python embedded.

Using a separate process sounded a bit too overboard, but since it was a
good learning exercise, I tried it :).  Launching the other python with
AsyncExecuteCommandLineE seems to work fine, but it brought up two
questions:

-Since this is a long running process, it would be nice to have
something indicate that it's still working.  Is there any sort of "I'm
busy" dialog I can throw up and tear down when I'm done?  In this case,
I really do want to block the GUI until it's done, but in a "nice" way
(so you can still pump messages if needed or whatever).

-In the meantime, I'm using simple prints, and hoping the user has the
Messages tool up.  However, the stdout member of the handler returned by
AsyncExecuteCommandLineE doesn't seem to update as the process goes.
I'm doing this:

####
handler = app.AsyncExecuteCommandLineE(pythonExePath, pythonDir, myEnv,
__file__)
def poll():
  done = handler.Iterate()
  if done:
    res = handler.Terminate()
    print res
    return 0
  else:
    print handler.stdout
    return 1
app.InstallTimeout(500, poll)
####

...and what I'm seeing is a constant printing of "[]" (from the repeated
"print handler.stdout" calls).  Then, when the process is done, I get
all my prints dumped at once (from the "print res" call).

Any ideas?  (Almost there! :)

John


More information about the wingide-users mailing list