Re: PyCrypto binaries -- nearly there..

Marc Horst <[email protected]>
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
Hi Alexandre,

That is a good hint! I tried it and here is the result:

Python 2.5 (release25-maint, Dec 19 2006, 23:22:00) [MSC v.1201 32 bit 
(ARM)] on win32
 >>> execfile('\\Flash 
Disk\\Programmabestanden\\Python25\\Lib\\demo_pda.py')
*** Unable to open host keys file
*** WARNING: Unknown host key!
*** Caught exception: <type 'exceptions.ImportError'>: No module named mmap
Traceback (most recent call last):
  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line 
166, in <module>
    agent_auth(t, username)
  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line 
53, in agent_auth
    agent = paramiko.Agent()
  File "\Flash Disk\Programmabestanden\Python25\lib\paramiko\agent.py", 
line 68, in __init__
    import win_pageant
  File "\Flash 
Disk\Programmabestanden\Python25\lib\paramiko\win_pageant.py", line 27, 
in <module>
    import mmap
ImportError: No module named mmap
Traceback (most recent call last):
  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line 
190, in <module>
    sys.exit(1)
  File "\Flash Disk\Programmabestanden\Python25\Lib\demo_pda.py", line 
41, in dummy_exit
    raise ExitError()
ExitError
 >>>


I looked on my __PC__ (as I guessed that if it worked on my PC, mmap 
should be called here too) for a file named mmap and for files with as 
content mmap, but found only test_mmap.py. So I'm not sure what should 
be concluded from this. Maybe that on my __PDA__ a different execution 
path is used, in which mmap is/should be imported, which results in the 
error message above.

Maybe you can conclude more from this error message.


Regards,

Marc


[email protected] wrote:
> I will try to run paramiko+pycrypto myself, i strongly suspect 
> paramiko to call sys.exit on some condition, so in the meantime you 
> can try to insert this in the beginning of your code (before any other 
> import):
>
> import sys
>
> class ExitError(Exception):
>     pass
>
> def dummy_exit(code=0):
>     raise ExitError()
>
> sys.exit = dummy_exit
>
> and see if it raises an exception instead of quitting, then you can 
> track-down the source to locate the condition ...
>
> I'm not sure if it will help, but it may be worth trying.
>
> Alexandre.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.