I got it mostly working in the meantime, i dont think anything else is affected. I could open files and start the ide (i have not checked if the BoxSizer is used in those parts).
I didnt really understand why StaticBoxSizer is not working correctly. It took me a while to figure out this solution from the messages i found on the internet. But it seems to be a known osx problem for wx-windows.
Another problem i have found, under osx is that os.execl does not work while using wx-windows. A possibility is to keep the window opened (by using os.spawnl)
if sys.platform == "darwin":
pythonExecutable = "/usr/bin/python" # i think thats the usual py2.5 from 10.5 (leopard)
result = os.spawnlp( os.P_NOWAIT, pythonExecutable,' -i ', the_IDE, the_files, ' %i'%PStatsEnabled)
else:
os.execl(sys.executable.replace('pythonw','ppython'),' -i ',the_IDE,the_files,' %i'%PStatsEnabled)
I think adding sys.path.append(’.’) to IDE.py will fix a problem which can occur in APP_MODULE when importing modules from the loaded file. I think the path is somehow not set correctly when spawning the ide process.
Maybe a working directory should be defined when loading a file.
i sometimes use a filestructure like this:
- panda_function_lib_dir
- __init__.py
- file1.py
- file2.py
- currect_project_dir
- main.py
- class2.py
Where main contains:
from panda_function_lib_dir import file1
This does not work with the current structure.
The APP_files is a list of ‘"/path/to/file"’, the filename should be stripped of "
APP_files_unstrip=sys.argv[1].split('::::')
APP_files = list()
for app in APP_files_unstrip:
APP_files.append( app.strip('"') )
I have changed a lot of other things, but most of them related to the fact that i still use python 2.4 ("var = ‘x’ if a else ‘y’ does not exist in 2.4)