pyqso package¶
Submodules¶
pyqso.adif module¶
-
class
pyqso.adif.
ADIF
[source]¶ Bases:
object
The ADIF class supplies methods for reading, parsing, and writing log files in the Amateur Data Interchange Format (ADIF). For more information, visit http://adif.org/
-
is_valid
(field_name, data, data_type)[source]¶ Validate the data in a field with respect to the ADIF specification.
Parameters: - field_name (str) – The name of the ADIF field.
- data (str) – The data of the ADIF field to validate.
- data_type (str) – The type of data to be validated. See http://www.adif.org/304/ADIF_304.htm#Data_Types for the full list with descriptions.
Returns: True or False to indicate whether the data is valid or not.
Return type: bool
-
parse_adi
(text)[source]¶ Parse some raw text (defined in the ‘text’ argument) for ADIF field data.
Parameters: text (str) – The raw text from the ADIF file to parse. Returns: A list of dictionaries (one dictionary per QSO). Each dictionary contains the field-value pairs, e.g. {“FREQ”: “145.500”, “BAND”: “2M”, “MODE”: “FM”}. Return type: list
-
read
(path)[source]¶ Read an ADIF file and parse it.
Parameters: path (str) – The path to the ADIF file to read. Returns: A list of dictionaries (one dictionary per QSO), with each dictionary containing field-value pairs, e.g. {FREQ:145.500, BAND:2M, MODE:FM}. If the file cannot be read, the method returns None. Return type: list Raises: IOError – If the ADIF file does not exist or cannot be read (e.g. due to lack of read permissions).
-
write
(records, path)[source]¶ Write an ADIF file containing all the QSOs in the ‘records’ list.
Parameters: - records (list) – The list of QSO records to write.
- path (str) – The desired path of the ADIF file to write to.
Returns: None
Raises: IOError – If the ADIF file cannot be written (e.g. due to lack of write permissions).
-
pyqso.auxiliary_dialogs module¶
pyqso.awards module¶
pyqso.blank module¶
pyqso.cabrillo module¶
-
class
pyqso.cabrillo.
Cabrillo
[source]¶ Bases:
object
The Cabrillo class supplies methods for writing log files in the Cabrillo format (v3.0). For more information, visit http://wwrof.org/cabrillo/
-
write
(records, path, contest='', mycall='')[source]¶ Write a list of QSO records to a file in the Cabrillo format.
Parameters: - records (list) – The list of QSO records to write.
- path (str) – The desired path of the Cabrillo file to write to.
- contest (str) – The name of the contest.
- mycall (str) – The callsign used during the contest.
Returns: None
Raises: IOError – If the Cabrillo file cannot be written (e.g. due to lack of write permissions).
-
pyqso.cabrillo_export_dialog module¶
-
class
pyqso.cabrillo_export_dialog.
CabrilloExportDialog
(application)[source]¶ Bases:
object
A handler for the Gtk.Dialog through which a user can specify Cabrillo log details.
-
contest
¶ Return the name of the contest.
Returns: The name of the contest. Return type: str
-
mycall
¶ Return the callsign used during the contest.
Returns: The callsign used during the contest. Return type: str
-
pyqso.calendar_dialog module¶
-
class
pyqso.calendar_dialog.
CalendarDialog
(application)[source]¶ Bases:
object
Handler for a simple dialog containing a Gtk.Calendar widget. Using this ensures the date is in the correct YYYYMMDD format required by ADIF.
-
date
¶ Return the date from the Gtk.Calendar widget in YYYYMMDD format.
Returns: The date from the calendar in YYYYMMDD format. Return type: str
-
pyqso.callsign_lookup module¶
pyqso.compare module¶
-
pyqso.compare.
compare_date_and_time
(model, row1, row2, user_data)[source]¶ Compare two rows (let’s call them A and B) in a Gtk.ListStore, and sort by both date and time.
Parameters: - model (Gtk.TreeModel) – The model used to sort the log data.
- row1 (Gtk.TreeIter) – The pointer to row A.
- row2 (Gtk.TreeIter) – The pointer to row B.
- user_data – The specific column from which to retrieve data for rows A and B.
Returns: -1 if Row B’s date/time is more recent than Row A’s; 0 if both dates and times are the same; 1 if Row A’s date/time is more recent than Row B’s.
Return type: int
-
pyqso.compare.
compare_default
(model, row1, row2, user_data)[source]¶ The default sorting function for all Gtk.ListStore objects.
Parameters: - model (Gtk.TreeModel) – The model used to sort the log data.
- row1 (Gtk.TreeIter) – The pointer to row A.
- row2 (Gtk.TreeIter) – The pointer to row B.
- user_data – The specific column from which to retrieve data for rows A and B.
Returns: -1 if the value of Row A’s column value is less than Row B’s column value; 0 if both values are the same; 1 if Row A’s column value is greater than Row B’s column value.
Return type: int
pyqso.dx_cluster module¶
pyqso.grey_line module¶
pyqso.log module¶
pyqso.log_name_dialog module¶
pyqso.logbook module¶
pyqso.preferences_dialog module¶
pyqso.printer module¶
pyqso.record_dialog module¶
pyqso.summary module¶
pyqso.telnet_connection_dialog module¶
-
class
pyqso.telnet_connection_dialog.
TelnetConnectionDialog
(application)[source]¶ Bases:
object
A handler for the Gtk.Dialog through which a user can specify Telnet connection details.
-
bookmark
¶ Return True if a new bookmark should be created, otherwise return False.
Returns: True if a new bookmark should be created, otherwise False. Return type: bool
-
host
¶ Return the Telnet server’s host name.
Returns: The server’s host name. Return type: str
-
password
¶ Return the user’s password.
Returns: The user’s password. Return type: str
-
port
¶ Return the Telnet server’s port number (as a string).
Returns: The server’s port number (as a string). Return type: str
-
username
¶ Return the user’s username.
Returns: The user’s username. Return type: str
-
pyqso.toolbar module¶
-
class
pyqso.toolbar.
Toolbar
(application)[source]¶ Bases:
object
The toolbar underneath the menu bar.
Enable/disable logbook-related toolbar items.
Parameters: sensitive (bool) – If True, enable the ‘new logbook’ and ‘open logbook’ toolbar items. If False, disable them.
Enable/disable record-related toolbar items.
Parameters: sensitive (bool) – If True, enable all the record-related toolbar items. If False, disable them all.