Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-02-2017, 09:50 PM
indra indra is offline
Registered User
 
Join Date: Jan 2017
Posts: 7
Running Python Scripts in secureCRT

Hi All,

I've written a small python script (Python 2.7) that imports PyQt. This script seems to be working fine with SecureCRT 6.1.1 but when I try running the same on a different version of SecureCRT like version 6.7.3 and above, the script does not run and returns an error.

I notice that there is a python26.zip file in the VanDyke folder in version 6.7.3. whereas I'm using python 2.7. Can someone please suggest some tips to get this issue resolved.

Thanks!
Reply With Quote
  #2  
Old 01-03-2017, 08:17 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,066
Hi indra,

What is the error you receive?

Python 2.6 was the version of Python included with SecureCRT/Windows until just recently (version 8.0.x).
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 01-03-2017, 09:54 PM
indra indra is offline
Registered User
 
Join Date: Jan 2017
Posts: 7
Hi,

I get an import error for this line

from PyQt4.QtCore import *

Following another thread on the forum, I placed the PyQt folder inside python26.zip, after which I didn't get any error but the script does not run either.
However, the exact same script runs fine on SecureCRT 6.1.1 after having installed ActivePython 2.7.

Any suggestions on how to get this script running in SecureCRT 6.7.3 or SecureCRT 7.0(which supports Python natively)?

Last edited by indra; 01-03-2017 at 10:05 PM.
Reply With Quote
  #4  
Old 01-04-2017, 01:06 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,066
Hi Indra,

PyQt is not a module that is supported by the embedded Python provided by SecureCRT since v6.6.x.

You should be able to continue using a third-party interpreter in versions of SecureCRT prior to v8.0.x by renaming the python26.dll and python.zip files found in SecureCRT's installation directory.

I have added this thread to the following feature requests in our product enhancement database:
  • Add support for Python GUI API's/modules like wxPython, pygtk and pyqt

  • Ability to use third-party Python interpreter in v8.0.x and later (as you could in earlier versions)
Should a future release of SecureCRT include either feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Requests - Forum Thread #12562" in the subject line or use this form from the support page of our website.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 01-09-2017, 10:39 PM
indra indra is offline
Registered User
 
Join Date: Jan 2017
Posts: 7
Hi Brenda,

I tried renaming the python26.dll and python26.zip files. But SecureCRT fails to launch if I do so.

Any suggestions?

Thanks
Indra
Reply With Quote
  #6  
Old 01-10-2017, 08:32 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,066
Hi Indra,

To clarify, you should rename *those* files, not the files inside the zip archive.

There has been a lot of SecureCRT version numbers thrown around.

What is the specific SecureCRT version installed (#.#.#)?

On what OS?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #7  
Old 01-10-2017, 08:06 PM
indra indra is offline
Registered User
 
Join Date: Jan 2017
Posts: 7
Hi Brenda,

Yes.. I renamed the python26.dll and python26.zip file and not the files inside the zip folder.

I'm using SecureCRT Version 6.1.1 (build 383) on Windows 7 Professional

Regards,
Indra
Reply With Quote
  #8  
Old 01-11-2017, 10:34 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,066
Hi Indra,

SecureCRT's native support for embedded Python did not begin until v6.6.x. So in a new, default installation of SecureCRT v6.1.1, you should not even have those files.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #9  
Old 01-13-2017, 03:32 AM
indra indra is offline
Registered User
 
Join Date: Jan 2017
Posts: 7
Hi Brenda,

Sorry my mistake. It works well with SecureCRT 6.1.1. The issue is with SecureCRT 6.7.3. I renamed the python26.dll and python26.zip files in SecureCRT 6.7.3 installation directory and it fails to launch.

Regards,
Indra
Reply With Quote
  #10  
Old 01-13-2017, 09:57 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 3,066
Hi indra,

Sorry, I should have noted that this will *not* work with ActiveState Python version 2.7 or newer. You would have to be using ActiveState Python 2.6.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #11  
Old 01-24-2017, 08:57 PM
indra indra is offline
Registered User
 
Join Date: Jan 2017
Posts: 7
Hi Brenda,

Is there a work-around to installing ActivePython 2.6? ActivePython 2.6 is not available under the Community Edition and has to be purchased. The Community Edition gives out ActivePython 2.7 for free.

Any suggestions?

Thanks and regards,
Indra
Reply With Quote
  #12  
Old 01-25-2017, 11:23 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 753
We're not aware of any other workarounds.

Anyone in the forum community aware of any workarounds indra could use?

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
support@vandyke.com
http://www.vandyke.com/support
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:48 AM.