ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
Re: [C++-sig] Pickling object from nested class
by Ralf W. Grosse-Kunstleve other posts by this author
Oct 21 2003 1:32PM messages near this date
[C++-sig] Pickling object from nested class | Re: [C++-sig] Re: Duplicate "ignore"(again...) and more. (Latest CVS, VC .NET 2003)
You don't mention the pickle suite. Are you aware of this?
http://www.boost.org/libs/python/doc/v2/pickle.html
David, this page isn't advertised very well. There are links only from the
class_ reference section and from the acknowledgement page. I think it would be
good to (re?)introduce a link at the front page. Later we could do something
like this:
- Suites
      - Indexing
      - Pickling
Ralf

--- Nikolay Mladenov <nickm@[...].com>  wrote:
>  Hi,
>  
>  I have class View with nested class Data  exported with BPL in module
>  objects.
>  When I try to pickle object of the nested class I get the following
>  PicklingError:
>  
>  >>> dump(d,out)
>  Traceback (most recent call last):
>    File "<console>", line 1, in ?
>    File "D:\Python22\Lib\pickle.py", line 973, in dump
>      Pickler(file, bin).dump(object)
>    File "D:\Python22\Lib\pickle.py", line 115, in dump
>      self.save(object)
>    File "D:\Python22\Lib\pickle.py", line 219, in save
>      self.save_reduce(callable, arg_tup, state)
>    File "D:\Python22\Lib\pickle.py", line 244, in save_reduce
>      save(callable)
>    File "D:\Python22\Lib\pickle.py", line 171, in save
>      self.save_global(object)
>    File "D:\Python22\Lib\pickle.py", line 519, in save_global
>      raise PicklingError(
>  PicklingError: Can't pickle <class 'objects.Data'>: it's not found as
>  objects.Data
>  
>  This worked with native Python classes.
>  How can this be made to work?
>  
>  Nikolay


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Nikolay Mladenov
Ralf W. Grosse-Kunstleve

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved