Re: $HOSTNAME not in os.environ?

2006-09-01 Thread slinkp
Grant Edwards wrote: > On 2006-09-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Can anybody explain this one? > > print os.getenv('HOSTNAME') > > None > > > [EMAIL PROTECTED] ~ $ echo $HOSTNAME > > kermit > > Perhaps the HOSTNAME variable isn't exported? Aha. Right you are. Thank

Re: $HOSTNAME not in os.environ?

2006-09-01 Thread Grant Edwards
On 2006-09-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Can anybody explain this one? print os.getenv('HOSTNAME') > None > [EMAIL PROTECTED] ~ $ echo $HOSTNAME > kermit Perhaps the HOSTNAME variable isn't exported? -- Grant Edwards grante Yow! All

Re: Hostname

2006-01-29 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Wow! This was a fast answer and it works. That's why we used to joke about Guido's time machine: somebody would express a need (sometimes phrased as a suggestion for an enhancement), and Guido would zip back in time and implement the needed functiona

Re: Hostname

2006-01-29 Thread [EMAIL PROTECTED]
Wow! This was a fast answer and it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Hostname

2006-01-29 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > Iam new in Python. > I want to know for my first Project in Python how i can get the > Hostname from a URL? >>> import urlparse >>> urlparse.urlsplit('http://foo.bar.com/zapzap') ('http', 'foo.bar.com', '/zapzap', '', '') >>> As you may notice