Updated findrox.
[mime-editor.git] / AppRun
blob216e70c20301081e610c7507b41dade3de9951d1
1 #!/usr/bin/env python
2 import findrox; findrox.version(1,9,7)
3 import rox
4 import os
6 if not os.environ.get('XDG_DATA_DIRS', ''):
7 # Try to get MIME database through Zero Install, if possible
8 os.system('0refresh zero-install.sourceforge.net/share/mime 2003-08-07')
9 if os.path.isdir('/uri/0install/zero-install.sourceforge.net'):
10 os.environ['XDG_DATA_DIRS'] = '/usr/local/share/:/usr/share/:/uri/0install/zero-install.sourceforge.net/share'
12 import type
13 import editor
15 try:
16 import rox.basedir
17 except ImportError:
18 rox.croak('Need ROX-Lib 1.9.7 or later:\n'
19 'http://rox.sourceforge.net/rox_lib.html')
21 box = editor.Editor()
22 box.show()
23 rox.g.gdk.flush()
25 box.update()
27 rox.mainloop()