Message 1 of 3
Reading text file in python script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Ma'am/Sir,
Good day,
I'm trying to read a string value inside a text file using open() and read() function in my python script, but unfortunately when I'm testing my script using "testacpscript" I'm having the "Geometry can not generate with the given parameter" error, I'm assuming that the open() and read() function does not work on custom python script, but when I try the functions and read a text file on python IDLE, it runs and I can get the value from the text file. I really wonder why.
sample code:
structs = open('structureSize.txt','r')
print(structs.read())
this code runs in python shell, but when used on custom python script for plant 3D error occurs.
hope anyone can give me some information, thank you.