os.remove / windows / spaces?

j2 spamfilter2 at mupp.net
Fri Mar 28 08:26:33 CET 2003

How do i make the below be able to handle paths with spaces in it?

os.remove(pubdir + OldZipFileName)

Right now i get

Traceback (most recent call last):
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Scripts\AntiVirus\NAIUPT.py", line 184, in ?
    os.remove(pubdir + OldZipFileName)
OSError: [Errno 22] Invalid argument: '"u:\\Program\\Network

More information about the Python-list mailing list