Menu

gdl_startup path subdirectories

Help
labastro
2016-11-14
2016-11-15
  • labastro

    labastro - 2016-11-14

    I am trying to get a fairly large library of IDL procedures to load into the GDL_PATH using gdl_startup.pro
    Like this:

    folderName='+~/codes/libraryName/'
    !PATH = !PATH + pathsep + Expand_Path(folderName)
    

    Unfortunately the subdirectories in 'libraryName' do not appear to have loaded into the PATH when I "print, !PATH" from GDL. This doesn't seem to be a syntax error since the same startup script and commands work for and load other directories/libraries perfectly fine.
    Any thoughts on what the issue might be?

     
  • Alain C.

    Alain C. - 2016-11-15

    hi

    I am not able to reproduce this bug (assuming pathsep=PATH_SEP())
    on GDL 0.9.6 and current CVS version

    Which version of GDL do you use ? On which OS ?

    print, !GDL
    print, !version

     
  • giloo

    giloo - 2016-11-15

    you need pathsep=PATH_SEP(/search_path) for that to work. ON mac/unix/linux that would be

    !PATH = !PATH + ":" + Expand_Path(folderName)
    
     
  • labastro

    labastro - 2016-11-15

    Apologies for omitting that detail. Yes I do have:

    pathsep = Path_sep(/search_path)

    which is certainly not the issue since I am able to load other libraries just fine with my startup script.

    Here are the versions:

    GDL> print, !GDL
    { 0.9.6 Oct 30 2016  1477807200}
    GDL> print, !version
    { x86_64 unix linux linux 6.5 Oct 30 2016      64      64}
    
     
  • labastro

    labastro - 2016-11-15

    I've just installed CVS, not sure how it is related to GDL.
    Here is the version:
    Concurrent Versions System (CVS) 1.12.13-MirDebian-18 (client/server)

     
  • giloo

    giloo - 2016-11-15

    I can only confirm that

    GDL> f='+~/idl/pro'
    GDL> !PATH = !PATH + path_sep(/search) + Expand_Path(f)
    

    works for me with gdl 0.9.6
    But... if some folders in your ~/codes/libraryName/ are links, GDL may not "see" them.

     
  • Alain C.

    Alain C. - 2017-03-01

    FYI, in the CVS, I created a sub-dir src/pro/utilities
    dans added 3 procedures :
    path_add, path_show, path_remove
    to easily add, show and remove paths into !PATH

    Feedback welcome !

    Alain

    PS: yes, the code and options are perfectibles, but I already daily used these procedures
    for regression tests on ATV, libs., ...

     

Log in to post a comment.