summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/__main__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py
index d63ec63b..887f8e28 100644
--- a/ranger/__main__.py
+++ b/ranger/__main__.py
@@ -208,6 +208,7 @@ def main():
 
 
 if __name__ == '__main__':
-	top_dir = os.path.dirname(sys.path[0])
-	sys.path.insert(0, top_dir)
+	# The ranger directory can be executed directly, for example by typing
+	# python /usr/lib/python2.6/site-packages/ranger
+	sys.path.insert(0, os.path.dirname(sys.path[0]))
 	main()