#1
|
|||
|
|||
![]()
Hi all,
I'm using CRT Version 8.7.3 (x64 build 2279), python 3.8.5. I'm facing trouble when trying import other libraries in to CRT, such as: xlwings, openpyxl, .. to interact with excel files. I did try to copy library manually into CRT path: "C:\Program Files\VanDyke Software\Clients" "C:\Program Files\VanDyke Software\Clients\vpython27.zip\site-packages" But it's not work, some error like: module not file, invalid syntax Could CRT team and friends on forum please help me out! Many thanks! Nhan Dinh |
#2
|
|||
|
|||
Hi nhandh09,
It looks like you're trying to customize the built-in Python 2.7 environment that ships with SecureCRT v8.7.3. Sadly, the embedded Python environment in SecureCRT v8.7.3 for Windows is not customizable. You can see this forum thread for further details. If you desire to use Python 3 (and external modules) within SecureCRT for Windows, it is only possible in SecureCRT v9.0, which is currently undergoing beta cycles. This post has information on how to use Python 3 with SecureCRT v9.0 for Windows.
__________________
Thanks, --Cameron VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
![]()
Many thanks for your prompt reply Cameron!
I'm going to stay with my current setup, and stay with python csv build in library on crt. I found this script example on forum https://www.vandyke.com/support/secu...o_excel.py.txt , but it still complicated for me (I'm not pro at python). Could you have some simple script that use csv library? I just need code that read the file (.csv file) and put some infomation back on the file and save it, close it. I did find link for document about csv library, but have IOerror when I ran example code on CRT and I can not solve it https://docs.python.org/2.7/library/csv.html Again, lot of thanks for your help!!! |
#4
|
|||
|
|||
![]()
And is there anyway for CRT 8.7 scripting interact with .xlsx (excel files) team?
![]() Many thanks team! |
#5
|
|||
|
|||
Hi again nhandh09,
We don't provide custom scripting solutions for customers. What we have made available are a number of scripting examples that our customers can use as a starting point in their own scripting solutions. Some of the scripts may work exactly as needed right out of the box, but many of them require tweaking for exact user environments. Additionally, if the example which you shared is too complicated, that's perhaps the most simple .csv-associated script that is available... Here are the scripts from that forum sticky that we have made available that show interactions with .csv files:
If you desire help dealing with the IOError, would you please share your script and the exact error that you're getting? If there's any sensitive data, please send that information in an email to support@vandyke.com with "Attn Cameron: Forum Thread 14393" in the subject line.
__________________
Thanks, --Cameron VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#6
|
|||
|
|||
Thanks Cameron!
I'm thinking about solution that I do a VBS module for read/write .xlsx files. Dose Python 2. included with CRT 8.7 support calling other VBS script? |
#7
|
|||
|
|||
Hello again nhandh09,
Sorry but no, SecureCRT doesn't support calling other VBScripts (or any other scripts). Only one script can be running per tab at any given time in SecureCRT.
__________________
Thanks, --Cameron VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#8
|
|||
|
|||
Quote:
And with Python, we can import external library or ourself module (.py file) on the lines of code/script. That mean we can call another function, on another module, is it right Cameron? |
#9
|
|||
|
|||
Hi nhandh09,
You asked earlier about using a VBS module. This is different from accessing another python module, and it's also different from calling other VBS script, to use your wording. SecureCRT v9.0 with Python 3 in use is capable of utilizing external python modules and libraries. If you're asking about using an external python module that might exist specifically for interfacing with excel spreadsheets, that's something that may be possible, but we have no experience to share in that regard, and such would not be related to VBScript in any sense that I can see.
__________________
Thanks, --Cameron VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#10
|
|||
|
|||
Highly appreciated Cameron, and CRT team for the support. I understood my situation. And we will close the topic right here!
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|