On Tuesday, April 6, 2021 at 9:51:34 PM UTC-5 tbp1...@gmail.com wrote: > Maybe this is beating the a dead horse, but os.getcwd() returns the > actual directory of the selected node - verified by test. It is as if when > a node is selected, Leo changes the current directory to the path for that > node. That would explain why "." works as well. >
Here is my latest suggestion, incorporating your suggestions. It's only advantage, apparently, is that it is more explicit: import os from subprocess import run path = os.path.normpath(g.fullPath(c, p) or os.getcwd()) cmd = ['explorer.exe', path] run(cmd) Tested only on Windows. The call to normpath should allow it to work everywhere. 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/9a6191a0-69bb-4f4c-ab5d-dbc4cd64a71en%40googlegroups.com.