Plugin_Project_Pylons.ProjectPylons.Project

Module implementing the Pylons project support.

Global Attributes

None

Classes

Project Class implementing the Pylons project support.
PylonsNoSiteSelectedException Exception thrown to signal, that there is no current site.

Functions

None


Project

Class implementing the Pylons project support.

Derived from

QObject

Class Attributes

None

Methods

Project Constructor
__buildEgg Private slot to build a Python egg for the current site.
__createController Private slot to create a new controller for the current site.
__createRestController Private slot to create a new REST controller for the current site.
__createSite Private slot to create a new Pylons site.
__findSites Private method to determine the relative path of all sites (= top level dirs).
__getLocale Private method to extract the locale out of a file name.
__getPasterCommand Private method to build the paster command.
__getPythonCommand Private method to build the Python command.
__getSphinxCommand Private method to build the Sphinx command.
__normalizeList Private method to normalize a list of file names.
__projectLanguageAdded Private slot handling the addition of a new language.
__pylonsInfo Private slot to show some info about Pylons.
__runBrowser Private slot to start the default web browser with the server URL.
__runLoggingServer Private slot to start the Pylons Web server with logging.
__runPythonShell Private slot to start a Python console for a Pylons site.
__runServer Private slot to start the Pylons Web server.
__selectSite Private method to select a site to work with.
__serverProcFinished Private slot connected to the finished signal.
__setCurrentSite Private slot to set the current site.
__setupApplication Private slot to set up the Pylons application of the current site.
__setupDevelop Private slot to set up the development environment for the current site.
__showDocumentation Private slot to show the helpviewer with the Pylons documentation.
__site Private method to get the name of the current site.
__siteFilteredList Private method to filter a list of file names by site.
__sitePath Private method to calculate the full path of the Pylons site.
__sphinxBuildHtml Private slot to build the HTML documentation using "sphinx-build".
__sphinxQuickstart Private slot to initialize the documentation using "sphinx-quickstart".
compileCatalogs Public method to compile the message catalogs.
compileSelectedCatalogs Public method to update the message catalogs.
extractMessages Public method to extract the messages catalog template file.
getPylonsVersion Public method to get the Pylons version.
initActions Public method to define the Pylons actions.
initMenu Public slot to initialize the Pylons menu.
isSpawningConsole Public method to check, if the given console is a spawning console.
newForm Public method to create a new form.
projectClosed Public method to handle the closing of a project.
projectClosedHooks Public method to remove our hook methods.
projectOpenedHooks Public method to add our hook methods.
updateCatalogs Public method to update the message catalogs.
updateSelectedCatalogs Public method to update the message catalogs.

Project (Constructor)

Project(plugin, parent = None)

Constructor

plugin
reference to the plugin object
parent
parent (QObject)

Project.__buildEgg

__buildEgg()

Private slot to build a Python egg for the current site.

Project.__createController

__createController()

Private slot to create a new controller for the current site.

Project.__createRestController

__createRestController()

Private slot to create a new REST controller for the current site.

Project.__createSite

__createSite()

Private slot to create a new Pylons site.

Project.__findSites

__findSites()

Private method to determine the relative path of all sites (= top level dirs).

Returns:
list of sites (QStringList)

Project.__getLocale

__getLocale(filename)

Private method to extract the locale out of a file name.

filename
name of the file used for extraction (string or QString)
Returns:
extracted locale (string) or None

Project.__getPasterCommand

__getPasterCommand()

Private method to build the paster command.

Returns:
paster command (string)

Project.__getPythonCommand

__getPythonCommand()

Private method to build the Python command.

Returns:
python command (string)

Project.__getSphinxCommand

__getSphinxCommand(quickstart = False)

Private method to build the Sphinx command.

quickstart
flag indicating the quickstart command is requested (boolean)
Returns:
python command (string)

Project.__normalizeList

__normalizeList(filenames)

Private method to normalize a list of file names.

