Marcus Lowland wrote: > Hello, I'm fairly new to python and have read about and wanted to begin > experimenting with cpickle. As I understand, this should be a native > module in the python library. I have python 2.3 and now just installed > 2.4, but am not able to import or find cpickle.py in any directory of > the install, or in the previous version (pickle.py is present and > imports correctly). Is there a seperate module package that must be > downloaded and installed... or am I overlooking the obvious. > > Would appreciate any suggestions on how to acquire/load the module.
(1) Anything built-in is unlikely to be found as Anything.py (2) If the docs mention a module called xYzzy, you import it by "import xYzzy" -- being careful about case. cPickle's name *is* a bit deviant, isn't it? If you have Python, you have already acquired the module. For an insight into what comes from where, and how hard that little black duck is paddling under the water on your behalf, try this: os-command-prompt>python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook # c:\Python24\lib\site.pyc matches c:\Python24\lib\site.py import site # precompiled from c:\Python24\lib\site.pyc [BIG snip] >>> import cPickle # c:\Python24\lib\encodings\cp437.pyc matches c:\Python24\lib\encodings\cp437.py import encodings.cp437 # precompiled from c:\Python24\lib\encodings\cp437.pyc import cPickle # builtin import cStringIO # builtin >>> HTH, John -- http://mail.python.org/mailman/listinfo/python-list