# passing arguments with ampersands

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Aug 20 09:59:46 CEST 2007

En Sat, 18 Aug 2007 09:24:35 -0300, SHY <soundplay at gmail.com> escribi�:

> theres no special portion of code, just the one that handles filenames
> with
> spaces.
> the problem is that when i associate a file extension to my application
> and
> i open it, the filename is not quoted before passed as an arguement. i
> dont
> know if its the problem of windows or something, or it was just my fault
> when i incorrectly associated the extension.

How did you associate it?
Usually the registry entries are:

HKCR\.ext = filetype
HKCR\filetype = File Description
HKCR\filetype\shell\open\command = "path\to\your\program" "%1"

(Note the double quotes around %1)

Get it right at the registry, and forget all that trickery joining
sys.argv parts

--
Gabriel Genellina