def readOutputs(self, configPaths): return [(filePath, FileDict.readReferencedDict(filePath, "outputLogName")) for filePath in configPaths]
def __init__(self, GroupId, ServerId): self.file_dict = FileDict.FileDictionary(GroupId, ServerId)
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import sys, os import FileDict if len(sys.argv) < 2: print "usage: python test_FileDict.py path" sys.exit(1) path = sys.argv[1] myDict = FileDict.FileDict(os.path.join(path, "test_FileDict.fd")) print myDict.topDict myDict.writeToFile(os.path.join(path, "test_FileDict_rewrite.fd")) groupTest = [os.path.join(path, "test_FileDict") + i for i in ("0", "1", "2")] print FileDict.groupPathsByValue(groupTest, "x")