Package openmdao.gui

This package contains a graphical user interface for the openmdao framework.

consoleserverfactory.py

class openmdao.gui.consoleserverfactory.ConsoleServer(name='', host='')[source]

Bases: cmd.Cmd

Object which knows how to load a model. Executes in a subdirectory of the startup directory. All remote file accesses must be within the tree rooted there.

add_component(name, classname, parentname)[source]

add a new component of the given type to the specified parent.

add_file(filename, contents)[source]

add file to working directory if it’s a zip file, unzip it

chdir(dirname)[source]
cleanup()[source]

Cleanup this server’s directory.

create(typname, name)[source]

create a new object of the given type.

default(line)[source]

Called on an input line when the command prefix is not recognized. In that case we execute the line as Python code.

delete_file(filename)[source]

delete file in working directory returns False if file was not found, otherwise returns True

do_trace(arg)[source]

print remembered trace from last exception

emptyline()[source]
ensure_dir(dirname)[source]

create directory in working directory (does nothing if directory already exists)

error(err, exc_info)[source]

print error message and save stack trace in case it’s requested

execfile(filename)[source]

execfile in server’s globals.

get_JSON()[source]

return current state as JSON

get_attributes(pathname)[source]
get_available_types()[source]
get_components()[source]

get hierarchical dictionary of openmdao objects

get_connections(pathname, src_name, dst_name)[source]

get list of src outputs, dst inputs and connections between them

get_container(pathname)[source]

get the container with the specified pathname returns the container and the name of the root object

get_file(filename)[source]

get contents of file in working directory returns None if file was not found

get_files()[source]

get a nested dictionary of files in the working directory

get_history()[source]

Return this server’s _hist.

get_output()[source]

get any pending output and clear the outputput buffer

get_pid()[source]

Return this server’s pid.

get_project()[source]

Return the current model as a project archive.

get_structure(pathname)[source]

get the structure of the specified assembly, or of the global namespace if no pathname is specified, consisting of the list of components and the connections between them

get_workflow(pathname)[source]
get_workingtypes()[source]

Return this server’s user defined types.

getcwd()[source]
install_addon(url, distribution)[source]
load_project(filename)[source]
onecmd(line)[source]
precmd(line)[source]

This method is called after the line has been input but before it has been interpreted. If you want to modifdy the input line before execution (for example, variable substitution) do it here.

run(*args, **kwargs)[source]

run the model (i.e. the top assembly)

save_project()[source]

save the cuurent project state & export it whence it came

set_connections(pathname, src_name, dst_name, connections)[source]

set connections between src and dst components in the given assembly

write_file(filename, contents)[source]

write contents to file in working directory

class openmdao.gui.consoleserverfactory.ConsoleServerFactory[source]

Bases: openmdao.main.factory.Factory

creates and keeps track of ConsoleServer

cleanup()[source]

clean up temporary files, etc

console_server(server_id)[source]

create a new ConsoleServer associated with an id

create(name, **ctor_args)[source]

Create a ConsoleServer and return a proxy for it.

delete_server(server_id)[source]

delete the ConsoleServer associated with an id

get_tempdir(name)[source]

create a temporary directory prefixed with the given name

omg.py

openmdao.gui.omg.dev(port)[source]
openmdao.gui.omg.init(reset)[source]
openmdao.gui.omg.pro(port)[source]

util.py

openmdao.gui.util.end_process()[source]
openmdao.gui.util.ensure_dir(d)[source]

create directory if it doesn’t exist

openmdao.gui.util.filedict(path, key='pathname', root='')[source]

create a nested dictionary for a file structure the key may be one of:

‘filename’ the name of the file ‘pathname’ the full pathname of the file (default)
openmdao.gui.util.launch_browser(port, preferred_browser=None)[source]

try to use preferred browser if specified, fall back to default

openmdao.gui.util.makenode(doc, path)[source]

modified version of: http://code.activestate.com/recipes/305313-xml-directory-tree/

openmdao.gui.util.packageXML(types)[source]
openmdao.gui.util.packagedict(types)[source]

create a nested list for a package structure

openmdao.gui.util.print_dict(dict)[source]

print the contents of a dictionary

openmdao.gui.util.print_list(list)[source]

print the contents of a list

openmdao.gui.util.singleton(cls)[source]

a decorator to make a class a singleton

OpenMDAO Home

Table Of Contents

Previous topic

Source Documentation

Next topic

Package openmdao.lib

This Page