Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
diff --git a/Demo/pdist/FSProxy.py b/Demo/pdist/FSProxy.py
index dad4015..510ac76 100755
--- a/Demo/pdist/FSProxy.py
+++ b/Demo/pdist/FSProxy.py
@@ -88,7 +88,7 @@
c, t = fs.GetCreatorType()
if t != 'TEXT': return 0
except macfs.error as msg:
- print "***", name, msg
+ print("***", name, msg)
return 0
else:
if os.path.islink(name): return 0
@@ -99,12 +99,12 @@
def check(self, name):
if not self.visible(name):
- raise os.error, "protected name %s" % repr(name)
+ raise os.error("protected name %s" % repr(name))
def checkfile(self, name):
self.check(name)
if not os.path.isfile(name):
- raise os.error, "not a plain file %s" % repr(name)
+ raise os.error("not a plain file %s" % repr(name))
def pwd(self):
return os.getcwd()
@@ -118,7 +118,7 @@
def back(self):
if not self._dirstack:
- raise os.error, "empty directory stack"
+ raise os.error("empty directory stack")
dir, ignore = self._dirstack[-1]
os.chdir(dir)
del self._dirstack[-1]
@@ -128,8 +128,8 @@
if pat:
def keep(name, pat = pat):
return fnmatch.fnmatch(name, pat)
- files = filter(keep, files)
- files = filter(self.visible, files)
+ files = list(filter(keep, files))
+ files = list(filter(self.visible, files))
files.sort()
return files
@@ -139,12 +139,12 @@
def listfiles(self, pat = None):
files = os.listdir(os.curdir)
- files = filter(os.path.isfile, files)
+ files = list(filter(os.path.isfile, files))
return self._filter(files, pat)
def listsubdirs(self, pat = None):
files = os.listdir(os.curdir)
- files = filter(os.path.isdir, files)
+ files = list(filter(os.path.isdir, files))
return self._filter(files, pat)
def exists(self, name):
@@ -278,7 +278,7 @@
def mkdir(self, name):
self.check(name)
- os.mkdir(name, 0777)
+ os.mkdir(name, 0o777)
def rmdir(self, name):
self.check(name)