filenames
list of file names to normalize (list of string or QString)
Returns:
normalized file names (list of string)

Project.__projectLanguageAdded

__projectLanguageAdded(code)

Private slot handling the addition of a new language.

code
language code of the new language (string or QString)

Project.__pylonsInfo

__pylonsInfo()

Private slot to show some info about Pylons.

Project.__runBrowser

__runBrowser()

Private slot to start the default web browser with the server URL.

Project.__runLoggingServer

__runLoggingServer()

Private slot to start the Pylons Web server with logging.

Project.__runPythonShell

__runPythonShell()

Private slot to start a Python console for a Pylons site.

Project.__runServer

__runServer(logging = False)

Private slot to start the Pylons Web server.

logging
flag indicating to enable logging (boolean)

Project.__selectSite

__selectSite()

Private method to select a site to work with.

Returns:
selected site (QString)

Project.__serverProcFinished

__serverProcFinished()

Private slot connected to the finished signal.

Project.__setCurrentSite

__setCurrentSite(site)

Private slot to set the current site.

site
name of the site (string or QString)

Project.__setupApplication

__setupApplication()

Private slot to set up the Pylons application of the current site.

Project.__setupDevelop

__setupDevelop()

Private slot to set up the development environment for the current site.

Project.__showDocumentation

__showDocumentation()

Private slot to show the helpviewer with the Pylons documentation.

Project.__site

__site()

Private method to get the name of the current site.

Returns:
name of the site (string)
Raises PylonsNoSiteSelectedException:
raised, if no site is selected

Project.__siteFilteredList

__siteFilteredList(filenames)

Private method to filter a list of file names by site.

filenames
list of file names to be filtered (list of string or QString)
Returns:
file names belonging to the current site (list of string)

Project.__sitePath

__sitePath()

Private method to calculate the full path of the Pylons site.

Returns:
path of the site (string)
Raises PylonsNoSiteSelectedException:
raised, if no site is selected

Project.__sphinxBuildHtml

__sphinxBuildHtml()

Private slot to build the HTML documentation using "sphinx-build".

Project.__sphinxQuickstart

__sphinxQuickstart()

Private slot to initialize the documentation using "sphinx-quickstart".

Project.compileCatalogs

compileCatalogs(filenames)

Public method to compile the message catalogs.

filenames
list of filenames (not used)

Project.compileSelectedCatalogs

compileSelectedCatalogs(filenames)

Public method to update the message catalogs.

filenames
list of filenames

Project.extractMessages

extractMessages()

Public method to extract the messages catalog template file.

Project.getPylonsVersion

getPylonsVersion()

Public method to get the Pylons version.

Returns:
Pylons version as a string

Project.initActions

initActions()

Public method to define the Pylons actions.

Project.initMenu

initMenu()

Public slot to initialize the Pylons menu.

Returns:
the menu generated (QMenu)

Project.isSpawningConsole

isSpawningConsole(consoleCmd)

Public method to check, if the given console is a spawning console.

consoleCmd
console command (string)
Returns:
tuple of two entries giving an indication, if the console is spawning (boolean) and the (possibly) cleaned console command (string)

Project.newForm

newForm(path)

Public method to create a new form.

path
full directory path for the new form file (string)

Project.projectClosed

projectClosed()

Public method to handle the closing of a project.

Project.projectClosedHooks

projectClosedHooks()

Public method to remove our hook methods.

Project.projectOpenedHooks

projectOpenedHooks()

Public method to add our hook methods.

Project.updateCatalogs

updateCatalogs(filenames)

Public method to update the message catalogs.

filenames
list of filenames (not used)

Project.updateSelectedCatalogs

updateSelectedCatalogs(filenames)

Public method to update the message catalogs.

filenames
list of filenames
Up


PylonsNoSiteSelectedException

Exception thrown to signal, that there is no current site.

Derived from

Exception

Class Attributes

None

Methods

None
Up