IOError: (0,"Error") when closing "os.popen"ed file?
Adrian Eyre
a.eyre at optichrome.com
Mon Jan 31 08:45:15 EST 2000
More information about the Python-list mailing list
Mon Jan 31 08:45:15 EST 2000
- Previous message (by thread): IOError: (0,"Error") when closing "os.popen"ed file?
- Next message (by thread): IOError: (0,"Error") when closing "os.popen"ed file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> After hacking for a while, I managed to work around the problem by > doing: > > time.sleep(0.1) > f.close() > > But this is highly unsatisfactory..... Is there anyone that can give me > a better suggestion? I expect the OS hasn't finished with the file before it receives the close(). Try replacing "time.sleep(0.1)" with "f.flush()". IIRC flush() blocks untils the file operation has completed. -------------------------------------------- Adrian Eyre <a.eyre at optichrome.com> http://www.optichrome.com
- Previous message (by thread): IOError: (0,"Error") when closing "os.popen"ed file?
- Next message (by thread): IOError: (0,"Error") when closing "os.popen"ed file?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list