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 07-21-2016, 12:47 PM
Hang Hang is offline
Registered User
 
Join Date: Jul 2016
Posts: 21
smtplib for Python 3.x

Hi,

I was just wondering if the VanDyke is compatible the smtplib library in 3.x? Or is it still only compatible with 2.6.x.

Thanks,
Reply With Quote
  #2  
Old 07-21-2016, 04:02 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,474
Hi Hang,

The current version of Python included in a SecureCRT (8.0.x) for Windows installation is 2.7. It sounds like you would like support for Python 3.x.

I have added this thread to a feature request in our product enhancement database to add support for Python 3.x. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #12410" 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
  #3  
Old 07-21-2016, 04:31 PM
Hang Hang is offline
Registered User
 
Join Date: Jul 2016
Posts: 21
Thanks Brenda,

I will be able to use smtplib and getpass and others library in SecureCRT if I switch over to 2.7.x?

Cheers,
Reply With Quote
  #4  
Old 07-21-2016, 04:58 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,474
Hi Hang,

On Windows, smtplib might not, if it requires _socket Python module.

I have added this thread to a feature request in our product enhancement database to add native support for _socket Python module on Windows. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #12410" 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 07-22-2016, 08:35 AM
Hang Hang is offline
Registered User
 
Join Date: Jul 2016
Posts: 21
Hi Brenda,

Everytime I try running this code with Python 2.7.x it crashes SecureCRT.

This is the code:
import smtplib
import getpass

def main():

user = "email@email.com"
passuser = "password"
email = "email@email.com"
server = smtplib.SMTP('my_server', 25)
server.ehlo()
server.starttls()
server.login(user, passuser)

msg = "Success"
server.sendmail(email, email, msg)
server.quit()


main()

This is the error message I get before SecureCRT crashes.

Reply With Quote
  #6  
Old 07-22-2016, 08:39 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,474
Hi Hang,

I am sorry to hear of the issue that's occurred. We cannot troubleshoot crashes via the forum, so please send an email to support@vandyke.com and include "Forum Thread #12410" in the subject line or use this form from the support page of our website.

If the email address you include is *not* the one associated with your Vandyke Software download account, please include the email address that is in the body of your message. We use the download account mechanism to receive crash dump files.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #7  
Old 09-29-2020, 12:13 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,474
Hi all,

I wanted to let you know the __socket module 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:

  • Windows: Added support for Python 3. Python 3.8(available at python.org) must be installed and the script's first line must be: # $language = "python3". Since support for Python 3 is provided through an external module, Python 3 libraries can be used in SecureCRT scripts.

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.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
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 06:25 AM.