$HOSTNAME not in os.environ?

slinkp slinkp at gmail.com
Fri Sep 1 16:22:27 EDT 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