def __init__(self, **kwargs): BaseObject.__init__(self, **kwargs) Config.__init__(self, **kwargs) logger_setup = kwargs.get("logger_setup", self.GLOBAL_CONFIG.get("logger_setup")) if logger_setup is not None: kwargs = logger_setup if not kwargs.get("log_filename"): appname = self.GLOBAL_CONFIG.get("app_name") if appname is not None: kwargs.setdefault("log_filename", os.path.expanduser("~/%s.log" % (appname))) self._logger = None use_conf = kwargs.get("use_conf", True) if use_conf: d = self.get_conf() else: d = {} for key in self._confkeys: val = d.get(key) if val is None: val = kwargs.get(key) if val is None: continue setattr(self, key, val) self.logger_kwargs = kwargs.get("logger_kwargs", {}) self.set_logger() self.bind(property_changed=self._on_own_property_changed)
def __init__( self, accept, username="", password="", uid="", process_id="", audioFilename=None, metadataFilename=None, transcriptFilename=None, service=None, item_id=None, count=None, status=None, ): BaseObject.__init__( self, accept, username=username, password=password, uid=uid, process_id=process_id, audioFilename=audioFilename, metadataFilename=metadataFilename, transcriptFilename=transcriptFilename, service=service, item_id=item_id, count=count, status=status, ) self.path = "media/" self.path_trans = "/transcribe" self.path_publish = "/publish" self.path_unpublish = "/unpublish"
def __init__(self, **kwargs): BaseObject.__init__(self, **kwargs) Config.__init__(self, **kwargs) logger_setup = kwargs.get('logger_setup', self.GLOBAL_CONFIG.get('logger_setup')) if logger_setup is not None: kwargs = logger_setup if not kwargs.get('log_filename'): appname = self.GLOBAL_CONFIG.get('app_name') if appname is not None: kwargs.setdefault('log_filename', os.path.expanduser('~/%s.log' % (appname))) self._logger = None use_conf = kwargs.get('use_conf', True) if use_conf: d = self.get_conf() else: d = {} for key in self._confkeys: val = d.get(key) if val is None: val = kwargs.get(key) if val is None: continue setattr(self, key, val) self.logger_kwargs = kwargs.get('logger_kwargs', {}) self.set_logger() self.bind(property_changed=self._on_own_property_changed)
def __init__(self, attr): BaseObject.__init__(self, attr['name'], 'square') SfSceneComponent.__init__(self, attr.get('pixmap', '')) self._min = attr.get('min', 0) self._max = attr.get('max', 0) self._value = float(self.getMin()) self._stepSize= 0.01
def __init__(self, accept, username="", password="", uid="", process_id="", audioFilename="", metadataFilename="", transcriptFilename="", service=None, item_id=None, count=None): BaseObject.__init__(self, accept, username=username, password=password, uid=uid, process_id=process_id, audioFilename=audioFilename, metadataFilename=metadataFilename, transcriptFilename=transcriptFilename, service=service, item_id=item_id, count=count) self.path = 'transcripts/'
def __init__(self, name, coords = None): BaseObject.__init__(self) self.path_id = Path.new_id() self.name = name self.coords = coords # add us Path.paths.append(self)
def __init__(self, **kwargs): BaseObject.__init__(self, **kwargs) Config.__init__(self, **kwargs) self._default_filetype = None self._mimetypes = mimetypes.MimeTypes() self.filetypes = {} filetype_data = kwargs.get('filetype_data', []) for data in filetype_data: self.add_filetype(**data) self.recent_files = {} self.files_by_path = {} self.get_recent_files() self.bind(current_file=self._on_current_file_set)
def __init__(self, trip_route, start, end, headway): BaseObject.__init__(self) self.frequency_id = Frequency.new_id() self.start = start self.end = end self.headway = headway self._trip_route = weakref.ref(trip_route) # add us Frequency.frequencies.append(self)
def __init__(self, name = None, url = None, timezone = 'America/Chicago', language = 'EN', phone = None, fare_url = None): BaseObject.__init__(self) self.agency_id = Agency.new_id() self.name = name self.url = url self.timezone = timezone self.language = language self.phone = phone self.fare_url = fare_url # add us Agency.agencies.append(self)
def __init__(self, name, trip_route, calendar): BaseObject.__init__(self) self.trip_id = Trip.new_id() self.name = name self._trip_route = weakref.ref(trip_route) self._calendar = weakref.ref(calendar) self.stops = [] self._next_block = None self._previous_block = None # add us Trip.trips.append(self)
def __init__(self): BaseObject.__init__(self) self.name = "Base" self.properties += [ P("fillColor", "Fill Color", PROPTYPE_COLOR, color_parse("#222222")), P("borderColor", "Border Color", PROPTYPE_COLOR, color_parse("#DDDDDD")), P("borderWidth", "Border Width", PROPTYPE_INTEGER, 5), P("rotation", "Rotation", PROPTYPE_INTEGER, 0), P("x", "X", PROPTYPE_INTEGER, 10), P("y", "Y", PROPTYPE_INTEGER, 10), P("width", "Width", PROPTYPE_INTEGER, 50), P("height", "Height", PROPTYPE_INTEGER, 50), P("text", "Text", PROPTYPE_STRING, "") ]
def __init__(self, service_name, monday = 0, tuesday = 0, wednesday = 0, thursday = 0, friday = 0, saturday = 0, sunday = 0, start_date = '20120101', end_date = '20140101'): BaseObject.__init__(self) self.calendar_id = Calendar.new_id() self.name = service_name self.days = [monday, tuesday, wednesday, thursday, friday, saturday, sunday] #self.start_date = start_date or datetime.now() #self.end_date = end_date or datetime.now() + relativedelta(years=+1) self.start_date = start_date self.end_date = end_date # add us Calendar.calendars.append(self)
def __init__(self, service_name, monday = 1, tuesday = 1, wednesday = 1, thursday = 1, friday = 1, saturday = 1, sunday = 1, start_date = '20150601', end_date = '20170601', added_excn = [], remov_excn = []): BaseObject.__init__(self) self.calendar_id = Calendar.new_id() self.name = service_name self.days = [monday, tuesday, wednesday, thursday, friday, saturday, sunday] self.start_date = start_date self.end_date = end_date self.added_excn = added_excn self.remov_excn = remov_excn # add us Calendar.calendars.append(self)
def __init__(self, code = None, name = None, description = None, latitude = None, longitude = None, zone_id = None, url = None, location_type = 0, parent_station = None): BaseObject.__init__(self) self.stop_id = Stop.new_id() self.code = code self.name = name self.description = description self.latitude = latitude self.longitude = longitude self.zone_id = zone_id self.url = url self.location_type = location_type self.parent_station = parent_station self.pictures = [] # add us Stop.stops.append(self)
def __init__(self, agency = None, short_name = '', long_name = '', description = '', route_type = None, url = '', color = None, text_color = None): BaseObject.__init__(self) self.route_id = Route.new_id() self.agency = agency if agency is None: self.agency = Agency.agencies[0] self.short_name = short_name self.long_name = long_name self.description = description self.route_type = route_type self.url = url self.color = color self.text_color = text_color self.trip_routes = [] # add us Route.routes.append(self)
def __init__(self, **kwargs): #super(OSCNode, self).__init__() BaseObject.__init__(self, **kwargs) dispatch.Receiver.__init__(self) self.register_signal('child_added', 'child_removed') if 'name' in kwargs: self.setName(kwargs.get('name')) if 'parent' in kwargs: self.setParent(kwargs.get('parent')) self._oscMaster = self._parent._oscMaster self.get_client_cb = self._parent.get_client_cb else: self._oscMaster = kwargs.get('oscMaster', False) self.get_client_cb = kwargs.get('get_client_cb') self.is_root_node = kwargs.get('root_node', False) self.transmit_callback = kwargs.get('transmit_callback') if self.is_root_node: self.get_epoch_offset_cb = kwargs.get('get_epoch_offset_cb') self._dispatch_thread = OSCDispatchThread(osc_tree=self) self._dispatch_thread.start()
def __init__(self, name, route, calendar, headsign, direction, path = None): BaseObject.__init__(self) self.trip_route_id = TripRoute.new_id() self.name = name self._route = None self._calendar = None self.set_route(route) self.set_calendar(calendar) self.headsign = headsign self.direction = direction self.path = path self.wheelchair_accessible = 0 self.trips = [] self.frequencies = [] self._stops = [] # add us TripRoute.trip_routes.append(self)
def __init__(self,attr): BaseObject.__init__(self, attr['name'], 'add') SfSceneComponent.__init__(self, attr.get('pixmap', ''))
def __init__ (self): BaseObject.__init__ (self)
def __init__(self, attr): BaseObject.__init__(self, attr['name'], 'constant') SfSceneComponent.__init__(self, attr.get('pixmap', '')) self._val = float(attr.get('value', 0))
def __init__(self, stop, arrival = None, departure = None): BaseObject.__init__(self) self.arrival = arrival self.departure = departure or arrival self._stop = weakref.ref(stop)
def __init__(self, accept, username="", password="", uid="", process_id="", audioFilename="", metadataFilename=""): BaseObject.__init__(self, accept, username=username, password=password, uid=uid, process_id=process_id, audioFilename=audioFilename, metadataFilename=metadataFilename) self.path = 'transcripts/'
def __init__(self, attr): BaseObject.__init__(self, attr['name'], 'txt') SfSceneComponent.__init__(self, attr.get('pixmap', '')) self._value = 0
def __init__(self, attr): BaseObject.__init__(self, attr['name'], 'limit') SfSceneComponent.__init__(self, attr.get('pixmap', '')) self._min = attr.get('min', 0) self._max = attr.get('max', 0)
def __init__(self, x, y, color): BaseObject.__init__(self, x, y, color) self.isAlive = False self.index = -1
def __init__(self, x, y, button, color): BaseObject.__init__(self, x, y, color) self.button = button self.isDown = False