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
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
[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
Wow! This was a fast answer and it works.
--
http://mail.python.org/mailman/listinfo/python-list
[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