Hi All,
I've encountered a problem with Pickle's load function.
I have the following code in an request handling part:
class Test():
def __init__(self,name):
@view_defaults(route_name='test')
class test_view(object):
...
f = open('test.pkl', 'rb')
self.test = pickle.load(f)
f.close()
So far it works alright.
However, when I move the class Test code to a separate file test.py
and use "import test" to import the module.
The pickle reports that it cannot find test module.
When I use the code in CherryPy, it works fine.
Could anyone help me to solve the problem?
best regards
Yang