From: Ajay <abr...@ma...> - 2004-09-28 12:24:15
|
-- Ajay Brar, CS Honours 2004 Smart Internet Technology Research Group Quoting Martin Sj=F6gren <msj...@gm...>: > 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. > i thought you could only import Python .py or .pyd files. i am quite sure my build went okay. those are the files that i have. the system admin on my server has already built PyOpenSSL. i tried import the= n but that threw the same error. So i built again to my home directory, added that to the path and tried import from there. that gave the same error. buiild and install didn't throw any errors or warnings at all. i am running this on a solaris. > > /Martin > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |