Table of Contents

Module: util Twisted-0.19.0/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 Sun Jul 14 19:53:11 2002 by HappyDoc version 2.0