Table of Contents

Module: util Twisted-0.17.4/twisted/python/util.py
Imported modules   
import os
import sys
Functions   
addPluginDir
getPluginDirs
padTo
sibpath
uniquify
  addPluginDir 
addPluginDir ()

  getPluginDirs 
getPluginDirs ()

  padTo 
padTo (
        n,
        seq,
        default=None,
        )

Pads a sequence out to n elements,

filling in with a default value if it is not long enough.

If the input sequence is longer than n, raises ValueError.

Details, details: This returns a new list; it does not extend the original sequence. The new list contains the values of the original sequence, not copies.

Exceptions   
ValueError, "%d elements is more than %d." %( len( seq ), n )
  sibpath 
sibpath ( path,  sibling )

Return the path to a sibling of a file in the filesystem.

This is useful in conjunction with the special __file__ attribute that Python provides for modules, so modules can load associated resource files.

  uniquify 
uniquify ( lst )

Make the elements of a list unique by inserting them into a dictionary.


Table of Contents

This document was automatically generated on Sat Apr 20 01:31:23 2002 by HappyDoc version 2.0