popen problem with spaces in directory-ARRGHHHH!
sholden at holdenweb.com
Mon Jul 23 21:24:03 CEST 2001
You might want to take a look at the win32/Scripts/VersionStamp directory
for some ideas about interacting with Visual SourceSafe.
"Steve Canfield" <stevecanfield at my-deja.com> wrote in message
news:603e1b49.0107200443.d32524f at posting.google.com...
> Okay. I'm a little frustrated.
> Earlier, I wrote in message
news:<603e1b49.0107191344.42808306 at posting.google.com>...
> > 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.
> Since I first posted this I have tried a few more things. The FAQ
> mentions bugs in popen and suggests win32pipe.popen. I tried it and
> it seems to behave exactly like os.popen.
> One thing that didn't work (and I don't want to have to do this) is
> using the short (8.3) version of the directory names:
> >>> import os
> >>> os.popen(r'e:\visual~1\ss.exe status "$/My Project"').readlines()
> ['$/My Project:\n', 'file1.cpp Steve etc...
> Is this a bug in os.popen, win32pipe.popen, or (more likely) am I
> missing something really obvious here?
> Please help! I really don't want to have to be restricted to short
> file names.
More information about the Python-list