problem with execv command

Diez B. Roggisch deets at nospam.web.de
Fri Aug 29 06:01:05 EDT 2008


dudeja.rajat at gmail.com wrote:

> Hi,
> 
> I'm facing problem with the execv command:
> 
> my command is :
> os.execv(' C:\Program Files\Subversion\bin\svn ', ( 'list', ' \"
> http://subversion.stv.abc.com/svn/Eng \" ' ) )
> 
> The error I'm getting is :
> OSError: [Errno 22] Invalid argument
> 
> 
> I tried using a variable for http path but still I'm getting the same
> error
> 
> Please help.

You need to either escape the backslashes in your path using \\, or use
python raw string literals like this:

r"C:\foo"

or use forward-slashes, which windows accepts as well.

Diez




More information about the Python-list mailing list