comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Need advice on building a project
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Need advice on building a project [message #40027 is a reply to message #33270] Sun, 04 July 2004 01:59 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Fri, 02 Jul 2004 22:26:00 -0700, David Fanning wrote:

> Robbie Barnet writes:
>
>> I didn't realise that IDL searched subdirectories, I was *told* that it
>> didn't do that. I'll have to look into what versions of IDL support
>> this.
>
> My first experience with IDL was with IDL 1.0, and I'm pretty sure
> *that* one searched sub-directories. :-)
>
>> Even though, I still have problems with stupid code which doesn't keep
>> the filename and procedure name the same.
>
> People who write code like this should be taken out back and shot.
> (Apologies to many of my friends.)
>
>> I'm also conerned with
>> accidently having two files with the same name in a different
>> directory. Imagine two indepenant applications in your idl directory
>> which use different versions of the same file. The only way around this
>> is to move applications in and out of your idl directory.
>
> Well, another way around this, frequently employed, as I understand it,
> is to rename one of the files. :-)

I've lately resorted to a little program that runs at startup and
looks for a file "IDL_IGNORE" in any of the directories on the search
path, and then prunes those from the path. This is very useful when
you want to quickly eliminate a file from consideration.

------------------------

pro prune_idl_ignore,RECURSIVE=rcrsv,VERBOSE=vb
dirs=strsplit(!PATH,path_sep(/SEARCH_PATH),/EXTRACT)
ps=path_sep()
sweep=file_test(dirs+ps+'IDL_IGNORE',/REGULAR)
good=where(sweep eq 0,ngood)
if ngood eq 0 then return
if keyword_set(rcrsv) then begin
for i=0,ngood-1 do begin
root=dirs[good[i]]
repeat begin
pos=strpos(root,ps,/REVERSE_SEARCH)
if pos ne -1 then root=strmid(root,0,pos)
endrep until pos eq -1 || file_test(root+ps+'IDL_IGNORE',/REGULAR)
if pos ne -1 then sweep[good[i]]=1
endfor
endif
good=where(sweep eq 0,ngood)
if keyword_set(vb) then begin
bad=where(sweep,nbad)
print,'Pruning ',strtrim(nbad,2),' !PATH dirs:'
if nbad gt 0 then print,' '+transpose(dirs[bad])
endif
if ngood eq 0 then return
!PATH=strjoin(dirs[good],path_sep(/SEARCH_PATH))
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: minimum intensity projection
Next Topic: Re: Lambert Projection to Lat Lon

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 04:52:20 PST 2025

Total time taken to generate the page: 0.32106 seconds