Python netmiko
Hi
I'm trying to import netmiko module to secure crt 8.0.4 python 2,7 installation but I can't get it to work. Can anyone explain how to do it with secure crt I have no problem running netmiko in my normal python 2.7 installation but I want to use the the one that is built. |
SecureCRT's built-in python interpreter is a somewhat of a bare-bones python environment and does not support importing all possible modules that could exist.
My guess is the netmiko module you're trying to import depends on another module that is not part of SecureCRT's bare-bones python environment. What does "can't get it to work" specifically look like for you? For example, what specific error(s) are you seeing when your code attempts to import netmiko? --Jake |
When you install Netmiko in a "stand alone" python installation, you do it with "python setup.py install" where setup.py is netmikos setup file.
I can't find a way of doing this with secure crt ( and maybe you can't do it thaty way) I have tried to copy the modules that I need but I can't get it to work even though I have modified the sys.path to point to the correct module. Is there a way of having secure crt to call an external python installation instead of using the one built in? |
Quote:
Quote:
However, as of SecureCRT version 8.0.2 and later, this is not possible because a change was made in SecureCRT to only load its own built-in python engine. I've added a feature request on your behalf to allow SecureCRT to load/use an external python installation. Should this ever be possible in the future, we'll be sure to post here and let you know. --Jake |
Other modules available
I'm attempting to script a callout to return OUI manufacturer info (this is in a Windows installation). The example script for GoogleSelectedText does work and launches a browser window with the answer using the webrowser module. I'd like to keep it all within SecureCRT though, and tried using urllib.request, but get the error "The specified module could not be found.".
As a new and exploring python script writer here, I was wondering if there is an available list of the modules included in the bare-bones python included in SecureCRT. Also, any recommendation for making a similar call within the available library? Thanks, Kevin |
Hi Kevin,
If you open (for viewing) the vpython27.zip file included in SecureCRT's installation directory, you will see the included modules. However, there won't likely be any modules/libraries that will provide network/TCP access; those are generally not available in the minimal Python environment that comes with SecureCRT. In addition, there may be libraries that are included with SecureCRT's Python environment that won't work because the _socket module is not present. (Support for that is a feature request and I've added this thread to that.) |
Thanks Brenda for the quick response. I'll check that out and stick with the webbrowser call for now, it gets me the info I'm looking for.:)
|
reference to external python installation
Hi,
Has this issue been resolved? I would like to know if there is a way to import/refer to external python modules? Thanks, Rich |
Hi Rich,
What module(s) do you want supported? |
Hi all,
I wanted to let you know the __socket (and other) modules should be available as of SecureCRT v9.0, currently in beta 1 release, since this support was added: Changes in SecureCRT 9.0 (Beta 1) -- September 24, 2020 ------------------------------------------------------- New Features:
Note that this is Windows only support at this time. In fact, we released beta 1 installers *only* for Windows. We hope to include all platforms in later releases. |
All times are GMT -6. The time now is 10:02 PM. |