~ubuntu-branches/ubuntu/lucid/exaile/lucid

« back to all changes in this revision

Viewing changes to exaile.py

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2010-02-12 19:51:01 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100212195101-8jt3tculxcl92e6v
Tags: 0.3.1~b1-0ubuntu1
* New upstream release.
* Adjust exaile.install for new plugins.
* debian/control:
 - Drop unneeded python-dev Build-Dep.
 - Bump Standards-Version to 3.8.4 
* debian/rules: No empty po files to delete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
 
# Copyright (C) 2008-2009 Adam Olsen 
 
2
# Copyright (C) 2008-2009 Adam Olsen
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
5
5
# it under the terms of the GNU General Public License as published by
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
17
 
18
 
import sys, os, os.path
 
18
import os
 
19
import os.path
 
20
import sys
19
21
 
20
22
# allow disabling of pyc generation. Only works on python >= 2.6
21
23
if os.getenv("EXAILE_NO_OPTIMIZE"):
29
31
    try:
30
32
        import ctypes
31
33
        libc = ctypes.CDLL('libc.so.6')
32
 
        libc.prctl(15, 'exaile', 0, 0, 0)
 
34
        libc.prctl(15, 'exaile', 0, 0, 0) # 15 = PR_SET_NAME
33
35
    except:
34
 
        try:
35
 
             import dl
36
 
             libc = dl.open('/lib/libc.so.6')
37
 
             libc.call('prctl', 15, 'exaile\0', 0, 0, 0) # 15 is PR_SET_NAME
38
 
        except:
39
 
            pass
 
36
        pass
40
37
 
41
38
# Find out the location of exaile's working directory, and insert it to sys.path
42
39
basedir = os.path.dirname(os.path.realpath(__file__))
46
43
        basedir = cwd
47
44
sys.path.insert(0, basedir)
48
45
 
49
 
 
50
46
def main():
51
47
    from xl import main
52
48
    global exaile