Simple Conceptual Pickling problems

Emile van Sebille emile at fenx.com
Tue Jul 2 08:33:58 EDT 2002


chris lyon
> So , if I understand you, Because I ran the original code using the
> Pythonwin environment, I produced the objects in module __main__ NOT
in the
> module I though they were being created in ( in my case a module
called
> octavia which contains the class Programmes).
>
> When I then ran with my test module, which imported octavia, The
Unpickle
> process believed it was trying to unpickle objects defined in __main__
NOT

It's not so much the process as the contents of the pickle that
determines that.

> from within octavia ?

You got it.

>
> So should I then have a module 'above' my octavia module which will
import
> octavia for it to work?
>

Either that, or let octavia always run as main, or move your test code
into octavia, or import your testcode into octavia.  ;-)

--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list