On Aug 26, 2009, at 6:45 AM, Mayne, Peter wrote:
> On Linux:
>
> Jython 2.5.0+ (trunk:6698, Aug 20 2009, 23:03:24)
> [Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.5.0_18
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> os.path.samestat
> <function samestat at 0x1>
>
> On a POSIX platform (HP NonStop OSS, os.name=”NONSTOP_KERNEL”):
>
> Jython 2.5.0 (Release_2_5_0:6476, Jun 16 2009, 13:33:26)
> [Java HotSpot(TM) Server VM (Hewlett-Packard Company)] on java1.5.0_02
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> os.path.samestat
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'samestat'
>
> What determines whether samestat is defined? Why would it be present
> on one Unix-like platform and not another?
samestat relies on a full implementation of os.stat, which we're
unable to provide in pure Java. We workaround this by using the jna-
posix library to call down into libc's stat. Full jna-posix support is
currently limited to the platforms the underlying jna FFI library
supports, which don't include any HP unix at this point.
See https://jna.dev.java.net/#building for directions on how to build
the JNA native bits for your platform
--
Philip Jenvey
|