Package omero :: Module java
[hide private]
[frames] | no frames]

Module java

source code

Functions [hide private]
 
check_java(command) source code
 
makeVar(key, env) source code
 
cmd(args, java="java", xargs=None, chdir=None, debug=None, debug_string=DEFAULT_DEBUG)
Defines the command to be used by run or popen.
source code
 
run(args, use_exec=False, java="java", xargs=None, chdir=None, debug=None, debug_string=DEFAULT_DEBUG)
Execute a Java process, either via subprocess waiting for the process to finish and returning the output or if use_exec is True, via os.execvpe with the current environment.
source code
 
popen(args, java="java", xargs=None, chdir=None, debug=None, debug_string=DEFAULT_DEBUG, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Creates a subprocess.Popen object and returns it.
source code
Variables [hide private]
  DEFAULT_DEBUG = "-Xrunjdwp:server=y,transport=dt_socket,addres...

Imports: os, shlex, platform, subprocess, exceptions, logging


Function Details [hide private]

run(args, use_exec=False, java="java", xargs=None, chdir=None, debug=None, debug_string=DEFAULT_DEBUG)

source code 

Execute a Java process, either via subprocess waiting for the process to finish and returning the output or if use_exec is True, via os.execvpe with the current environment.

-X style arguments for the Java process can be set either via the xargs argument or if unset, the JAVA_OPTS environment variable will be checked. Note: shlex.split() is called on the JAVA_OPTS value and so bash-style escaping can be used to protect whitespaces.

Debugging can more simply be turned on by passing True for the debug argument. If more control over the debugging configuration is needed, pass debug_string.

popen(args, java="java", xargs=None, chdir=None, debug=None, debug_string=DEFAULT_DEBUG, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

source code 

Creates a subprocess.Popen object and returns it. Uses cmd() internally to create the Java command to be executed. This is the same logic as run(use_exec=False) but the Popen is returned rather than the stdout.


Variables Details [hide private]

DEFAULT_DEBUG

Value:
"-Xrunjdwp:server=y,transport=dt_socket,address=8787,suspend=n"