On Sun, Sep 21, 2008 at 4:11 PM, Edward K. Ream <[EMAIL PROTECTED]> wrote:

> In short, as of this moment, it appears that '~' should be handled
> uniformly and properly in all file names.  Please let me know if you
> find problems.

The success of g.os_path_finalize_path/_join suggests that now might
be a good time to support general python expressions in file names.
My present thinking:

1. Delimit such expression by {{exp}}  For example:

    @thin {{something}}/spam.py

I wonder, however, whether there are any practical uses for this
feature.  Can anyone provide such an example that is not equivalent to
an ordinary path expression like

    @thin ./../test/test.leo

Important: at present, or very shortly, the following conventions will
apply throughout Leo:

    ! denotes g.app.loadDir, that is, leo/core
    . denotes c.openDirectory, the directory containing the .leo file for c.
    ~ denotes the users home directory.

So the question is, is there any other place that a) would be useful
and b) could be reasonably denoted by {{something}} If not, I shall
not implement this feature.

2. Assuming that somebody can provide an example where {{something}}
actually would be useful, the question is, in what environment should
{{something}} be executed.  My first thought, is an environment in
which sys, os, c, g, and p have their normal meanings.  In other
words, I am thinking that 'something' is an expression, not a list of
statements, so that imports are not available.

3. I'll change g.os_path finalize to c.path_finalize and similarly for
g.os_path_finalize_join.  This will make c available to these methods.
 It remains to be seen whether c is available in all places where
g.os_path_finalize is presently called, but that's most a nit.

Any comments?

Edward

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to