aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2012-02-09 09:53:02 +0800
committerTat-Chee Wan (USM)2012-02-09 09:53:02 +0800
commit5c63308ab8b0d5b78c0fdb859df0825874810d42 (patch)
tree8881e7f2248c3bf436431b3196ce0fefee5d5278
parent5f66ed338bff0a6f4676e1acb9d74c681600f684 (diff)
updated python version comments and debug messages
Use Apple's recommended method to specify 32-bit python, this is compatible with Macport's python. Clarified debug message to avoid user confusion of what is happening.
-rw-r--r--pyfantom.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/pyfantom.py b/pyfantom.py
index 29dfaea..0dca9cf 100644
--- a/pyfantom.py
+++ b/pyfantom.py
@@ -44,8 +44,10 @@ if platform.system() == 'Darwin':
import sys
if sys.maxsize > 2**32:
raise RuntimeError("fantom drivers not available in 64 bit mode.\n"
- "You can run python in 32 bit mode using:\n"
- "arch -i386 python2.6\n")
+ "You can run python in 32 bit mode (Bash shell syntax) using:\n"
+ "$ export VERSIONER_PYTHON_PREFER_32_BIT=yes\n"
+ "$ arch -i386 python\n"
+ "\n\tNote: This approach will work for for both Apple's Python >= 2.6\n\t\tand MacPorts' Python >= 2.7 installation\n")
libpath = '/Library/Frameworks/Fantom.framework/Fantom'
from AppKit import NSAutoreleasePool, NSApplication
#libpath = ctypes.util.find_library('Fantom')
@@ -247,7 +249,7 @@ class NXTIterator:
def destroy():
"""To be used in destructor."""
if self.debug:
- print "pyfantom: Destroying NXTIterator."
+ print "pyfantom: Destroying NXTIterator object."
status = StatusVar(0)
dll.nFANTOM100_destroyNXTIterator(self.handle, cast(byref(status), POINTER(c_int)))
Status.check(status)
@@ -258,7 +260,7 @@ class NXTIterator:
del self.nsapp
self.nsapp = None
if self.debug:
- print "pyfantom: NXTIterator destroyed."
+ print "pyfantom: NXTIterator object destroyed."
self.__destroy = destroy
def __iter__(self):
@@ -344,14 +346,14 @@ class NXT:
def destroy():
"""To be used in destructor."""
if self.debug:
- print "pyfantom: Destroying NXT."
+ print "pyfantom: Destroying NXT object."
if self.handle is not None:
status = StatusVar(0)
dll.nFANTOM100_destroyNXT(self.handle, cast(byref(status), POINTER(c_int)))
Status.check(status)
self.handle = None
if self.debug:
- print "pyfantom: NXT destroyed."
+ print "pyfantom: NXT object destroyed."
if self.pool is not None:
del self.pool
self.pool = None