Hi,
I was hoping to create an application where the user can open a file from their hard drive (using the askopenfile dialogue from tkFileDialog) and it would display information such as file name / size.
I managed to get everything working correctly except for displaying the information. I tried to copy it to a temporary file and then read the size of the temporary file but this caused "TypeError: must be string or buffer, not file" for which I converted it into a string but it still returns the incorrect value (I am testing it on a file of my own that I know the size of). I am using the os module to display the size of the temporary file after it has had the contents from the askopenfile variable copied into it.
I basically want to know the size of the file using the os.path.getsize function but on the file that is already open
It has been wracking my brain and I am completely perplexed by this.