AuthorizationMBS for Python library

Hi,

I’m trying to install a Python library (ImapClient) via AuthorizationMBS. LittleSnitch tells me that the Python website is contacted but nothing is installed. When I execute the script in the terminal the installation works okay.

Script (has the correct permissions):

#!/bin/sh
wget http://python-distribute.org/distribute_setup.py
python distribute_setup.py
easy_install pip
easy_install -U setuptools
pip install imapclient

Xojo code:
Private theAuthorisation As AuthorizationMBS 'property of window

[code] if theAuthorisation = nil then
theAuthorisation = new AuthorizationMBS
if not theAuthorisation.SimpleNewAuthorization then Return “It wasn’t possible to get authorization for the installation.”
end if
dim s(-1) as string
theAuthorisation.Execute(InternalFolder.UnixpathMBS, s, true) 'InternalFolder points to the shell script
if theAuthorisation.LastError = 0 then
dim theResult as Integer = theAuthorisation.Wait

if LibFolder <> nil and LibFolder.Exists then 'LibFolder points to the library at /Library/Python/2.7/site-packages/imapclient
  Return ""
else
  Return "It wasn't possible to install the Python library that is necessary for archiving with IMAP."
end if

else
globals.theErrorLog.LogItem CurrentMethodName + " " + Str(theAuthorisation.LastError)
Return “It wasn’t possible to install the Python library that is necessary for archiving with IMAP.”
end if[/code]

theResult has a value of 16491.

What am I doing wrong here?

Xojo 2014r4, Mac OS 10.9.2.

Wait returns process ID. You need to use ReadStream to read data.