popen problem with spaces in directory

Steve Canfield stevecanfield at my-deja.com
Thu Jul 19 17:44:12 EDT 2001


I am trying to automate some SourceSafe stuff under Windows 2000 and I
am running into some problems with os.popen.

If I open up a command prompt and type in the following:
C:\>"e:\visual studio\ss.exe" status "$/My Project"
I get back a bunch of text showing which files are checked out.

If I open a Python interpreter and type:
>>> import os
>>> os.popen(r'"e:\visual studio\ss.exe" status "$/My
Project"').readlines()
[]
I get an empty list.

Any ideas why?

After a little experimenting, I found that:
>>> os.popen(r'"e:\visual studio\ss.exe" status').readlines()
and
C:\>"e:\visual studio\ss.exe" status
return the same text.  So it has something to do with second quote
enclosed parameter: "$/My Project"

Please help!

Thanks,
steve



More information about the Python-list mailing list