Dick Moores | 17 Jul 02:06

Difficulty in setting editor to TextPad

In my ipy_user_conf.py I have put this line:
ipy_editors.install_editor("C:\Program Files\TextPad 5\TextPad.exe 5")

I use -debug, and this is what it tells me:
'editor': '"C:\\Program Files\\TextPad 5\\textpad.exe"',

but

In [3]: ed versions.py
Editing... > C:\Program Files\TextPad 5\TextPad.exe 5
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
done. Executing edited code...
[snip]

It seems obvious that there still is a problem with the spaces in the
path, but I don't know what to do about them.
Help, please.

Dick Moores
Fernando Perez | 17 Jul 02:14

Re: Difficulty in setting editor to TextPad

On Wed, Jul 16, 2008 at 5:09 PM, Dick Moores <rdmoores <at> gmail.com> wrote:

> It seems obvious that there still is a problem with the spaces in the
> path, but I don't know what to do about them.

One of our windows  experts will come to the rescue soon, I'm sure.
But this is something that should work out of the box the way you
wrote it, so I'm inclined to call it our bug (even if there's a way
for you to work around it).  Spaces in paths are common enough under
win32 that our code should handle them gracefully without the user
having to do anything special.

Stay tuned.

Cheers,

f
Ville M. Vainio | 17 Jul 15:48

Re: Difficulty in setting editor to TextPad

On Thu, Jul 17, 2008 at 3:09 AM, Dick Moores <rdmoores <at> gmail.com> wrote:

> It seems obvious that there still is a problem with the spaces in the
> path, but I don't know what to do about them.
> Help, please.

Try quoting the executable name:

ipy_editors.install_editor('"C:\Program Files\TextPad 5\TextPad.exe 5"')

--

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
Ville M. Vainio | 17 Jul 15:54

Re: Difficulty in setting editor to TextPad

On Thu, Jul 17, 2008 at 3:09 AM, Dick Moores <rdmoores <at> gmail.com> wrote:

> In my ipy_user_conf.py I have put this line:
> ipy_editors.install_editor("C:\Program Files\TextPad 5\TextPad.exe 5")
>

Additional note: you need to specify the $file and $line if you really
want %ed to be of any use ;-)

So, the full command would probably be (if textpad works as specified
here: http://www.funduc.com/srexternaleditors.htm)

ipy_editors.install_editor('"C:\Program Files\TextPad 5\TextPad.exe"
${file}(${line})')

--

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'

Gmane