Previous topic

PhreeqPy - Python Tools for PHREEQC

Next topic

Examples for PhreeqPy

Download.
Contact.

Class IPhreeqc

This is the main class to work with the IPhreeqc interface.

You can add your own shared library for IPhreeqc.

Access PHREEQC-DLL via ctypes.

This is exchangeable with the COM interface.

class phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc(dll_path=None)[source]

Wrapper for the IPhreeqc DLL.

Connect to DLL and create IPhreeqc.

The optional dll_path takes a path to the IPhreeqc shared library. If not provided it tries to select an appropriate library. Make sure you have the right library for your operating system. You may download one from here: ftp://brrftp.cr.usgs.gov/pub/charlton/iphreeqc/

See the PhreeqPy documentation for help on compiling a IPhreeqc shared library.

accumulate_line(line)[source]

Put line in input buffer.

add_error(phc_error_msg)[source]

Add an error message to Phreeqc.

add_warning(phc_warn_msg)[source]

Add an warning message to Phreeqc.

clear_accumlated_lines()[source]

Clear the input buffer.

column_count[source]

Get number of columns in selected output.

component_count[source]

Return the number of components.

create_iphreeqc()[source]

Create a IPhreeqc object.

destroy_iphreeqc()[source]

Delete the current instance of IPhreeqc.

get_component(index)[source]

Get one component.

get_component_list()[source]

Return all component names.

get_error_string()[source]

Retrieves the error messages.

get_selected_output_array()[source]

Get all values from selected output.

get_selected_output_column(col)[source]

Get all values for one column from selected output.

get_selected_output_row(row)[source]

Get all values for one from selected output.

get_selected_output_value(row, col)[source]

Get one value from selected output at given row and column.

load_database(database_name)[source]

Load a database with given file_name.

load_database_string(input_string)[source]

Load a datbase from a string.

static raise_ipq_error(error_code)[source]

There was an error, raise an exception.

raise_string_error(errors)[source]

Raise an exception with message from IPhreeqc error.

row_count[source]

Get number of rows in selected output.

run_string(cmd_string)[source]

Run PHREEQC input from string.

set_selected_output_file_off()[source]

Turn on writing to selected output file.

set_selected_output_file_on()[source]

Turn on writing to selected output file.

exception phreeqpy.iphreeqc.phreeqc_dll.PhreeqcException[source]

Error in Phreeqc call.

class phreeqpy.iphreeqc.phreeqc_dll.VAR[source]

Struct with data type and data values.

See Var.h in PHREEQC source.

class phreeqpy.iphreeqc.phreeqc_dll.VARUNION[source]

Union with types.

See Var.h in PHREEQC source.

phreeqpy.iphreeqc.phreeqc_dll.bytes(str_, encoding)[source]

Compatibilty function for Python 3.