March 20th, 2013, 12:24 AM
I am new to python, pls bear with me....
I have an object oriented database with the following folder structure
I want to create a list of an object of some kind which contains all users with thier corresponding userInfo and UserStatus
Some User's CurrentUserStatus might be empty, in which case I want to insert an Empty CurrentUserStatus for those users, but userInfo is always present
I need this list of object so I can iterate thru it and easily access each user's info and status.
How do I go about this
I am thinking a need to create a container object that will contain the info and status, read thru the folder structure and populate this container object.
I am looking for an efficient way to do this
March 20th, 2013, 04:04 AM
If you're communicating with a database (oracle, MySQL, ...) from python, it depends on the technology/framework you're using, that is, how you retrieve data.
For example in Django, when you select, you can actually put them directly in a list.
So, how to you retrieve data from the database?
March 20th, 2013, 12:31 PM
for user in db.objectRange(dirname=dbPath ):
Originally Posted by dariyoosh
Users.append(db.readobj( dbPath.path()) )
something like that - Linq like queries