I guess the core problem is that the python code (eg *execfile*) and spyce
code (eg *include.spyce*) seem to use two different working directories. If
these could be sync'ed, it would feel smoother. Obviously, this would break
too much other code to consider... ah well :)
On Dec 11, 2007 3:11 PM, Jonathan Ellis <jonathan@...> wrote:
> For most use cases it's more convenient to treat the path as a "path"
> the way the browser would interpret it. That's the only reason it works
> the way it does. If I were to revisit this for spyce 2.2 I would
> probably do it the way you suggest and just have the user use
> util.url2file if they want the docroot-relative path, but in earlier
> versions it's enough extra verbosity to import spyceUtil and do that
> that it wasn't worth it.
> On Tue, 11 Dec 2007 14:44:25 -0500, "Jason Persampieri"
> <spyce-discussion@...> said:
> > Howdy folks. Spyce newbie here.
> > I have noticed an oddity in the *include.spyce* behavior.
> > If the argument is a relative path - *include.spyce('../include.spy')* -
> > everything works fine.
> > But if I pass an absolute path -
> > *include.spyce('/cluster/home/user/public_html/share/include.spy')
> > *- it looks like spyce prepends the spyce home directory (which in this
> > case
> > is the same as the http home) on to the path - * spyceNotFound:
> > spyceNotFound exception: could not find
> > "/common/www/html/cluster/home/user/public_html/share/include.spy"
> > *While the absolute path behavior seems consistent with the
> > documentation,
> > this is incredibly odd. If I specify an absolute path, shouldn't it
> > assume
> > I'm pointing to exactly what I want?
> > this whole thing is especially annoying since I need to *execfile *a
> > file
> > in the same directory (which *only* takes absolute paths seemingly) and
> > hence need to keep both a relative and absolute path reference. Piddly
> > to
> > be sure, but annoying.
> > That said, Spyce is really rocking my world, and is *exactly* the right
> > solution for my project.
> > Jason Persampieri
> > Programmer
> > Boston College Bioinformatics Dept.