OS.remove and threads

rodmc userprogoogle-139 at yahoo.co.uk
Thu Mar 20 17:21:28 CET 2008


I am writing a small application which uploads files in a thread via
an ftp connection. However anytime I use the os.remove(filename)
command to delete files the thread crashes, even if the file being
removed has nothing to do with the one being uploaded. Are the OS
commands incompatible with threads? By crashing I mean the thread
stops uploading and an exception is produced. Also if the OS commands
are in any other thread, they cause that thread to crash. I have tried
using locks around the os.remove command but that also makes no

I am using: Mac OS 10.4.9 and Python 2.4.3 with Psyco.

Kind regards,


More information about the Python-list mailing list