DirectoryChooser and the path separator

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DirectoryChooser and the path separator

Aryeh Weiss
I have the following that runs on a Windows 7 - 64 bit OS

inputDirPath = DirectoryChooser("choose a directory").getDirectory()
print inputDirPath

and the output of this is:

C:\User\Desktop\New folder/

Notice that the path separators are Windows-like ("\") except for the
rightmost character ("/").

I can strip that character and work around this, but is it a bug, or is
there an option that I need to set?

Tnx in advance
--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: DirectoryChooser and the path separator

Wayne Rasband-2
> On Sep 12, 2018, at 4:21 AM, Aryeh Weiss <[hidden email]> wrote:
>
> I have the following that runs on a Windows 7 - 64 bit OS
>
> inputDirPath = DirectoryChooser("choose a directory").getDirectory()
> print inputDirPath
>
> and the output of this is:
>
> C:\User\Desktop\New folder/

This should not be a problem since both “/“ and “\” are accepted in Windows file paths.

-wayne


> Notice that the path separators are Windows-like ("\") except for the rightmost character ("/").
>
> I can strip that character and work around this, but is it a bug, or is there an option that I need to set?
>
> Tnx in advance
> --aryeh

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html