SignalBoxes

class sig_box.SignalBoxes(data_dir=None, update=False)[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

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

SignalBoxes.cdd_sigbox(*sub_dir, **kwargs)

Change directory to package data directory and sub-directories (and/or a file).

SignalBoxes.collect_non_national_rail_codes([…])

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

SignalBoxes.collect_signal_box_prefix_codes(initial)

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

SignalBoxes.fetch_non_national_rail_codes([…])

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

SignalBoxes.fetch_signal_box_prefix_codes([…])

Fetch signal box prefix codes from local backup.