os.spawnl error

Larry Bates larry.bates at websafe.com
Thu Nov 17 15:05:53 EST 2005


The backslashes in your path are being interpreted
as escape characters (e.g. \n is a newline).

Try instead:

os.spawnl(os.P_NOWAIT,r'c:\windows\notepad.exe')

or

os.spawnl(os.P_NOWAIT,'c:\\windows\\notepad.exe')

-Larry Bates


Salvatore wrote:
> Hello,
> 
> Does someone already had ths problem ?
> 
> 
>>>>os.spawnl(os.P_NOWAIT,'c:\windows\notepad.exe')
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "C:\Python24\lib\os.py", line 565, in spawnl
>     return spawnv(mode, file, args)
> OSError: [Errno 22] Invalid argument
> 
> Regards
> 
> Salvatore
> 



More information about the Python-list mailing list