Table of Contents

Class: conf src/conf.py

conf - A class to store the configuration.

A conf instance contains the information needed to access the CUPS configuration details as well as the information needed to run escputil. These details are stored in an INI-style configuration file in the user's $HOME directory called ".stylus-toolbox.conf"

Attributes

prompt_for_cups_auth
A boolean flag to determine whether or not to prompt for CUPS authentication. Defaults to False.
filename
A string pointing to the full path (and filename) of the config file. Read only.
sRawDevice
A string containing the full path to the raw printer device. The default value is an empty string.
sModel
A string containing the escputil model ID of the printer. The default is "Auto", which causes the -m flag to not be passed to escputil
fNewUSB
A boolean to determine whether or not to pass the '-u- switch to escputil. Deprecated since escputil has deprecated -u.
sEscputilProg
A string containing the full path and filename fof the escputil binary.
nRefreshTimeout
An integer specifying the time between refreshes of the main window in minutes. Defaults to 5.
self.printer
A string specifying the printer queue.
remote
A boolean value specifying whether or not the printer is on a remote server.
remotehost
Hostname of the remote server if remote is True
creds
A dictionary of dictionaries containing connection info for each URL the key of the top-level dictionary is the URL. The keys for the secondary dictionary according to the following table:
username
The username for the connection
password
The plaintext password for the connection
usekey
Use key-based authentication (do not send password) for ssh sessions. Ignored for other kinds of sessions.
port
The port to use for an SSH connection. Ignored for all others.
x
The saved X coordinate for main window
y
The saved Y coordinate for the main window
firstTime
A boolean specifying whether or not this is our first run. This gets set if any required config entries are not set.
Methods   
__init__
get_creds
read
write
write_creds
  __init__ 
__init__ ( self,  defaults=None )

Initialize a oonf object and reads in the configuration file

  get_creds 
get_creds ( self,  url=None )

return a creds dictionary from the config for a given url.

  read 
read ( self )

Read/reread in the configuration file and assign to the attributes

  write 
write ( self )

creates all config entries and writes out the configuration file

  write_creds 
write_creds (
        self,
        url=None,
        username=None,
        password=None,
        usekey=None,
        port=None,
        )

creates the config entries for a given creds dictionary for teh given url or you can san set all of url, username, password, usekey and port attributes to create the config entries.


Table of Contents

This document was automatically generated on Sun Feb 3 17:55:12 2008 by HappyDoc version 2.1