[Tutor] how to control putty window
ALAN GAULD
alan.gauld at btinternet.com
Thu Dec 27 18:09:50 CET 2012
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 <ufukeskici at gmail.com>
>To: Alan Gauld <alan.gauld at btinternet.com>
>Cc: "tutor at python.org" <tutor at 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.gauld at 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 at python.org
>>To unsubscribe or change subscription options:
>>http://mail.python.org/mailman/listinfo/tutor
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121227/7e8bd9d9/attachment.html>
More information about the Tutor
mailing list