Jun-11-2019, 05:40 AM
Thanks for the reply and time.
I had just fixed an issue with PIP, Commodo was hanging it. That should be fixed now.
I had just tried "with" - no help - but did it a bit different than you.
Per your comment - I removed the whole shebang.
So I copied your code. Your code works just like mine - meaning it will write and close the files - but only when run in IDLE.
To be clearer (I hope), there are four ways (possibly more) to start a script in Windows. 1) In IDLE. 2) Double click - which opens the CMD window and runs it. 3)In the CMD as a type of executable (i.e. C:\proper\path>file.py) or 4)C:\proper\path>py file.py, and likely some other way to pass it to the CMD window py prompt. All of these ways will run code that ask for input and has calculations or text output. However, only in IDLE (IDE) can I seem to get files to close.
It's late here though and I am tired - so I will try again tomorrow. I know I have done this before in 2.x - I probably misconfigured something when I had the pip problem. Or - maybe COmmodo is stopping the file closes?
Thank you again.
I had just fixed an issue with PIP, Commodo was hanging it. That should be fixed now.
I had just tried "with" - no help - but did it a bit different than you.
Per your comment - I removed the whole shebang.
So I copied your code. Your code works just like mine - meaning it will write and close the files - but only when run in IDLE.
To be clearer (I hope), there are four ways (possibly more) to start a script in Windows. 1) In IDLE. 2) Double click - which opens the CMD window and runs it. 3)In the CMD as a type of executable (i.e. C:\proper\path>file.py) or 4)C:\proper\path>py file.py, and likely some other way to pass it to the CMD window py prompt. All of these ways will run code that ask for input and has calculations or text output. However, only in IDLE (IDE) can I seem to get files to close.
It's late here though and I am tired - so I will try again tomorrow. I know I have done this before in 2.x - I probably misconfigured something when I had the pip problem. Or - maybe COmmodo is stopping the file closes?
Thank you again.