¡@

Home 

python Programming Glossary: self.stack

IronPython: EXE compiled using pyc.py cannot import module “os”

http://stackoverflow.com/questions/6195781/ironpython-exe-compiled-using-pyc-py-cannot-import-module-os

a directory tree def __init__ self directory pattern self.stack directory self.pattern pattern self.files self.index 0 def __getitem__.. # pop next directory from stack self.directory self.stack.pop self.files os.listdir self.directory self.index 0 else.. and not os.path.islink fullname and fullname 4 '.svn' self.stack.append fullname if fnmatch.fnmatch file self.pattern return..

Convert list of positions [4, 1, 2] of arbitrary length to an index for a nested list

http://stackoverflow.com/questions/6558365/convert-list-of-positions-4-1-2-of-arbitrary-length-to-an-index-for-a-nested

line 130 in get_item return self._get_item_at self.stack File nestedlistiterator.py line 39 in _get_item_at item item.. current item.''' if item is None item self._get_item_at self.stack return isinstance item collections.Sequence and not isinstance.. test current index.''' if index_tuple is None index_tuple self.stack if any x 0 for x in index_tuple return False try self._get_item_at..

Tarjan's strongly connected components algorithm in python not working

http://stackoverflow.com/questions/6575058/tarjans-strongly-connected-components-algorithm-in-python-not-working

self head lowlink count stack self.lowlink self.count self.stack lowlink head count head self.counter self.counter 1 stack.append.. head lowlink tail elif count tail count head if tail in self.stack lowlink head min lowlink head count tail if lowlink head count.. graph self.counter 0 self.count dict self.lowlink dict self.stack self.connected_components for v in self.graph.vertices if v..

Directory Walker for Python

http://stackoverflow.com/questions/775231/directory-walker-for-python

traverses a directory tree def __init__ self directory self.stack directory self.files self.index 0 def __getitem__ self index.. IndexError # pop next directory from stack self.directory self.stack.pop self.files os.listdir self.directory self.index 0 else #.. if os.path.isdir fullname and not os.path.islink fullname self.stack.append fullname return fullname for file in DirectoryWalker..