On Tuesday, April 6, 2021 at 10:14:19 AM UTC-4 Edward K. Ream wrote:
> On Tue, Apr 6, 2021 at 7:15 AM [email protected] <[email protected]> > wrote: > > 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. > I don't understand it either, but it works as I showed on both Linux and Windows. Sure makes for simple code! These commands have worked this way for a long time (years). A great undocumented feature! You can even copy the path of a selected node to the clipboard, which is sometimes useful: import os, pyperclip pyperclip.copy(os.getcwd()) # works on both Windows and Linux *pyperclip* gives access to the system clipboard. You can install it using pip. -- 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/7b319914-8f3a-4de1-851a-7d7399059e6fn%40googlegroups.com.
