uplevel #0 source <filename with spaces>



What's the right way to handle this:

uplevel #0 source [file join $dir file.tcl]

if $dir may contain spaces? I've tried all sorts of
ways to quote the filename to protect it, nothing seems
to work. The only solution I've come up with is regsub:

uplevel #0 source [regsub -all " " \
[file join $dir file.tcl] "\\ "]

but there's got to be a better way. Is there?

Thanks,

Phil
--
Phil Mercurio
mercurio@xxxxxxxxx

http://www.thyrd.org/mercurio
.



Relevant Pages

  • Re: Launching command line compiler
    ... I have tried adding double quote and all sorts of things but it still fails. ... It is mad! ...
    (microsoft.public.dotnet.general)
  • Re: counterreaction?
    ... I generally do ask people if I may quote them. ... I've been asked a few times, but Googling turns up quotes from me in all sorts ... "You got Schadenfreude on my Weltanschauung!" ...
    (alt.usage.english)
  • Cannabis Addicts Self Help
    ... There are many books (self help), dedicated to helping people uplevel ... quote ... ...
    (misc.health.alternative)
  • Re: Table Quandry
    ... you can do all sorts of things with Queries; they're pretty versatile. ... Please feel free to quote anything I say here. ...
    (microsoft.public.access.gettingstarted)
  • Re: uplevel #0 source
    ... I was wasting my time trying to protect it ... didn't think that uplevel would take a list. ... Kaitzschu wrote: ... uplevel #0 source [file join $dir file.tcl] ...
    (comp.lang.tcl)