I believe '.' is interpreted in the context of the OS -- which on both
Linux and Windows evaluates to the same as the current working directory.

I am unsure how or why the 'run(cmd)' portion is executed in the context of
the current node's path, but if it is, '.' should expand at the OS level to
the full current path.

On Tue, Apr 6, 2021 at 10:14 AM Edward K. Ream <[email protected]> wrote:

> On Tue, Apr 6, 2021 at 7:15 AM [email protected] <[email protected]>
> wrote:
>
> Here's what I have been doing to create files in directory trees.  It
>> seems much simpler.
>>
>
> Thanks for this tip.  I don't create many directories myself, and so I
> just create the directories first in the file manager.
>
> BTW, I have put a button into MyLeoSettings.leo that will open a file
>> manager window (File Explorer on Windows) at the current directory of the
>> selected node, whatever it is.  This has been awfully handy.
>>
>
> Great idea.  However, I don't understand how '.' gets bound to the
> directory of the selected node. Here is tested code for Windows that works
> as I expect.
>
> import os
> from subprocess import run
> path = g.fullPath(c, p) or os.path.abspath('.')
> cmd = ['explorer.exe', '.']
> run(cmd)
>
> What am I missing?
>
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS11Vw%3DbB95eyQhXp%2B1FfFAQVxC1zhxH75CfjPzp-4YqGw%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS11Vw%3DbB95eyQhXp%2B1FfFAQVxC1zhxH75CfjPzp-4YqGw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAJ1i%2BSZ8NK-4iDszU9Nuf%2BKze6MbPBM5fwo7Q4saCWgJ-jvKhA%40mail.gmail.com.

Reply via email to