Previous Next blank.gif blank.gif

Class URL - Represent a Universal Resource Locator.


SYNOPSIS

import HTMLgen
class URL
  def __init__(self, url)
  string __module__ = 'HTMLgen'
  def __str__(self)
  def copy(self)
  def parse(self, url)
  def split(self, p)

DESCRIPTION

Assumed to be of the form: http://www.node.edu/directory/file.html with http being an example protocol, www.node.edu being an example network node, directory being the directory path on that node, and file.html being the target filename. The argument string is parsed into attributes .proto , .node , .dir , .file respectively and may be altered individually after instantiation. The __str__ method simply reassembles the components into a full URL string.

def copy(self)

No argument. Return a copy of this object.

def split(self, p)

Same as posixpath.split()

Copied here for availability on the Mac.

SEE ALSO

HTMLgen


Previous Next blank.gif blank.gif
Buzz.gif

Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Tue Apr 20, 1999