Module wmii :: Class P9_py
[show private | hide private]
[frames | no frames]

Type P9_py

object --+
         |
        P9_py


Convenience wrapper to wmii's P9 interface

This version is implemented through pure python

This class was taken from the file 'p9_socket.py', part of python-wmii (the 'other' Python WMII framework, written by Rico Schiekel <fire@downgra.de>) and adapted for use with PyWMII by David McNab
Method Summary
  __init__(self, address)
  create(self, *args, **kwargs)
  openFeed(self, path)
opens a feed at path (ie, a file which gives a continuous stream of lines), and returns a function which returns the next line from the feed
  openReader(self, *args, **kwargs)
  process(self, *args, **kwargs)
  read(self, *args, **kwargs)
  readdir(self, *args, **kwargs)
  readList(self, path)
reads a file, returns its lines as a list
  readRules(self, path)
Reads a set of rules from a file, where the rules come in in the form 'foo -> bar', and returns this as a list of tuples
  remove(self, *args, **kwargs)
  write(self, *args, **kwargs)
  writeList(self, path, items)
writes the items of a list to file, one on each line
  writeRules(self, path, rules)
writes a sequence of rules, where each rule is a sequence of 2 items.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
int ROOT = 23                                                                    

Method Details

openFeed(self, path)

opens a feed at path (ie, a file which gives a continuous stream of lines), and returns a function which returns the next line from the feed

readList(self, path)

reads a file, returns its lines as a list

readRules(self, path)

Reads a set of rules from a file, where the rules come in in the form 'foo -> bar', and returns this as a list of tuples

writeList(self, path, items)

writes the items of a list to file, one on each line

writeRules(self, path, rules)

writes a sequence of rules, where each rule is a sequence of 2 items. Format written is 'foo -> bar'

Class Variable Details

ROOT

Type:
int
Value:
23                                                                    

Generated by Epydoc 2.1 on Tue Jun 12 22:49:30 2007 http://epydoc.sf.net