Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parsing the pathname

Code Block
        nameroot, ext = os.path.splitext(fname)path) # i.e. path='root-part.tail-part'
        basename  = os.path.basename(path)
        dirname   = os.path.dirname(path)
        lexist    = os.path.lexists(path)
        isfile    = os.path.isfile(path)
        isdir     = os.path.isdir(path)
        head, tail= os.path.split(path)    # i.e. path='head-part/tail-part'
...

http://docs.python.org/library/os.path.html

Also useful string operations

Code Block

    start = st.find(symbolic_string, pattern)
    pattern_length = len(pattern)

Matplotlib

In examples below we assume

...