Skip to content

Instantly share code, notes, and snippets.

@jimbaker
Created September 21, 2013 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimbaker/6654969 to your computer and use it in GitHub Desktop.
Save jimbaker/6654969 to your computer and use it in GitHub Desktop.
Jython currently does not expose sysconf info from jnr-posix. Here's a workaround.
from jnr.posix import POSIXFactory
from org.python.modules.posix import PythonPOSIXHandler
from jnr.constants.platform import Sysconf
posix = POSIXFactory.getPOSIX(PythonPOSIXHandler(), True)
print posix.sysconf(Sysconf._SC_SEMAPHORES)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment