Package bosco :: Module importer :: Class SIRunImporter
[hide private]
[frames] | no frames]

Class SIRunImporter

source code

Importer --+
           |
          SIRunImporter

Import SICard readout data from a backup file. File Format: Course Code;SICard Number;ReadoutTime;StartTime;FinishTime;CheckTime;ClearTime;Control Code 1;Time1;Control Code 2;Time2;... Time Format is YYYY-MM-DD HH:MM:SS.ssssss Example: SE1;345213;2008-02-20 12:32:54.000000;2008-02-20 12:14:00.000000;2008-02-20 13:27:06.080200;2008-02-20 12:10:21.000000;2008-02-20 12:10:07.002000;32;2008-02-20 12:19:23.000000;76;2008-02-20 12:20:57.300000;...

Instance Methods [hide private]
 
__init__(self, fname, replay=False, interval=10, encoding='utf-8', verbose=False) source code
 
add_punch(self, station, timestring)
Adds a punch to the list of punches.
source code
 
import_data(self, store)
Import runner data into store.
source code
Static Methods [hide private]
 
__datetime(punchtime)
Create a datetime object from a punchtime given as string in the format YYYY-MM-DD HH:MM:SS.ssssss.
source code
Class Variables [hide private]
  timestamp_re = re.compile('([0-9]{4})-([0-9]{2})-([0-9]{2}) ([...
  TIMEFORMAT = '%Y-%m-%d %H:%M:%S'
  COURSE = 0
  CARDNR = 1
  READOUT = 2
  START = 3
  FINISH = 4
  CHECK = 5
  CLEAR = 6
  BASE = 7
Method Details [hide private]

__init__(self, fname, replay=False, interval=10, encoding='utf-8', verbose=False)
(Constructor)

source code 
Overrides: Importer.__init__

import_data(self, store)

source code 

Import runner data into store. Creates all the necessary objects and add them to the store, but don't commit the store.

Overrides: Importer.import_data
(inherited documentation)

Class Variable Details [hide private]

timestamp_re

Value:
re.compile('([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0\
-9]{2})(\.([0-9]{6}))?')