4 def string_in_file( filepath, string ):
6 f = open( filepath, 'r' )
7 found = f.read().find( string ) != -1
15 if ( os.path.exists('/etc/osso_software_version') or
16 os.path.exists('/proc/component_version') or
17 string_in_file('/etc/issue', 'maemo') ):
22 platform = get_platform()
25 print simplejson.dumps(x, sort_keys=True, indent=4)
27 def find_resource(name):
28 if os.path.isfile(os.path.join('data', name)):
29 return os.path.join('data', name)
30 elif os.path.isfile(os.path.join('/opt/jaemendo', name)):
31 return os.path.join('/opt/jaemendo', name)
32 elif os.path.isfile(os.path.join('/usr/share/jaemendo', name)):
33 return os.path.join('/usr/share/jaemendo', name)