diff options
author | hut <hut@lavabit.com> | 2009-11-27 10:49:48 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-11-27 10:49:48 +0100 |
commit | 9506fb8e79f2d04a1ab78039bacdbee7b22109b5 (patch) | |
tree | 3d5c682e9c5032a1c23be6a98c9d3d6e7c8224b5 /code/environment.py | |
parent | 5822dff7d91472bf2fc337c68f144e0ce1de09ae (diff) | |
download | ranger-9506fb8e79f2d04a1ab78039bacdbee7b22109b5.tar.gz |
more VROOM
Diffstat (limited to 'code/environment.py')
-rw-r--r-- | code/environment.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/code/environment.py b/code/environment.py deleted file mode 100644 index 515fc8c6..00000000 --- a/code/environment.py +++ /dev/null @@ -1,38 +0,0 @@ -import directory - -class Vector(): - def __init__(self, x, y): - self.x = x - self.y = y - -class Environment(): - # A collection of data which is relevant for more than - # one class. - def __init__(self, opt): - self.opt = opt - self.path = None - self.pathway = () - self.directories = {} - self.pwd = None # current directory - self.cf = None # current file - self.keybuffer = '' - self.copy = None - self.termsize = Vector(80, 24) - - def at_level(self, level): - if level <= 0: - try: - return self.pathway[level - 1] - except IndexError: - return None - else: - return self.cf - - def get_directory(self, path): - import os - path = os.path.abspath(path) - try: - return self.directories[path] - except KeyError: - self.directories[path] = directory.Directory(path) - return self.directories[path] |