January 29, 2020 at 12:00 am
Comments posted to this topic are about the item Read Only Files
January 29, 2020 at 6:02 am
Now that is interesting, thanks Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
January 29, 2020 at 8:42 am
If 'rt' is right, can't 'rb' be right as well?
January 29, 2020 at 8:50 am
If 'rt' is right, can't 'rb' be right as well?
The question asks for text mode, rb will open the file in binary mode.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
January 29, 2020 at 8:52 am
... agh, yes. Read QOTD too quickly today. Oops.
January 29, 2020 at 10:09 am
The documentation doesn't mention 'rt' at all, only 'r' and 'rb': https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files
January 29, 2020 at 12:18 pm
Wild stab in the dark for the win!
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 29, 2020 at 12:22 pm
The documentation doesn't mention 'rt' at all, only 'r' and 'rb': https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files%5B/quote%5D
Did some research, 't', text, is the default, so you don't HAVE to have it. But, on systems that differentiate, or where you want to be precise (just in case), it's an optional add. Regardless, seems to be the only possible right answer.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 29, 2020 at 3:49 pm
Ref. in the QotD explanation refers to the documentation for Built-in Functions and the open() function not to Input and Output. In the documentation for Built-in Functions, the use of mode characters in the open() function is well explained.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply