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

Home » Public Forums » archive » Re: IDL environment
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: IDL environment [message #42105] Thu, 30 December 2004 12:48 Go to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 27 Dec 2004 20:39:39 -0800, judy wrote:

> I am a newbe to IDL and looking for information for setting up the
> environment. I did create the ~/idl_startup.pro file to set the
> graphics to true_color=24, also added a directory to the path. I would
> also like to change the idl prompt from something like,
>
> /home/judy/idl>
>
> and have the prompt update to always display the current working
> directory. I have experimented with the !prompt variable, could
> probably create a alias cd.pro program to update the variable every
> time the directory changes, just thought I would ask this group first.

This type of changing prompt won't work well with IDLWAVE, unless you
carefully set the prompt matching expression to something which
matches all prompt, but does not match other random output.

JD
Re: IDL environment [message #42116 is a reply to message #42105] Wed, 29 December 2004 02:35 Go to previous messageGo to next message
judy is currently offline  judy
Messages: 4
Registered: December 2004
Junior Member
Thanks for the suggestions. Here is what I am current using, need to
format the output from systime(), the prompt is too long this way.

PRO cdd, dir1
cd, dir1
!prompt = systime() + ' ' + dir1 + ' > '
END


Judy


Michael Wallace wrote:
>> PRO PWD
>> CD, Current=thisDir
>> PRINT, thisDir
>> END
>
> Maybe I'm missing something, which I usually do, but wouldn't you
just
> need a single command?
>
> IDL> $pwd
> /the/current/working/directory
>
> I use the shell escape ($) when I need to do something quick with
the
> file system. I use $ls, $pwd and $vi (!!) all the time it seems. Of

> course, this is only useful for ad hoc IDL from the prompt, but that
is
> what the original poster was asking about, no?
>
> -Mike
Re: IDL environment [message #42123 is a reply to message #42116] Tue, 28 December 2004 08:16 Go to previous messageGo to next message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> Well, of course, this saves that extra $ character, which adds
> up over the course of an IDL lifetime. But it also works on
> those annoying Windows machines that some of us use. :-)

Typing the extra character probably adds up quite a bit. I think we can
also save some effort by removing all vowels frm ll th mssgs w snd t ths
nwsgrp. ;-)
Re: IDL environment [message #42124 is a reply to message #42123] Tue, 28 December 2004 08:02 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Wallace writes:

> Maybe I'm missing something, which I usually do, but wouldn't you just
> need a single command?
>
> IDL> $pwd
> /the/current/working/directory
>
> I use the shell escape ($) when I need to do something quick with the
> file system. I use $ls, $pwd and $vi (!!) all the time it seems. Of
> course, this is only useful for ad hoc IDL from the prompt, but that is
> what the original poster was asking about, no?

Well, of course, this saves that extra $ character, which adds
up over the course of an IDL lifetime. But it also works on
those annoying Windows machines that some of us use. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: IDL environment [message #42125 is a reply to message #42124] Tue, 28 December 2004 07:52 Go to previous messageGo to next message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> PRO PWD
> CD, Current=thisDir
> PRINT, thisDir
> END

Maybe I'm missing something, which I usually do, but wouldn't you just
need a single command?

IDL> $pwd
/the/current/working/directory

I use the shell escape ($) when I need to do something quick with the
file system. I use $ls, $pwd and $vi (!!) all the time it seems. Of
course, this is only useful for ad hoc IDL from the prompt, but that is
what the original poster was asking about, no?

-Mike
Re: IDL environment [message #42126 is a reply to message #42125] Tue, 28 December 2004 03:03 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
judy wrote:

> I am a newbe to IDL and looking for information for setting up the
> environment. I did create the ~/idl_startup.pro file to set the
> graphics to true_color=24, also added a directory to the path. I would
> also like to change the idl prompt from something like,
>
> /home/judy/idl>
>
> and have the prompt update to always display the current working
> directory. I have experimented with the !prompt variable, could
> probably create a alias cd.pro program to update the variable every
> time the directory changes, just thought I would ask this group first.
>
> I am currently using,
>
> IDL = Student Edition 6.0.3 (linux x86 m32)
> OS = SuSE 9.0
> Shell= tcsh
>
> Thanks,
> Judy

Dear Judy

from all the experience I have it is better to diable in preferences "Change
directory on open". On windows this may be useful but on *nix you are able
to start idl(de) [emacs] from the directory where your code is.

It is better to stay always in your directory. Otherwise if some routine
does not work as supposed your are caught in the directory where the
routine is from - probably with no write permission.

cheers

Reimar




--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: IDL environment [message #42127 is a reply to message #42126] Mon, 27 December 2004 21:23 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
judy writes:

> I am a newbe to IDL and looking for information for setting up the
> environment. I did create the ~/idl_startup.pro file to set the
> graphics to true_color=24, also added a directory to the path. I would
> also like to change the idl prompt from something like,
>
> /home/judy/idl>
>
> and have the prompt update to always display the current working
> directory. I have experimented with the !prompt variable, could
> probably create a alias cd.pro program to update the variable every
> time the directory changes, just thought I would ask this group first.
>
> I am currently using,
>
> IDL = Student Edition 6.0.3 (linux x86 m32)
> OS = SuSE 9.0
> Shell= tcsh

I don't think there is any way to change the prompt
like this in a reliable way. You could write your
own "mycd.pro", which called the IDL CD program
and changed the prompt appropriately. And as long
as you only run programs you write, and as long
as you use MYCD instead of CD you will be fine.

But it is hard to live in such isolation. If it
were me, I'd leave the prompt alone and work up
a nice PWD program so you can always find out
what directory you are in when you need to know. :-)

Cheers,

David

P.S. Oh, what the hell, Merry Christmas!

PRO PWD
CD, Current=thisDir
PRINT, thisDir
END


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: IDL environment [message #42197 is a reply to message #42125] Tue, 04 January 2005 11:14 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Michael Wallace wrote:
>> PRO PWD
>> CD, Current=thisDir
>> PRINT, thisDir
>> END
>
>
> Maybe I'm missing something, which I usually do, but wouldn't you just
> need a single command?
>
> IDL> $pwd
> /the/current/working/directory
>
> I use the shell escape ($) when I need to do something quick with the
> file system. I use $ls, $pwd and $vi (!!) all the time it seems. Of
> course, this is only useful for ad hoc IDL from the prompt, but that is
> what the original poster was asking about, no?
>
> -Mike

I think $pwd will tell you the directory from which you started your IDL
session. If you did a 'cd /some/where' later in IDL, $pwd won't tell you
the current IDL working directory.

Benjamin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: GUI builder limitations?
Next Topic: IDL environment

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

Current Time: Fri Oct 10 06:48:06 PDT 2025

Total time taken to generate the page: 1.59818 seconds