minor tweaks
This commit is contained in:
		
							parent
							
								
									32d18c880b
								
							
						
					
					
						commit
						b2b3e77a34
					
				@ -6,11 +6,14 @@ from utils.misc_utils import immutable_to_list
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    db = pseudodb.PseudoDB('pseudodb.default.data')
 | 
			
		||||
    print("Collections in Pseudodb: "+str(db.data_list()))
 | 
			
		||||
    for collection in db.data_list():
 | 
			
		||||
    data_collections = db.data_collections()
 | 
			
		||||
    print("Collections in Pseudodb: "+str(data_collections))
 | 
			
		||||
    for collection in data_collections:
 | 
			
		||||
        print("Collection: "+collection)
 | 
			
		||||
        for key in db.get_keys(collection):
 | 
			
		||||
            print(key+": "+str(db.get_values(collection, key)))
 | 
			
		||||
            print("\t"+key+": "+str(db.get_values(collection, key)))
 | 
			
		||||
 | 
			
		||||
    print()
 | 
			
		||||
 | 
			
		||||
    immutable_list = ('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine')
 | 
			
		||||
    print("Immutable: "+str(immutable_list))
 | 
			
		||||
 | 
			
		||||
@ -15,7 +15,7 @@ class PseudoDB:
 | 
			
		||||
            print(f"Data module '{module_name}' not found.")
 | 
			
		||||
            return None
 | 
			
		||||
 | 
			
		||||
    def data_list(self):
 | 
			
		||||
    def data_collections(self):
 | 
			
		||||
        # Check if default has been successfully loaded
 | 
			
		||||
        if self.data is not None:
 | 
			
		||||
            attr_names = []
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user