Python and .HTA files in IE5
Gordon McMillan
gmcm at hypernet.com
Tue Apr 4 11:53:50 EDT 2000
Richard M. Smith wrote:
[snip]
> I am having trouble executing the following simple Python script
> to read the contents of AUTOEXEC.BAT and output it on
> the .HTA page:
>
> <script language=python>
> myfile = open("c:\\autoexec.bat")
> document.write(str(myfile.readlines()))
> myfile.close()
> </script>
readlines() returns a list of lines, which str() is not going to be
happy about. Try using read().
- Gordon
More information about the Python-list
mailing list