Working Directory and Pro Path? Startup File?

Help
2013-01-22
2013-06-03
  • Hugh Newman

    Hugh Newman - 2013-01-22

    Hi all,
    I'm coming over from IDL. I used this in my lab, but am now off campus and wish to run my procedures without having to ssh into the campus computers (very slow this way). I installed GDL, and it seems to be working fine, but I get this when I enter the gdl command line

    GDL - GNU Data Language, Version 0.9.2
    - For basic information type HELP,/INFO
    - Default library routine search path used (GDL_PATH/IDL_PATH env. var. not set)
    :
       +/usr/share/gnudatalanguage/lib
    - Please report bugs, feature or help requests and patches at:
    .....
    

    My issue is this I believe

    - Default library routine search path used (GDL_PATH/IDL_PATH env. var. not set)
    

    Basically I have all of my custom procedures and data on an external hard drive, and I wish to use them. All the built in procedures work, but it can't seem to find my own procedures even if I run GDL from within that directory.

    I've created a file ~/.gdl_startup and put

    export GDL_STARTUP=~/.gdl_startup
    

    in my .bashrc

    and put

    !PATH=!PATH + ':/media/the long directory I want...'
    !DIR='/media/the long directory I want..'
    print, '%**Personal settings are loaded and active **%';
    

    Now when I enter GDL command line it prints that message at the bottom, but still gives me the original "Default library routine.." message and still can't find my help. Tried everything I could find online, but can't seem to figure this out.

    To sum up: I need to be able to run my custom .pro files, but GDL cannot find them, and I need to work out of a custom directory. HELP!

    Thanks
    H

     
  • Sylwester Arabas

    Hi,

    Try setting the GDL_PATH env. var, e.g. (using bash):

    $ export GDL_PATH=aqq:`gdl -quiet -e 'print, !PATH'`

    $ mkdir aqq

    $ echo -e "blabla" > aqq/bqq.pro

    $ gdl -quiet -e bqq
    % Lexer/Parser syntax error: expecting "end", found ''
      At: aqq/bqq.pro, Line 2  Column 1
    % Procedure not found: BQQ
    % Execution halted at: $MAIN$   

    HTH,
    Sylwester     

     
  • Hugh Newman

    Hugh Newman - 2013-01-22

    Thanks for the help, but a couple of questions:
    So this is something I will have to run in bash every time I restart my computer?

    also, I asume "blabla" is something I have to replace. Should this be my working directory? Also what is aqq, and bqq.pro?

    Thanks
    H

     
  • Sylwester Arabas

    Hi,

    $ export GDL_PATH=aqq:`gdl -quiet -e 'print, !PATH'`

    is all you need to do to add an example "aqq" directory to the GDL's search path.

    This can be done:
    - by issuing the above bash command before running GDL or
    - by putting it to a .bashrc file or
    - by running GDL with the GDL_PATH environmental variable set for just one process, that is by issuing:
    $ GDL_PATH=aqq:`gdl -quiet -e 'print, !PATH'` gdl

    The "aqq" in all above examples stands for "/media/the long directory I want.." in your example.

    HTH,
    Sylwester

     
  • Hugh Newman

    Hugh Newman - 2013-01-23

    That seems to have worked!

    Thanks!

    I just ran it the single time from bash command. I will try putting it in the bashrc file to see if it keeps up.

     
  • Hugh Newman

    Hugh Newman - 2013-01-23

    Might have actually spoke too soon. Seems it only finds my .pro files if I actually run GDL from that exact directory… which is better than not finding them at all. However, I have a lot of data, and as such I have it segregated into folders, and a seperate folder for my procedures.

    Anyway to be able to run gdl from any directory and still have it find the directory with the procedures?

    Thanks

     
  • Sylwester Arabas

    Hi,

    I've put the "blabla" example above to show that it apparently works with the "bqq.pro" file being placed in the "aqq" directory, while gdl is run from outside of it. Please post here the commands you use so the problem can be reproduced.

    Some hints:
    - the path you add to the list has to be an abosolute path (i.e. beginning with /) in order for gdl to be able to use it from anywhere,
    - you can add a "+" sign before any path to treat it recursively.

    HTH,
    Sylwester

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks