From: <msj...@gm...> - 2004-09-28 12:05:35
|
On Tue, 28 Sep 2004 21:42:48 +1000, Ajay <abr...@ma...> wrote: > hi! > > i correctly installed PyOpenSSL. however when i try > >>> import OpenSSL > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/local/usr/lib/python2.3/site-packages/OpenSSL/__init__.py", line > 11, in > ? > import rand, crypto, SSL, tsafe > ImportError: No module named rand > > how do i go about using the modules? Well, if you get this kind of import error I highly doubt that you've got a fully working build. When you build pyopenssl (python setup.py build) you should end up with the following files in build/lib.something/OpenSSL: __init__.py, version.py, tsafe.py, rand.so, crypto.so, SSL.so. "import OpenSSL" or "from OpenSSL import crypto, SSL" or what have you *is* the right way to import the modules. If that doesn't work, something's wrong. /Martin |