Module EDUtilsPath :: Class EDUtilsPath
[hide private]
[frames] | no frames]

Class EDUtilsPath

source code

This is a static utility class for handling of paths.

Class Methods [hide private]
 
appendListOfPaths(cls, _strPath, _listOfPaths)
Appends a list of paths to a path, for example [ "..", "..", "..", "..", "src" ], and returns the absolute path.
source code
 
mergePath(cls, _strPath1, _strPath2)
Merges two paths and returns the absolute path.
source code
 
getAbsolutePath(cls, _strPath)
Returns the absolute path.
source code
 
existPath(cls, _strPath)
Checks if a folder exists.
source code
 
getEdnaHome(cls)
Returns the EDNA_HOME variable from environment if not already defined
source code
 
setEdnaHome(cls, _strEdnaHome)
Sets EDNA_HOME home
source code
 
getEdnaSite(cls)
Returns the EDNA_SITE variable from environment
source code
 
setEdnaSite(cls, _strEdnaSite)
Sets EDNA_SITE
source code
 
getCwd(cls)
Returns the current directory.
source code
 
createFolder(cls, _strFolderName)
Creates a folder (directory) if it doesn't already exists.
source code
 
getFileList(cls, _strPath='./', _strMask='*')
Returns a list of file and directory names given a path to a directory.
source code
 
getFolderName(cls, _str)
Returns the name of a folder (directory) for a given path.
source code
 
getEdnaUserTempFolder(cls)
Returns the name of a temporary folder that is unique for a given user.
source code
 
getEdnaPluginCachePath(cls)
This private method initializes the path to the plugin cache file
source code
 
getEdnaTestPath(cls)
This class method initializes the path to the test path (probably unused)
source code
 
setEdnaTestPath(cls, value)
This class method initializes the path to the test data (probably unused)
source code
 
getEdnaTestDataPath(cls)
This class method initializes the path to the test data (probably unused)
source code
 
setEdnaTestDataPath(cls, value)
This class method initializes the path to the test data (probably unused)
source code
 
getEdnaTestDataImagesPath(cls)
This class method initializes the path to the test images downloaded from internet
source code
 
setEdnaTestDataImagesPath(cls, value)
This class method initializes the path to the test images downloaded from internet
source code
 
getDictOfPaths(cls)
Return an os.environ like dict enriched with internal path
source code
Class Variables [hide private]
  EDNA_HOME = '/home/tester/edna'
  _EDNA_SITE = None
hash(x)
  _EDNA_USERTEMPFOLDER = '/tmp/edna-tester'
  _EDNA_TESTIMAGES = None
hash(x)
  _EDNA_TESTS = None
hash(x)
  _EDNA_TESTDATA = None
hash(x)
  _USER = 'tester'
  _TMPDIR = '/tmp'
  _EDNA_PROJECTS = {}
  _EDNA_PLUGINCACHE = '/tmp/edna-tester/dc101d2097b3c03254925bc9...
  __semaphore = Semaphore()
Properties [hide private]
  EDNA_SITE
classmethod(function) -> method
  EDNA_TESTS
classmethod(function) -> method
  EDNA_TESTDATA
classmethod(function) -> method
  EDNA_TESTIMAGES
classmethod(function) -> method
Method Details [hide private]

mergePath(cls, _strPath1, _strPath2)
Class Method

source code 

Merges two paths and returns the absolute path. Deprecated: please use 'os.path.join' instead

getAbsolutePath(cls, _strPath)
Class Method

source code 

Returns the absolute path. Deprecated: please use 'os.path.abspath' instead

existPath(cls, _strPath)
Class Method

source code 

Checks if a folder exists. Deprecated: please use 'os.path.exists' instead

getCwd(cls)
Class Method

source code 

Returns the current directory. Deprecated: please use 'os.getcwd' instead

createFolder(cls, _strFolderName)
Class Method

source code 

Creates a folder (directory) if it doesn't already exists. This used to be deprecated but IS neverthless thread safe (see bug#681)

getFolderName(cls, _str)
Class Method

source code 

Returns the name of a folder (directory) for a given path. Deprecated: please use 'os.path.dirname' instead


Class Variable Details [hide private]

_EDNA_PLUGINCACHE

Value:
'/tmp/edna-tester/dc101d2097b3c03254925bc952a5d61574038f56.xml'

Property Details [hide private]

EDNA_SITE

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument,
just like an instance method receives the instance.
To declare a class method, use this idiom:

  class C:
      def f(cls, arg1, arg2, ...): ...
      f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()).  The instance is ignored except for its class.
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.

Class methods are different than C++ or Java static methods.
If you want those, see the staticmethod builtin.

Get Method:
getEdnaSite(cls) - Returns the EDNA_SITE variable from environment
Set Method:
setEdnaSite(cls, _strEdnaSite) - Sets EDNA_SITE

EDNA_TESTS

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument,
just like an instance method receives the instance.
To declare a class method, use this idiom:

  class C:
      def f(cls, arg1, arg2, ...): ...
      f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()).  The instance is ignored except for its class.
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.

Class methods are different than C++ or Java static methods.
If you want those, see the staticmethod builtin.

Get Method:
getEdnaTestPath(cls) - This class method initializes the path to the test path (probably unused)
Set Method:
setEdnaTestPath(cls, value) - This class method initializes the path to the test data (probably unused)

EDNA_TESTDATA

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument,
just like an instance method receives the instance.
To declare a class method, use this idiom:

  class C:
      def f(cls, arg1, arg2, ...): ...
      f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()).  The instance is ignored except for its class.
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.

Class methods are different than C++ or Java static methods.
If you want those, see the staticmethod builtin.

Get Method:
getEdnaTestDataPath(cls) - This class method initializes the path to the test data (probably unused)
Set Method:
setEdnaTestDataPath(cls, value) - This class method initializes the path to the test data (probably unused)

EDNA_TESTIMAGES

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument,
just like an instance method receives the instance.
To declare a class method, use this idiom:

  class C:
      def f(cls, arg1, arg2, ...): ...
      f = classmethod(f)

It can be called either on the class (e.g. C.f()) or on an instance
(e.g. C().f()).  The instance is ignored except for its class.
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.

Class methods are different than C++ or Java static methods.
If you want those, see the staticmethod builtin.

Get Method:
getEdnaTestDataImagesPath(cls) - This class method initializes the path to the test images downloaded from internet
Set Method:
setEdnaTestDataImagesPath(cls, value) - This class method initializes the path to the test images downloaded from internet