PyInputMode (Java-Python Bridge 0.10.0-SNAPSHOT Java API)
Date: 2022-06-06

org.jpy

## Enum PyInputMode

- java.lang.Object
- - java.lang.Enum<PyInputMode>
  - - org.jpy.PyInputMode

- All Implemented Interfaces:
    Serializable, Comparable<PyInputMode>

      public enum PyInputMode
      extends Enum<PyInputMode>

  Source code input modes for compiling/executing Python source code.
  Since:
    0.8
  See Also:
    `PyObject.executeCode(String, PyInputMode)`, `PyObject.executeCode(String, PyInputMode, Object, Object)`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `EXPRESSION` Compile/execute single expression.
    `SCRIPT` Compile/execute multi-statement script code.
    `STATEMENT` Compile/execute single statement code.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `value()`
    `static PyInputMode` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static PyInputMode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### STATEMENT

          public static final PyInputMode STATEMENT

      Compile/execute single statement code.

      The start symbol from the Python grammar for a single statement (`Py_single_input` in Python PyRun API). This is the symbol used for the interactive interpreter loop.

    - #### SCRIPT

          public static final PyInputMode SCRIPT

      Compile/execute multi-statement script code.

      The start symbol from the Python grammar for sequences of statements as read from a file or other source (`Py_file_input` in Python PyRun API). This is the symbol to use when compiling arbitrarily long Python source code.

    - #### EXPRESSION

          public static final PyInputMode EXPRESSION

      Compile/execute single expression.

      The start symbol from the Python grammar for sequences of statements as read from a file or other source (`Py_eval_input` in Python PyRun API).

  - ### Method Detail

    - #### values

          public static PyInputMode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (PyInputMode c : PyInputMode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static PyInputMode valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### value

          public int value()

Copyright © 2014–2022 Brockmann Consult GmbH. All rights reserved.