shell Package

models Module

class tic.development.admin.shell.models.Session(parent=None, key_name=None, _app=None, _from_entity=False, **kwds)[source]

Bases: google.appengine.ext.db.Model

A shell session. Stores the session’s globals.

Each session globals is stored in one of two places:

If the global is picklable, it’s stored in the parallel globals and global_names list properties. (They’re parallel lists to work around the unfortunate fact that the datastore can’t store dictionaries natively.)

If the global is not picklable (e.g. modules, classes, and functions), or if it was created by the same statement that created an unpicklable global, it’s not stored directly. Instead, the statement is stored in the unpicklables list property. On each request, before executing the current statement, the unpicklable statements are evaluated to recreate the unpicklable globals.

The unpicklable_names property stores all of the names of globals that were added by unpicklable statements. When we pickle and store the globals after executing a statement, we skip the ones in unpicklable_names.

Using Text instead of string is an optimization. We don’t query on any of these properties, so they don’t need to be indexed.

add_unpicklable(statement, names)[source]

Adds a statement and list of names to the unpicklables.

Also removes the names from the globals.

Args:
statement: string, the statement that created new unpicklable global(s). names: list of strings; the names of the globals created by the statement.
global_names

A property that stores a list of things.

This is a parameterized property; the parameter must be a valid non-list data type, and all items must conform to this type.

globals

A property that stores a list of things.

This is a parameterized property; the parameter must be a valid non-list data type, and all items must conform to this type.

globals_dict()[source]

Returns a dictionary view of the globals.

remove_global(name)[source]

Removes a global, if it exists.

Args:
name: string, the name of the global to remove
remove_unpicklable_name(name)[source]

Removes a name from the list of unpicklable names, if it exists.

Args:
name: string, the name of the unpicklable global to remove
set_global(name, value)[source]

Adds a global, or updates it if it already exists.

Also removes the global from the list of unpicklable names.

Args:
name: the name of the global to remove value: any picklable value
unpicklable_names

A property that stores a list of things.

This is a parameterized property; the parameter must be a valid non-list data type, and all items must conform to this type.

unpicklables

A property that stores a list of things.

This is a parameterized property; the parameter must be a valid non-list data type, and all items must conform to this type.

shared Module

class tic.development.admin.shell.shared.ExecuteCommand(javascript_toolkit='dojo')[source]

Bases: tic.web.cdp.Command

Contains the statement to execute

statement = None
class tic.development.admin.shell.shared.ExecuteCommandHanlder(compmgr, init=None, cls=<class 'tic.development.admin.shell.shared.ExecuteCommandHanlder'>)[source]

Bases: tic.core.Component

Handles the execute command execution

command

alias of ExecuteCommand

execute(command)[source]

ICommandHandler API function

class tic.development.admin.shell.shared.ExecuteCommandResult(javascript_toolkit='dojo')[source]

Bases: tic.web.cdp.Command

Contains the result of the execution

result = None

Table Of Contents

Previous topic

admin Package

Next topic

appengine Package

This Page