On Mon, Oct 25, 2010 at 9:59 AM, Terry Brown <[email protected]> wrote:
> So, you have a Leo file on a USB flash drive and that Leo file references a > derived file in a Documents directory at the root of that drive. > > In Windows, you can't predict the drive letter under which the USB flash > drive will be mounted, in Unix you can't predict the mount point (Ubuntu > might use /media/disk-N where N varies, for example). > > In Unix, the only solution is a relative (to the current directory) path, i.e. > ../../../Documents/somefile.py. *That would also work in Windows*. Windows > also allows a cleaner and more robust form, \Documents\somefile.py. Cleaner > because you don't have to try and count directory levels, and more robust > because it doesn't break if the directory levels of the .leo file change. > But, it requires some mildly complex code in Leo to support it. OTOH, I > think the code is reasonably isolated. Thanks for this clear explanation. > So, a design decision, include the code, Suppose we do include the code. Can /x/y paths be read on Unix? If not, what is the value of the new code? > or say only .. style paths are cross platform and supported by Leo, and point > people to the Python bug if they use drive relative paths and > MyAccountNumbers.txt gets written to C:\Documents instead of E:\Documents :-} 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.
