Menu

[r185]: / utils.py  Maximize  Restore  History

Download this file

25 lines (22 with data), 574 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -*- coding: utf-8 -*-
import os
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import *
from PyQt4.QtGui import *
#Skins
def get_skins():
skins = []
for item in os.listdir("skins" + os.path.sep):
if os.path.isdir("skins" + os.path.sep + item) and not item[:1] == ".":
skins.append(item)
skins.sort(key=lambda x: x.lower())
return skins
#Screens
def get_screens():
qscreen = QDesktopWidget()
screens = []
for screen in range(0, qscreen.screenCount()):
screens.append(str(screen+1))
return screens
def fake_locale(string):
return string