On 24/06/2012 00:17, Steven D'Aprano wrote:
On Sat, 23 Jun 2012 19:14:43 +0100, Rotwang wrote:
The problem is that if the object was
pickled by the module run as a script and then unpickled by the imported
module, the unpickler looks in __main__ rather than mymodule for the
object's class, and
On Sat, 23 Jun 2012 19:14:43 +0100, Rotwang wrote:
> The problem is that if the object was
> pickled by the module run as a script and then unpickled by the imported
> module, the unpickler looks in __main__ rather than mymodule for the
> object's class, and doesn't find it.
Possibly the solutio
On 23/06/2012 18:31, Dave Angel wrote:
On 06/23/2012 12:13 PM, Peter Otten wrote:
Rotwang wrote:
Hi all, I have a module that saves and loads data using cPickle, and
I've encountered a problem. Sometimes I want to import the module and
use it in the interactive Python interpreter, whereas some
On 23/06/2012 17:13, Peter Otten wrote:
Rotwang wrote:
Hi all, I have a module that saves and loads data using cPickle, and
I've encountered a problem. Sometimes I want to import the module and
use it in the interactive Python interpreter, whereas sometimes I want
to run it as a script. But obj
On 06/23/2012 12:13 PM, Peter Otten wrote:
> Rotwang wrote:
>
>> Hi all, I have a module that saves and loads data using cPickle, and
>> I've encountered a problem. Sometimes I want to import the module and
>> use it in the interactive Python interpreter, whereas sometimes I want
>> to run it as a
Rotwang wrote:
> Hi all, I have a module that saves and loads data using cPickle, and
> I've encountered a problem. Sometimes I want to import the module and
> use it in the interactive Python interpreter, whereas sometimes I want
> to run it as a script. But objects that have been pickled by runn
Hi all, I have a module that saves and loads data using cPickle, and
I've encountered a problem. Sometimes I want to import the module and
use it in the interactive Python interpreter, whereas sometimes I want
to run it as a script. But objects that have been pickled by running the
module as a