Read a file with open command

Jan Svec honza.svec at gmail.com
Fri Aug 11 05:31:37 EDT 2006


Hi,
simply use file_obj = open ("D:\My documents\File.ods",'rb') for
opening file in binary access mode, which is required for binary files
on MS Windows.
Honza

jean-jeanot wrote:
> I can access to a file with the command:
> file_obj = open ( " D:\My documents\Textfile.txt",'r')
>
> When I now try to read a file with the following command:
>
> file_obj = open ("D:\My documents\File.ods",'r') it doesn't function.
> The extension ods is coming from OpenOffice.org Calc.
> 
> Why ?
> 
> jean-jeanot




More information about the Python-list mailing list