How to load data in Python for which data is stored as a customized class
Question: I have a question with loading data in Python.

Basically, I defined all Classes I need in a file called "utility.py". and I
have one data file "result.data" which stores results in form of a specific
class called "Solution" which is defined in "utility.py". What I want to do is
to load "result.data" in another py. file (ex:new.py). From what I know,
cPickle module is the one that can be used. So in new.py, I wrote "from
utility import *", and "Sol=cPickle.load(open('Result.data'))". This works
fine when I worked among windows based system. However, when I tried to load
the result.data I generated in windows system to new.py file in linux or mac
system, The error "ImportError: No module named utility" always occurs.

I'm a not a professional programmer, and I just start to code in python. Could
you please give some guide on how to solve this problem? Thank you in advance.


Answer: Check `sys.path`. Does it contain the location where utility.py is kept? Does
it have current directory ( an empty string )?

That could be the issue.

