add an executable script draft
authoralain leufroy <alain@leufroy.fr>
Fri, 29 Mar 2013 21:56:14 +0100
changeset 29 a3b7ecd5d238
parent 28 2a2d268844f1
child 53 497beda7935a
add an executable script
bin/h5fs
h5fs.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/h5fs	Fri Mar 29 21:56:14 2013 +0100
@@ -0,0 +1,5 @@
+#! /usr/bin/env python
+from h5fs import main
+
+if __name__ == '__main__':
+    main()
--- a/h5fs.py	Fri Mar 29 03:15:18 2013 +0100
+++ b/h5fs.py	Fri Mar 29 21:56:14 2013 +0100
@@ -191,13 +191,13 @@
             data.append(super(Npy10FsMixin, self).get_data(h5entry, start, end))
         return ''.join(data)
 
-def main(mixincls):
+def main(mixincls=Npy10FsMixin):
     '''Main entry point that start the HDF5 filesystem server'''
     usage = "\nUserspace HDF5 file explorer.\n\n%prog sourcefile mountpoint"
     class H5FS(mixincls, fuse.Fuse):
         '''merge Fuse + HDF5 interface'''
         pass
-    server = H5FS(version="%proog " + fuse.__version__,
+    server = H5FS(version="%prog " + fuse.__version__,
                   usage=usage,
                   dash_s_do='setsingle',
                   standard_mods=True,
@@ -211,5 +211,3 @@
     finally:
         h5file.close()
 
-if __name__ == '__main__':
-    main(Npy10FsMixin)