Top Description Constructors Methods
org.python.modules.posix

public Class PythonPOSIXHandler

extends Object
implements POSIXHandler
Class Inheritance
All Implemented Interfaces
jnr.posix.POSIXHandler
Imports
java.io.File, .InputStream, .PrintStream, java.util.logging.Level, jnr.constants.platform.Errno, jnr.posix.POSIXHandler, org.python.core.imp, .Options, .PrePy, .Py, .PyObject

Jython specific hooks for our underlying POSIX library.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
error(Errno error, String extraData)

Implements jnr.posix.POSIXHandler.error.

public void
error(Errno error, String methodName, String extraData)

Implements jnr.posix.POSIXHandler.error.

public File
public String[]
public PrintStream
getErrorStream()

Implements jnr.posix.POSIXHandler.getErrorStream.

Get your runtime's current ErrorStream

public InputStream
public PrintStream
public int
getPID()

Implements jnr.posix.POSIXHandler.getPID.

Get your runtime's process ID. This is only intended for non-native POSIX support (e.g. environments where JNA cannot load or security restricted environments).

public boolean
public void
unimplementedError(String
the POSIX method that failed
methodName
)

Implements jnr.posix.POSIXHandler.unimplementedError.

Specify that posix method is unimplemented.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PythonPOSIXHandlerback to summary
public PythonPOSIXHandler()

Method Detail

errorback to summary
public void error(Errno error, String extraData)

Implements jnr.posix.POSIXHandler.error.

Annotations
@Override
errorback to summary
public void error(Errno error, String methodName, String extraData)

Implements jnr.posix.POSIXHandler.error.

Annotations
@Override
getCurrentWorkingDirectoryback to summary
public File getCurrentWorkingDirectory()

Implements jnr.posix.POSIXHandler.getCurrentWorkingDirectory.

Returns:File

Doc from jnr.posix.POSIXHandler.getCurrentWorkingDirectory.

current working directory of your runtime.

Annotations
@Override

getEnvback to summary
public String[] getEnv()

Implements jnr.posix.POSIXHandler.getEnv.

Returns:String[]

Doc from jnr.posix.POSIXHandler.getEnv.

current set of environment variables of your runtime.

Annotations
@Override

getErrorStreamback to summary
public PrintStream getErrorStream()

Implements jnr.posix.POSIXHandler.getErrorStream.

Doc from jnr.posix.POSIXHandler.getErrorStream.

Get your runtime's current ErrorStream

Returns:PrintStream

your runtime's current error stream

Annotations
@Override

getInputStreamback to summary
public InputStream getInputStream()

Implements jnr.posix.POSIXHandler.getInputStream.

Returns:InputStream

Doc from jnr.posix.POSIXHandler.getInputStream.

your runtime's current input stream

Annotations
@Override

getOutputStreamback to summary
public PrintStream getOutputStream()

Implements jnr.posix.POSIXHandler.getOutputStream.

Returns:PrintStream

Doc from jnr.posix.POSIXHandler.getOutputStream.

your runtime's current output stream

Annotations
@Override

getPIDback to summary
public int getPID()

Implements jnr.posix.POSIXHandler.getPID.

Doc from jnr.posix.POSIXHandler.getPID.

Get your runtime's process ID. This is only intended for non-native POSIX support (e.g. environments where JNA cannot load or security restricted environments). In JRuby we found a number of packages which would rather have some identity for the runtime than nothing.

Note

If you do not want this to work you impl can just call unimplementedError(String).

Returns:int

your runtime's process ID

Annotations
@Override

isVerboseback to summary
public boolean isVerbose()

Implements jnr.posix.POSIXHandler.isVerbose.

Returns:boolean

Doc from jnr.posix.POSIXHandler.isVerbose.

should we provide verbose output about POSIX activities

Annotations
@Override

unimplementedErrorback to summary
public void unimplementedError(String methodName)

Implements jnr.posix.POSIXHandler.unimplementedError.

Doc from jnr.posix.POSIXHandler.unimplementedError.

Specify that posix method is unimplemented. In JRuby we generate an exception with this.

Parameters
methodName:String

the POSIX method that failed

Annotations
@Override
warnback to summary
public void warn(POSIXHandler.WARNING_ID id, String message, Object... data)

Implements jnr.posix.POSIXHandler.warn.

Annotations
@Override