$HOSTNAME not in os.environ?

slinkp slinkp at gmail.com
Fri Sep 1 22:22:27 CEST 2006


Grant Edwards wrote:
> On 2006-09-01, slinkp at gmail.com <slinkp at gmail.com> wrote:
> > Can anybody explain this one?
>
> >>>> print os.getenv('HOSTNAME')
> > None
> >>>>
> > pw at kermit ~ $ echo $HOSTNAME
> > kermit
>
> Perhaps the HOSTNAME variable isn't exported?

Aha. Right you are.  Thanks!

- PW




More information about the Python-list mailing list