summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-08-07 15:12:10 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2011-08-07 15:12:10 +0000
commit19a25b721353cc4fc2ed7adcbdb1709dc83b621d (patch)
treeba26b1383d532e357fb9167533a74ddbcf343a90 /docs
parent038c0022c0d07069815ca46af0215ffa8ca2cf52 (diff)
downloadpyfilesystem-19a25b721353cc4fc2ed7adcbdb1709dc83b621d.tar.gz
Fixes and documentation
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@718 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'docs')
-rw-r--r--docs/concepts.rst8
-rw-r--r--docs/getting_started.rst12
2 files changed, 15 insertions, 5 deletions
diff --git a/docs/concepts.rst b/docs/concepts.rst
index e30758d..313ed04 100644
--- a/docs/concepts.rst
+++ b/docs/concepts.rst
@@ -1,7 +1,7 @@
Concepts
========
-It is generally quite easy to get in to the mind-set of using PyFilesystem interface over lower level interfaces (since the code tends to be simpler) but there are a few concepts which you will need to keep in mind.
+Working with PyFilesystem is generally easier than working with lower level interfaces, as long as you are aware these simple concepts.
Sandboxing
----------
@@ -25,7 +25,9 @@ We can open the `foo` directory with the following code::
from fs.osfs import OSFS
foo_fs = OSFS('foo')
-The `foo_fs` object can work with any of the contents of `bar` and `baz`, which may not be desirable, especially if we are passing `foo_fs` to an untrusted function or one that could potentially delete files. Fortunately we can isolate a single sub-directory with then :meth:`~fs.base.FS.opendir` method::
+The `foo_fs` object can work with any of the contents of `bar` and `baz`, which may not be desirable,
+especially if we are passing `foo_fs` to an untrusted function or to a function that has the potential to delete files.
+Fortunately we can isolate a single sub-directory with then :meth:`~fs.base.FS.opendir` method::
bar_fs = foo_fs.opendir('bar')
@@ -54,7 +56,7 @@ When working with paths in FS objects, keep in mind the following:
* A double dot means 'previous directory'
Note that paths used by the FS interface will use this format, but the constructor or additional methods may not.
-Notably the :mod:`~fs.osfs.OSFS` constructor which requires an OS path -- the format of which can be platform-dependent.
+Notably the :mod:`~fs.osfs.OSFS` constructor which requires an OS path -- the format of which is platform-dependent.
There are many helpful functions for working with paths in the :mod:`fs.path` module.
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index dab09ef..66887e1 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -13,14 +13,22 @@ The easiest way to install PyFilesystem is with `easy_install <http://peak.telec
Add the -U switch if you want to upgrade a previous installation::
easy_install -U fs
+
+If you prefer to use Pip (http://pypi.python.org/pypi/pip) to install Python packages, the procedure is much the same::
-This will install the latest stable release. If you would prefer to install the cutting edge release then you can get the latest copy of the source via SVN::
+ pip install fs
+
+Or to upgrade::
+
+ pip install fs --upgrade
+
+You can also install the cutting edge release by checking out the source via SVN::
svn checkout http://pyfilesystem.googlecode.com/svn/trunk/ pyfilesystem-read-only
cd pyfilesystem-read-only
python setup.py install
-You should now have the `fs` module on your path:
+Whichever method you use, you should now have the `fs` module on your path (version number may vary)::
>>> import fs
>>> fs.__version__