It looks like you have named your program paramiko.py? That is hiding the 
module.
Try renaming your script.

BTW its probavbly a bad idea to keepm Python scripts on the Desktop. 
Better to create a folder.


 
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/



>________________________________
> From: Ufuk Eskici <ufukesk...@gmail.com>
>To: Alan Gauld <alan.ga...@btinternet.com> 
>Cc: "tutor@python.org" <tutor@python.org> 
>Sent: Thursday, 27 December 2012, 9:53
>Subject: Re: [Tutor] how to control putty window
> 
>
>It seems it is looking for Paramiko under wrong folder.
>
>
>>>> import paramiko
>
>
>Traceback (most recent call last):
>  File "<pyshell#3>", line 1, in <module>
>    import paramiko
>  File "C:/Users/eufuesk/Desktop\paramiko.py", line 3, in <module>
>    ssh = paramiko.SSHClient()
>AttributeError: 'module' object has no attribute 'SSHClient'
>>>> os.chdir("c:\\Python27")
>
>
>
>
>Which directory should I use?
>
>
>
>2012/12/27 Alan Gauld <alan.ga...@btinternet.com>
>
>On 27/12/12 09:36, Ufuk Eskici wrote:
>>
>>
>>I've installed Paramiko on my PC with Python 2.7.
>>>
>>>My code is:
>>>import paramiko
>>>import os
>>>ssh = paramiko.SSHClient()
>>>ssh.connect('10.10.10.10', username='ufuk', password='ufuk')
>>>
>>>
>>>Traceback (most recent call last):
>>>   File "C:/Users/eufuesk/Desktop/paramiko.py", line 1, in <module>
>>>     import paramiko
>>>   File "C:/Users/eufuesk/Desktop\paramiko.py", line 4, in <module>
>>>     ssh = paramiko.SSHClient()
>>>AttributeError: 'module' object has no attribute 'SSHClient'
>>> >>>
>>>
>>Did paramiko install properly?
>>Can you access anything in the module?
>>
>>What happens if you do
>>
>>>>> import paramiko
>>>>> dir(paramiko)
>>
>>or
>>
>>>>> help(paramiko)
>>
>>If those didn't work it suggests the install didn't work properly.
>>If they do work then I don't know what's wrong.
>>
>>
>>-- 
>>Alan G
>>Author of the Learn to Program web site
>>http://www.alan-g.me.uk/
>>
>>_______________________________________________
>>Tutor maillist  -  Tutor@python.org
>>To unsubscribe or change subscription options:
>>http://mail.python.org/mailman/listinfo/tutor
>>
>
>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to