# eric6.Helpviewer.UserAgent.UserAgentWriter

Module implementing a class to write user agent data files.

### Global Attributes

None

### Classes

UserAgentWriter | Class implementing a writer object to generate user agent data files.

### Functions

None

## UserAgentWriter

Class implementing a writer object to generate user agent data files.

### Derived from

QXmlStreamWriter

### Class Attributes

None

### Class Methods

None

### Methods

UserAgentWriter | Constructor
__write | Private method to write a user agent file.
write | Public method to write a user agent data file.

### Static Methods

None

#### UserAgentWriter (Constructor)

UserAgentWriter()

Constructor

#### UserAgentWriter.__write

__write(agents)

Private method to write a user agent file.

agents
  dictionary with user agent data (host as key, agent string as value)

Returns:
  flag indicating success (boolean)

#### UserAgentWriter.write

write(fileNameOrDevice, agents)

Public method to write a user agent data file.

fileNameOrDevice
  name of the file to write (string) or device to write to (QIODevice)
agents
  dictionary with user agent data (host as key, agent string as value)

Returns:
  flag indicating success (boolean)

Up