Nov-09-2016, 03:38 PM
I'm sorry, I posted the code that I had got to, as I assumed that putting readall() where read() was would just get replies to use read() as the readall() command simply did not work. The research i had done on the matter had led me to understand that readall() was never a command in python, as I have not found it in any of the python docs online, and that it worked as part of a package, which as someone trying to learn is very difficult to navigate.
The original code that I am learning from uses readall() so it must have worked at some time, and the only difference I could find was that the tutorials were on Windows and using Python 3.4 and I am using Linux Mint and python 3.5.2. I understand that python is supposed to be completely cross platform, so I had dismissed the Windows/Linux option and I found one forum post on Stack Exchange that pointed out that readall() worked upto python 3.4, but not after that, however it was only the one place amongst about 5 pages of google search.
For clarity, I am learning and working exclusively with python 3 currently, I am aware of some of the differences and have read the differences page, but until I am a better programmer, I think trying to learn both of them would be confusing so I am learning python 3 as I am only writing scripts that are standalone at the current time.
I have since had to reinstall OS (Raspberry pi so no big deal) and wrote the script again and it worked. I am suspecting there may have been a typo or something that I could not spot, shame I never got to the bottom of it, but for the moment the issue seems to be resolved.
The original code that I am learning from uses readall() so it must have worked at some time, and the only difference I could find was that the tutorials were on Windows and using Python 3.4 and I am using Linux Mint and python 3.5.2. I understand that python is supposed to be completely cross platform, so I had dismissed the Windows/Linux option and I found one forum post on Stack Exchange that pointed out that readall() worked upto python 3.4, but not after that, however it was only the one place amongst about 5 pages of google search.
For clarity, I am learning and working exclusively with python 3 currently, I am aware of some of the differences and have read the differences page, but until I am a better programmer, I think trying to learn both of them would be confusing so I am learning python 3 as I am only writing scripts that are standalone at the current time.
I have since had to reinstall OS (Raspberry pi so no big deal) and wrote the script again and it worked. I am suspecting there may have been a typo or something that I could not spot, shame I never got to the bottom of it, but for the moment the issue seems to be resolved.