- Timestamp:
- Aug 29, 2008 10:30:07 PM (16 years ago)
- Location:
- trunk/src/libs/xpcom18a4/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/sample/vboxshell.py
r11848 r11852 21 21 # To allow library resolution 22 22 # export LD_LIBRARY_PATH=$VBOX_PROGRAM_PATH 23 # 23 24 # Additionally, on 64-bit Solaris, you need to use 64-bit Python from 24 25 # /usr/bin/amd64/python and due to quirks in native modules loading of … … 26 27 # mkdir $VBOX_PROGRAM_PATH/64 27 28 # ln -s $VBOX_PROGRAM_PATH/VBoxPython.so $VBOX_PROGRAM_PATH/64/VBoxPython.so 29 # 30 # Mac OS X users can get away with just this: 31 # export PYTHONPATH=$VBOX_SDK/bindings/xpcom/python:$PYTHONPATH 32 # , where $VBOX_SDK is is replaced with the place you unzipped the SDK 33 # or <trunk>/out/darwin.x86/release/dist/sdk. 34 # 28 35 # 29 36 import traceback -
trunk/src/libs/xpcom18a4/python/vboxxpcom.py
r11746 r11852 17 17 import xpcom 18 18 import sys 19 import platform 19 20 20 21 # this code overcomes somewhat unlucky feature of Python, where it searches … … 22 23 # rest of Python bindings expect _xpcom to be inside xpcom module 23 24 # XXX: maybe implement per Python version module search 24 cglue = __import__('VBoxPython') 25 #cglue = __import__('VBoxPython') 26 if platform.system() == 'Darwin': 27 # TODO: This needs to be changed if it is supposed to work with OSE as well. 28 saved_sys_path = sys.path; 29 sys.path = [ '/Applications/VirtualBox.app/Contents/MacOS', ] + saved_sys_path 30 cglue = __import__('VBoxPython') 31 sys.path = saved_sys_path 32 else: 33 cglue = __import__('VBoxPython') 25 34 sys.modules['xpcom._xpcom'] = cglue 26 35 xpcom._xpcom = cglue
Note:
See TracChangeset
for help on using the changeset viewer.