sparkle.tools package

Submodules

sparkle.tools.audiotools module

sparkle.tools.doc_inherit module

doc_inherit decorator

Usage:

class Foo(object):
def foo(self):
“Frobber” pass
class Bar(Foo):

@doc_inherit def foo(self):

pass

Now, Bar.foo.__doc__ == Bar().foo.__doc__ == Foo.foo.__doc__ == “Frobber”

Copied from http://code.activestate.com/recipes/576862/

class sparkle.tools.doc_inherit.DocInherit(mthd)[source]

Bases: object

Docstring inheriting method descriptor

The class itself is also used as a decorator

get_no_inst(cls)[source]
get_with_inst(obj, cls)[source]
use_parent_doc(func, source)[source]
sparkle.tools.doc_inherit.doc_inherit

alias of DocInherit

sparkle.tools.exceptions module

exception sparkle.tools.exceptions.DataIndexError[source]

Bases: exceptions.IndexError

exception sparkle.tools.exceptions.DisallowedFilemodeError(fpath, mode)[source]

Bases: exceptions.IOError

exception sparkle.tools.exceptions.FileDoesNotExistError(fpath)[source]

Bases: exceptions.IOError

exception sparkle.tools.exceptions.OverwriteFileError(fpath)[source]

Bases: exceptions.IOError

exception sparkle.tools.exceptions.ReadOnlyError(fpath)[source]

Bases: exceptions.IOError

sparkle.tools.log module

sparkle.tools.log.init_logging()[source]

Initialize a logger from a configuration file to use throughout the project

sparkle.tools.logging_example module

sparkle.tools.logging_example.init_logging()[source]

Initialize a logger from a configuration file to use throughout the project

sparkle.tools.logging_example.main()[source]
sparkle.tools.logging_example.throws()[source]

sparkle.tools.qsignals module

sparkle.tools.qtdoc module

Integration of Online Qt classes documentation with Sphinx

sparkle.tools.qtdoc.qtdoc_role(name, rawtext, text, lineno, inliner, options={}, content=[])[source]

Links to a Qt class’s doc

Returns 2 part tuple containing list of nodes to insert into the document and a list of system messages. Both are allowed to be empty.

Parameters:
  • name – The role name used in the document.
  • rawtext – The entire markup snippet, with role.
  • text – The text marked with the role.
  • lineno – The line number where rawtext appears in the input.
  • inliner – The inliner instance that called us.
  • options – Directive options for customization.
  • content – The directive content for customization.
sparkle.tools.qtdoc.setup(app)[source]

Installs the plugin.

Parameters:app – Sphinx application context.

sparkle.tools.spikestats module

sparkle.tools.systools module

sparkle.tools.systools.get_appdir()[source]
sparkle.tools.systools.get_drives()[source]
sparkle.tools.systools.get_free_mb(folder)[source]

Return folder/drive free space (in bytes)

sparkle.tools.systools.get_project_directory()[source]
sparkle.tools.systools.get_src_directory()[source]
sparkle.tools.systools.rand_id()[source]

sparkle.tools.uihandler module

class sparkle.tools.uihandler.TextEditHandler[source]

Bases: logging.Handler

Relay log message via a signal to connected widgets. Using a signal vs. setting the text here allows for logging messages from threads.

emit(m)[source]
sparkle.tools.uihandler.assign_uihandler_slot(logger, slot)[source]

sparkle.tools.util module

Module contents

Module docstring for tools module