diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
commit | 182b5aca27d376b08a2904bed42b751496f932f3 (patch) | |
tree | df13115820dbc879c0fe2eae488c9f8c0215a7da /Lib/plat-mac/applesingle.py | |
parent | e6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff) | |
download | cpython-182b5aca27d376b08a2904bed42b751496f932f3.zip cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2 |
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Lib/plat-mac/applesingle.py')
-rw-r--r-- | Lib/plat-mac/applesingle.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/plat-mac/applesingle.py b/Lib/plat-mac/applesingle.py index adbce0c..7bbe8af 100644 --- a/Lib/plat-mac/applesingle.py +++ b/Lib/plat-mac/applesingle.py @@ -78,7 +78,7 @@ class AppleSingle(object): self.datafork = data elif restype == AS_RESOURCEFORK: self.resourcefork = data - + def tofile(self, path, resonly=False): outfile = open(path, 'wb') data = False @@ -99,15 +99,15 @@ class AppleSingle(object): fp = MacOS.openrf(path, '*wb') fp.write(self.resourcefork) fp.close() - + def decode(infile, outpath, resonly=False, verbose=False): """decode(infile, outpath [, resonly=False, verbose=False]) Creates a decoded file from an AppleSingle encoded file. - If resonly is True, then it will create a regular file at + If resonly is True, then it will create a regular file at outpath containing only the resource fork from infile. Otherwise it will create an AppleDouble file at outpath - with the data and resource forks from infile. On platforms + with the data and resource forks from infile. On platforms without the MacOS module, it will create inpath and inpath+'.rsrc' with the data and resource forks respectively. @@ -121,7 +121,7 @@ def decode(infile, outpath, resonly=False, verbose=False): as = AppleSingle(infile, verbose=verbose) as.tofile(outpath, resonly=resonly) - + def _test(): if len(sys.argv) < 3 or sys.argv[1] == '-r' and len(sys.argv) != 4: print 'Usage: applesingle.py [-r] applesinglefile decodedfile' @@ -132,6 +132,6 @@ def _test(): else: resonly = False decode(sys.argv[1], sys.argv[2], resonly=resonly) - + if __name__ == '__main__': _test() |