The options module

The options module contains the Options class which provides the ability to load settings from the pysiriproxy configuration file, as as being able to parse the command line arguments.

The Settings class

Inheritance diagram of pysiriproxy.options.options.Settings

class pysiriproxy.options.options.Settings[source]

The Settings class defines all of the specific configuration settings that can be used in the pysiriproxy configuration file.

CertFile

This setting should contain the path to the file that is used as the certification file for connecting to the Guzzoni web server.

DebugLevel

This setting should contain the debug level which will be used by the system.

ErrorResponse

This setting should contain a string that will be spoken by Siri in the event of an Exception while objects are being filtered or speech rules are being applied.

GenCerts

This setting should contain a boolean indicating whether the pysiriproxy SSL certificates should be generated.

GuzzoniHost

This setting should contain the host name of the Guzzoni web server.

GuzzoniPort

This setting should contain the port number used for connecting to the Guzzoni web server.

KeyFile

The setting should contain the path to the file that is used as the key file for connecting to the Guzzoni web server.

LogFile

This setting should contain the path to the log file where pysiriproxy should log all of its logging messages.

LogLevel

This setting should contain the log level which will used by the system.

Here are valid values for this setting:

  • DEBUG,
  • INFO,
  • WARN, and
  • ERROR
PluginsDir

This setting should contain the path to the system directory that contains the plugins which pysiriproxy should load.

iPhonePort

This setting should contain the port number that the iPhone uses for its connection.

The Options class

Inheritance diagram of pysiriproxy.options.options.Options

class pysiriproxy.options.options.Options(*args, **kwargs)[source]

The Options class is responsible for parsing command line and configuration file options and providing the ability to get the value of a given option.

ClOptions

Define the list of all of the options which are configurable only via the command line.

Options

Define the dictionary of possible configuration section names mapped to the list of configuration options available for that section.

Variables

Define the dictionary of variables that can be used in the pysiriproxy configuration file.

These variables can be used by adding a dollar sign before the variable name in the configuration file. These variables will be replaced in the configuration file prior to parsing it.

Example:

# If the following setting is configured in the configuration file,
# the $HOME variable would be replaced by the user's home directory
# prior to parsing the configuration file
RandomSetting = $HOME/Documents

Table Of Contents

Previous topic

The config module

Next topic

The packetPlayer module

This Page