We use pickle to transfer our data across the network. We do not use it to
store data to disk, though, for a number of reasons: 1) As mentioned
earlier, if your classes change you can run into some significant update
issues. 2) It's unreadable. 3) It's very python specific, which means your
data is sequestered in python, so if a non-python tool needs access to your
data you've got to translate it, so you might as well use something more
universal, such as xml or json.

We also do not use the logging module because of the shared nature of its
implementation. We started to, but then ran into issues separating our own
data for clarity. Instead, we simply use raw python IO with a few small but
handy classes that speed up output by delaying writing as data is gathered.

Qt has some very powerful offerings, which we use primarily for UI
development, though we have been disappointed by its xml handling, as it
does not preserve order.

-J

On Sat, Apr 16, 2011 at 1:43 PM, David Moulder <[email protected]>wrote:

> 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
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to