Re: How to capture all the environment variables from shell?

2010-08-11 Thread Nobody
On Wed, 11 Aug 2010 13:08:59 +1000, Cameron Simpson wrote: The reason .bashrc gets overused for envars, aside from ignorance and propagated bad habits, is that in a GUI desktop the setup sequence is often a bit backwards. A conventional terminal/console login means you get a login shell that

Re: How to capture all the environment variables from shell?

2010-08-11 Thread Cameron Simpson
On 12Aug2010 01:28, Nobody nob...@nowhere.com wrote: | On Wed, 11 Aug 2010 13:08:59 +1000, Cameron Simpson wrote: | The reason .bashrc gets overused for envars, aside from ignorance and | propagated bad habits, is that in a GUI desktop the setup sequence is | often a bit backwards. A

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Steven W. Orr
On 8/2/2010 4:33 AM, Thorsten Kampe wrote: * Tim Chase (Mon, 26 Jul 2010 21:42:24 -0500) On 07/26/10 21:26, Steven W. Orr wrote: Please! Never export anything from your .bashrc unless you really know what you're doing. Almost all exports should be done in your .bash_profile Could you

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Cameron Simpson
On 10Aug2010 10:07, Steven W. Orr ste...@syslang.net wrote: | On 8/2/2010 4:33 AM, Thorsten Kampe wrote: | * Tim Chase (Mon, 26 Jul 2010 21:42:24 -0500) | On 07/26/10 21:26, Steven W. Orr wrote: | Please! Never export anything from your .bashrc unless you | really know what you're doing.

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Cameron Simpson
On 11Aug2010 13:08, I wrote: | On 10Aug2010 10:07, Steven W. Orr ste...@syslang.net wrote: [...] | | After that, and again, be aware that the .bashrc alone is executed for login | | shells *which are not interactive*. for example: | | | | ssh somemachine 'echo Hello' | | | | This command will

Re: How to capture all the environment variables from shell?

2010-08-02 Thread Thorsten Kampe
* Tim Chase (Mon, 26 Jul 2010 21:42:24 -0500) On 07/26/10 21:26, Steven W. Orr wrote: Please! Never export anything from your .bashrc unless you really know what you're doing. Almost all exports should be done in your .bash_profile Could you elaborate on your reasoning why (or why-not)?

Re: How to capture all the environment variables from shell?

2010-07-27 Thread Nobody
On Mon, 26 Jul 2010 21:42:24 -0500, Tim Chase wrote: Please! Never export anything from your .bashrc unless you really know what you're doing. Almost all exports should be done in your .bash_profile Could you elaborate on your reasoning why (or why-not)? I've found that my .bash_profile

Re: How to capture all the environment variables from shell?

2010-07-27 Thread Steven W. Orr
On 07/26/10 22:42, quoth Tim Chase: On 07/26/10 21:26, Steven W. Orr wrote: Please! Never export anything from your .bashrc unless you really know what you're doing. Almost all exports should be done in your .bash_profile Could you elaborate on your reasoning why (or why-not)? I've found

How to capture all the environment variables from shell?

2010-07-26 Thread Peng Yu
Hi, R_HOME is set in my shell (bash). But os.environ doesn't have it. I'm not sure what it does when os module is imported. But it seems that os.environ doesn't capture all the environment variable from the shell. Could anybody let me know what is the correct way to inherent all the environment

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Chris Rebert
On Mon, Jul 26, 2010 at 4:36 PM, Peng Yu pengyu...@gmail.com wrote: Hi, R_HOME is set in my shell (bash). But os.environ doesn't have it. I'm not sure what it does when os module is imported. But it seems that os.environ doesn't capture all the environment variable from the shell. Could

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Rhodri James
On Tue, 27 Jul 2010 00:36:12 +0100, Peng Yu pengyu...@gmail.com wrote: R_HOME is set in my shell (bash). But os.environ doesn't have it. I'm not sure what it does when os module is imported. But it seems that os.environ doesn't capture all the environment variable from the shell. Could anybody

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Cameron Simpson
On 26Jul2010 18:36, Peng Yu pengyu...@gmail.com wrote: | R_HOME is set in my shell (bash). But os.environ doesn't have it. I'm | not sure what it does when os module is imported. But it seems that | os.environ doesn't capture all the environment variable from the | shell. Could anybody let me know

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Steven W. Orr
On 07/26/10 20:02, quoth Chris Rebert: On Mon, Jul 26, 2010 at 4:36 PM, Peng Yu pengyu...@gmail.com wrote: You need to export R_HOME in bash (probably in your .bashrc or .bash_profile). See http://www.ibm.com/developerworks/library/l-bash.html#N10074 Please! Never export anything from your

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Tim Chase
On 07/26/10 21:26, Steven W. Orr wrote: Please! Never export anything from your .bashrc unless you really know what you're doing. Almost all exports should be done in your .bash_profile Could you elaborate on your reasoning why (or why-not)? I've found that my .bash_profile doesn't get

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Steven D'Aprano
On Mon, 26 Jul 2010 22:26:27 -0400, Steven W. Orr wrote: Please! Never export anything from your .bashrc unless you really know what you're doing. Almost all exports should be done in your .bash_profile Would you like to explain why, or should we just trust you? -- Steven --