You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting_started.rst
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ PyFilesystem is a Python-only module and can be installed from source or with `p
6
6
Installing
7
7
----------
8
8
9
-
To install with pip, use the following
9
+
To install with pip, use the following::
10
10
11
11
pip install fs
12
12
@@ -26,6 +26,16 @@ Whichever method you use, you should now have the `fs` module on your path (vers
26
26
>>> fs.__version__
27
27
'0.5.0'
28
28
29
+
You should also have the command line applications installed. If you enter the following in the command line, you should see a tree display of the current working directory::
30
+
31
+
fstree -l 2
32
+
33
+
Because the command line utilities use PyFilesystem, they also work with any of the supported filesystems. For example::
34
+
35
+
fstree ftp://ftp.mozilla.org -l 2
36
+
37
+
See :doc:`commands` for more information on the command line applications.
Copy file name to clipboardExpand all lines: docs/releasenotes.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Release Notes
3
3
4
4
PyFilesystem has reached a point where the interface is relatively stable. The were some backwards incompatibilities introduced with version 0.5.0, due to Python 3 support.
5
5
6
-
Changes from 0.5.0
6
+
Changes from 0.4.0
7
7
------------------
8
8
9
9
Python 3.X support was added. The interface has remained much the same, but the ``open`` method now works like Python 3's builtin, which handles text encoding more elegantly. i.e. if you open a file in text mode, you get a stream that reads or writes unicode rather than binary strings.
@@ -14,7 +14,7 @@ The new signature to the ``open`` method (and ``safeopen``) is as follows::
14
14
15
15
In order to keep the same signature across both Python 2 and 3, PyFilesystems uses the ``io`` module from the standard library. Unfortunately this is only available from Python 2.6 onwards, so Python 2.5 support has been dropped. If you need Python 2.5 support, consider sticking to PyFilesystem 0.4.0.
16
16
17
-
By default the new ``open`` method now returns a unicode text stream, whereas 0.4.0 returned a binary file-like object. If you have code that runs on 0.4.0, you will probably want to either modify your code to work with unicode or explicitly open files in binary mode. The later is as simple as changing the mode from "r" to "rb" (or "w" to "wb"), but if you were working with unicode, the new text streams will likely save you a few lines of code.
17
+
By default the new ``open`` method now returns a unicode text stream, whereas 0.4.0 returned a binary file-like object. If you have code that runs on 0.4.0, you will probably want to either modify your code to work with unicode or explicitly open files in binary mode. The latter is as simple as changing the mode from "r" to "rb" (or "w" to "wb"), but if you were working with unicode, the new text streams will likely save you a few lines of code.
18
18
19
19
The ``setcontents`` and ``getcontents`` methods have also grown a few parameters in order to work with text files. So you won't require an extra encode / decode step for text files.
0 commit comments