Re: [python-win32] I/O error

2010-03-23 Thread Tim Golden
On 22/03/2010 21:22, travel europe wrote: I am getting the following error "ValueError: I/O operation on closed file" when running a module to pull data from the Windows registry. import csv from winsys import registry key = r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uni

Re: [python-win32] I/O error

2010-03-22 Thread Preston Landers
Your indentation is a bit hard to read in this format, but it looks like the "for subkey in uninstall" block needs to be inside the "with open" block. When the "with open" block exits, the file is no longer open. Thus writing to a closed file will fail. On Mon, Mar 22, 2010 at 4:22 PM, travel eu

[python-win32] I/O error

2010-03-22 Thread travel europe
Hello, I am getting the following error "ValueError: I/O operation on closed file" when running a module to pull data from the Windows registry. The code is as follows: import csv from winsys import registry key = r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\U