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 03-21-2020, 03:09 PM
hmperccami hmperccami is offline
Registered User
 
Join Date: Mar 2020
Posts: 1
Post fucntion open() error

I'm trying to run a python script in SecureCRT. The app throws an IOError message error related to the following line:

fp = open(filename, "wb+")

Do you know some error case related to that function?

If you need more information, please, ask me.

Thanks for your time.
Reply With Quote
  #2  
Old 03-22-2020, 01:17 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,309
Hi hmperccami,

Is filename an actual, valid path to a file?

Please post the exact error you are getting.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 03-23-2020, 01:05 PM
caclp@qq.com caclp@qq.com is offline
Registered User
 
Join Date: Mar 2020
Posts: 5
hi,

I just finish this script tonight, no problem

===============================================
result_file = r'f:\AXE10\Script\SecureCRT\fingerprint.txt'

with open(result_file, 'a+') as f:
f.write('test test' + '\n')

===================================================
Reply With Quote
Reply

Tags
io error , open , python


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 09:12 AM.