Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.packages.Package Class Reference
Inheritance diagram for MoinMoin.packages.Package:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def installPackage
def getScript
def extract_file
def filelist
def isPackage

Public Attributes

 request
 msg

Detailed Description

A package consists of a bunch of files which can be installed. 

Definition at line 455 of file packages.py.


Constructor & Destructor Documentation

def MoinMoin.packages.Package.__init__ (   self,
  request 
)

Definition at line 457 of file packages.py.

00457 
00458     def __init__(self, request):
00459         self.request = request
00460         self.msg = ""


Member Function Documentation

def MoinMoin.packages.Package.extract_file (   self,
  filename 
)
Returns the contents of a file in the package. 

Reimplemented in MoinMoin.packages.ZipPackage, and MoinMoin._tests.test_packages.DebugPackage.

Definition at line 477 of file packages.py.

00477 
00478     def extract_file(self, filename):
00479         """ Returns the contents of a file in the package. """
00480         raise NotImplementedError

Here is the caller graph for this function:

Returns a list of all files. 

Reimplemented in MoinMoin.packages.ZipPackage, and MoinMoin._tests.test_packages.DebugPackage.

Definition at line 481 of file packages.py.

00481 
00482     def filelist(self):
00483         """ Returns a list of all files. """
00484         raise NotImplementedError

Returns the script. 

Definition at line 473 of file packages.py.

00473 
00474     def getScript(self):
00475         """ Returns the script. """
00476         return self.extract_file(MOIN_PACKAGE_FILE).decode("utf-8").replace(u"\ufeff", "")

Here is the call graph for this function:

Here is the caller graph for this function:

Opens the package and executes the script. 

Definition at line 461 of file packages.py.

00461 
00462     def installPackage(self):
00463         """ Opens the package and executes the script. """
00464 
00465         _ = self.request.getText
00466 
00467         if not self.isPackage():
00468             raise PackageException(_("The file %s was not found in the package.") % MOIN_PACKAGE_FILE)
00469 
00470         commands = self.getScript().splitlines()
00471 
00472         return self.runScript(commands)

Here is the call graph for this function:

Returns true if this package is recognised. 

Reimplemented in MoinMoin.packages.ZipPackage, and MoinMoin._tests.test_packages.DebugPackage.

Definition at line 485 of file packages.py.

00485 
00486     def isPackage(self):
00487         """ Returns true if this package is recognised. """
00488         raise NotImplementedError

Here is the caller graph for this function:


Member Data Documentation

Definition at line 459 of file packages.py.

Definition at line 458 of file packages.py.


The documentation for this class was generated from the following file: