On Aug 18, 11:17 pm, "Shawn Milochik" <[EMAIL PROTECTED]> wrote:
>
> The easiest solution (in my opinion) is to write a bash script to
> execute your Python script, and use that bash script to add those
> environment variables.
Agreed. Wrap it in a shell script, easier to read and grow than a
on
On Aug 19, 2:37 am, "Stephen Cattaneo" <[EMAIL PROTECTED]>
wrote:
> - What did you run in the cronjob to get back all those variables?
>
> set; echo "-"; echo "import os; print
> os.environ" | python
>
> Cheers,
>
> S
As I should have noted from $BASH_EXECUTION_STRING. I'd be hal
PM
- To: python-list@python.org
- Subject: Re: Python does not get environment variable when using cron.
-
- On Aug 18, 11:15 am, "Stephen Cattaneo"
- <[EMAIL PROTECTED]> wrote:
- > Hello all,
- >
- > I am attempting to execute an automated test (written in Python) via
- > cron
Here's a more "English" version of what people are trying to explain:
When you log into a Unix session, certain files in your home directory
are read and add environment variables to your session. When you run a
cron job, it does not do this. It still runs as "you" as far as
permissions go, but it
9:39 PM
To: python-list@python.org
Subject: Re: Python does not get environment variable when using cron.
I'm not sure about the environment variable, but os.uname() should
give you what you need otherwise.
--
http://mail.python.org/mailman/listinfo/python-list
The information contain
Le Monday 18 August 2008 07:11:59 Cameron Simpson, vous avez écrit :
> You're probably confused by the fact that cron does not invoke "login"
> shells (with their associated initialisation from /etc/profile and
> $HOME/.profile).
This can be solved by invoking /bin/bash -l -c ..., the -l option fo
On 17Aug2008 21:25, John Nagle <[EMAIL PROTECTED]> wrote:
> Stephen Cattaneo wrote:
>> I am attempting to execute an automated test (written in Python) via
>> cron. I have to check the HOSTNAME variable as part of the test, oddly
>> under cron the HOSTNAME environment variable is not in the os.env
Stephen Cattaneo wrote:
Hello all,
I am attempting to execute an automated test (written in Python) via
cron. I have to check the HOSTNAME variable as part of the test, oddly
under cron the HOSTNAME environment variable is not in the os.environ
dictionary. I know that cron runs in a subshell t
On Aug 18, 11:15 am, "Stephen Cattaneo"
<[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I am attempting to execute an automated test (written in Python) via
> cron. I have to check the HOSTNAME variable as part of the test, oddly
> under cron the HOSTNAME environment variable is not in the os.environ
On Aug 18, 11:38 am, "Eric Wertman" <[EMAIL PROTECTED]> wrote:
> I'm not sure about the environment variable, but os.uname() should
> give you what you need otherwise.
As documented, it should but may not ... consider using
socket.gethost*
--
http://mail.python.org/mailman/listinfo/python-list
I'm not sure about the environment variable, but os.uname() should
give you what you need otherwise.
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I am attempting to execute an automated test (written in Python) via
cron. I have to check the HOSTNAME variable as part of the test, oddly
under cron the HOSTNAME environment variable is not in the os.environ
dictionary. I know that cron runs in a subshell that does not have all
of t
12 matches
Mail list logo