コード例 #1
0
 def __init__(self):
     datasource.__init__(self, 'Dummy')
     #These will be hardcoded, best tag to use for replace?
     self.datasets = [{
         "key": "avage",
         "question": "Where is the average age {{value}}?"
     }, {
         "key": "electorate",
         "question": "Where is the electorate {{value}}?"
     }, {
         "key":
         "storyname",
         "question":
         "Where was the ABC story {{value}} located?"
     }]
     #these can be hardcoded or dynamically populated
     self.locations = {
         "test": {
             "id": "0",
             "name": "test",
             "geometry": {
                 "type": "Point",
                 "coordinates": [45, 45]
             },
             "values": {
                 "avage": "67",
                 "electorate": "Melbourne"
             }
         }
     }
     self.cleanemptylocations()
     self.cleanemptydatasets()
コード例 #2
0
ファイル: dummy.py プロジェクト: kwauchope/austat
 def __init__(self):
     datasource.__init__(self, 'Dummy')
     #These will be hardcoded, best tag to use for replace?
     self.datasets = [{"key" : "avage", "question" : "Where is the average age {{value}}?" },
                      {"key" : "electorate", "question" : "Where is the electorate {{value}}?" },
                      {"key" : "storyname", "question" : "Where was the ABC story {{value}} located?" }
                     ]
     #these can be hardcoded or dynamically populated
     self.locations = { "test" : {"id" : "0", "name" : "test", "geometry" : {"type" : "Point",
                                                                   "coordinates" : [45, 45]
                                                                  },
                                                     "values" : {"avage" : "67",
                                                                 "electorate" : "Melbourne"
                                                                }
                       }}
     self.cleanemptylocations()
     self.cleanemptydatasets()
コード例 #3
0
ファイル: lamedb.py プロジェクト: 1198s/enigma2
	def __init__(self, filename = "lamedb"):
		datasource.__init__(self)
		self.setFilename(filename)
コード例 #4
0
    def __init__(self, filename="satellites.xml"):
        self.filename = filename
        datasource.__init__(self)

        if not os.path.isfile(filename):
            print("[satxml] File %s doesn't exist. Creating it." % filename)
コード例 #5
0
ファイル: satxml.py プロジェクト: OpenViX/enigma2
	def __init__(self, filename = "satellites.xml"):
		self.filename = filename
		datasource.__init__(self)

		if not os.path.isfile(filename):
			print "File %s doesn't exist. Creating it." % filename
コード例 #6
0
 def __init__(self, name):
     datasource.__init__(self, name)
コード例 #7
0
 def __init__(self, filename="lamedb"):
     datasource.__init__(self)
     self.setFilename(filename)
コード例 #8
0
ファイル: csvdatasource.py プロジェクト: kwauchope/austat
 def __init__(self, name):
     datasource.__init__(self, name)