I use configObj for serialising dictionary data you can easly embed json data into it as well. Make combined together you get a nice human readable file format.
On Sat, Apr 16, 2011 at 5:44 AM, Amorano <[email protected]> wrote: > Only problem(s) we found with pickle: Class structures can not > change, and it doesn't work on pynodes =) > > As for modules: > > pyodbc + sqlobject (filemaker and mysql) > *cough* mrv *cough* > pyro > pyqt > (and recently trying to get the pythonnet to work in x64 Maya) > > On Apr 15, 2:33 pm, Jakob Welner <[email protected]> wrote: > > I can vouch for Pickle as well. I use it for anything that needs saving > and > > loading. > > > > Example of my implementation from my Animation Library Toole (PAIE): > > Make a class to contain all information you need and a wrapper class that > > handles file path, load, save, retrieval of information and deploying > > information. > > Fill op the dataContainer class with stuff and simply pickle the instance > of > > the class to a file. That'll save all the information plus the class > data, > > methods and whatnot so when you unpickle the file you'll instantly have > the > > whole class back in your wrapper where you can access all the data easily > > without thinking of either parsers or sanity checks.. only issue is that > > it's all serialized data so its difficult to edit manually in a text > editor. > > > > If you want to see the actual code you can get my file here: > https://www.creativecrash.com/maya/downloads/scripts-plugins/animatio... > > > > If anyone else is using it differently I'd be eager to hear their way as > > well! > > > > Cheers > > > > JAKOB WELNER > > _____________ > > Animator | R&D > > jakob.welner.dk > > > > On Fri, Apr 15, 2011 at 12:23 PM, C. B. Esquire <[email protected] > >wrote: > > > > > > > > > > > > > > > > > Interesting, pickle for storing dictionaries of node settings? > > > > > How do you implement this exactly? I use pickle for module parsing > > > > > On Wed, Apr 13, 2011 at 1:02 PM, Geordie Martinez < > > > [email protected]> wrote: > > > > >> I use 're' for reg ex to figure out naming schemas or how to parse > the > > >> name of selected objects in pymel to determine information. > > >> I use 'logging' as well for just about everything. > > >> pymel of course. > > > > >> 'pickle' for storing dictionaries of information like skin weights, > node > > >> settings, and what not. > > > > >> -- > > >http://groups.google.com/group/python_inside_maya > > -- > http://groups.google.com/group/python_inside_maya > -- David Moulder http://www.google.com/profiles/squish3d -- http://groups.google.com/group/python_inside_maya
