SignalBoxes

class sig_box.SignalBoxes(data_dir=None, update=False, verbose=True)[source]

A class for collecting signal box prefix codes.

Parameters
  • data_dir (str, None) – name of data directory, defaults to None

  • update (bool) – whether to check on update and proceed to update the package data, defaults to False

  • verbose (bool or int) – whether to print relevant information in console as the function runs, defaults to True

Example:

>>> from pyrcs.other_assets import SignalBoxes

>>> sb = SignalBoxes()

>>> print(sb.Name)
Signal box prefix codes

>>> print(sb.SourceURL)
http://www.railwaycodes.org.uk/signal/signal_boxes0.shtm

Methods

collect_non_national_rail_codes([…])

Collect signal box prefix codes of non-national rail from source web page.

collect_prefix_codes(initial[, update, verbose])

Collect signal box prefix codes for the given initial from source web page.

fetch_non_national_rail_codes([update, …])

Fetch signal box prefix codes of non-national rail from local backup.

fetch_prefix_codes([update, pickle_it, …])

Fetch signal box prefix codes from local backup.