@@ -10,6 +10,10 @@ The easiest way to install PyFilesystem is with `easy_install <http://peak.telec
...
@@ -10,6 +10,10 @@ The easiest way to install PyFilesystem is with `easy_install <http://peak.telec
easy_install fs
easy_install fs
Add the -U switch if you want to upgrade a previous installation::
easy_install -U fs
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::
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::
@@ -20,12 +24,12 @@ You should now have the `fs` module on your path:
...
@@ -20,12 +24,12 @@ You should now have the `fs` module on your path:
>>> import fs
>>> import fs
>>> fs.__version__
>>> fs.__version__
'0.2.0a9'
'0.3.0'
Prerequisites
Prerequisites
-------------
-------------
PyFilesystem requires at least **Python 2.4**. There are a few other dependancies if you want to use some of the more advanced filesystem interfaces, but for basic use all that is needed is the Python standard library.
PyFilesystem requires at least **Python 2.4**. There are a few other dependencies if you want to use some of the more advanced filesystem interfaces, but for basic use all that is needed is the Python standard library.
* wxPython (required for fs.browsewin) http://www.wxpython.org/
* wxPython (required for fs.browsewin) http://www.wxpython.org/
* Boto (required for fs.s3fs) http://code.google.com/p/boto/
* Boto (required for fs.s3fs) http://code.google.com/p/boto/
...
@@ -43,6 +47,10 @@ The following will list all the files in your home directory::
...
@@ -43,6 +47,10 @@ The following will list all the files in your home directory::
>>> home_fs = OSFS('~/') # 'c:\Users\<login name>' on Windows
>>> home_fs = OSFS('~/') # 'c:\Users\<login name>' on Windows
>>> home_fs.listdir()
>>> home_fs.listdir()
Here's how to browse your home folder with a graphical interface::
>>> home_fs.browse()
This will display the total number of bytes store in '.py' files your home directory::
This will display the total number of bytes store in '.py' files your home directory::
>>> sum(home_fs.getsize(f) for f in home_fs.walkfiles(wildcard='*.py'))
>>> sum(home_fs.getsize(f) for f in home_fs.walkfiles(wildcard='*.py'))
@@ -7,3 +7,25 @@ Think of PyFilesystem (FS) objects as the next logical step to Python's `file` o
...
@@ -7,3 +7,25 @@ Think of PyFilesystem (FS) objects as the next logical step to Python's `file` o
Even if you only want to work with the local filesystem, PyFilesystem simplifies a number of common operations and reduces the chance of error.
Even if you only want to work with the local filesystem, PyFilesystem simplifies a number of common operations and reduces the chance of error.
About PyFilestem
----------------
PyFilesystem was initially created by Will McGugan (http://www.willmcgugan.com) and is now a joint effort with Ryan Kelly (http://www.rfk.id.au/).
Need Help?
----------
PyFilesystem is in development, but should be pretty stable. If you have any problems or questions, please contact the developers through one of the following channels:
Bugs
####
If you find a bug in PyFilesytem, please file an issue: http://code.google.com/p/pyfilesystem/issues/list
Discussion Group
################
There is also a discussion group for PyFilesystem: http://groups.google.com/group/pyfilesystem-discussion