Excellent!  And if Leo were to export, say, LEODIR, which would be the *leo* 
directory, then there would not be a need for {leoDir} since one could 
write something like 

@file $LEODIR/themes/vr3/rst-dark.css

I like it.

On Saturday, April 8, 2023 at 5:53:36 PM UTC-4 Edward K. Ream wrote:

> On Sat, Apr 8, 2023 at 1:50 PM Thomas Passin <tbp1...@gmail.com> wrote:
>
> 1. I don't see any need to use the expression "{{~}}". Just using "~" 
>> works now.
>>
>
> Thomas, you have just opened my eyes. Python should do all the work!
>
> - os.path.expandvars 
> <https://docs.python.org/3/library/os.path.html#os.path.expandvars> 
> substitutes environment variables!
> - os.path.expanduser 
> <https://docs.python.org/3/library/os.path.html#os.path.expanduser> 
> handles per-platform resolution of `~`.
> See the links above for details.
>
> As before, any path can be relative to the outline. Just "finalize" the 
> resulting path using:
>
> os.path.normpath(os.path.join(os.path.dirname(c.fileName()), path))
>
> *Summary*
>
> c.expand_path_expression should let os.path do all the work. No more 
> security woes.
>
> There is no need for path expressions! Bye-bye {{ and }}. No more 
> Leo-only conventions.
>
> c.expand_path_expression will collapse.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/19a7d837-d1f8-4c3f-80a8-76343e6b3b71n%40googlegroups.com.

Reply via email to