Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
LanguageSelector /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2016-11-15 15:19
ImConfig.py
2.24
KB
-rw-r--r--
2016-07-22 15:14
LangCache.py
6.06
KB
-rw-r--r--
2013-11-04 22:47
LanguageSelector.py
4.18
KB
-rw-r--r--
2013-11-04 22:47
LocaleInfo.py
12.55
KB
-rw-r--r--
2013-11-05 02:07
__init__.py
3
B
-rw-r--r--
2013-11-04 22:47
macros.py
5.24
KB
-rw-r--r--
2013-11-04 22:47
utils.py
1.63
KB
-rw-r--r--
2013-11-04 22:47
xkb.py
3.25
KB
-rw-r--r--
2013-11-04 22:47
Save
Rename
# ImConfig.py (c) 2012-2016 Canonical # Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com> # # Released under the GPL # import os import subprocess import locale class ImConfig(object): def __init__(self): pass def available(self): return os.path.exists('/usr/bin/im-config') def getAvailableInputMethods(self): inputMethods = sorted(subprocess.check_output(['im-config', '-l']).decode().split()) inputMethods.append('none') return inputMethods def getCurrentInputMethod(self): (systemConfig, userConfig, autoConfig) = \ subprocess.check_output(['im-config', '-m']).decode().split()[:3] if userConfig != 'missing': return userConfig """ no saved user configuration let's ask the system and save the system configuration as the user ditto """ system_conf = '' try: locale.setlocale(locale.LC_ALL, '') except locale.Error: return None desktop = os.environ.get('XDG_CURRENT_DESKTOP') if desktop.split(':')[-1] in ['Unity', 'MATE', 'GNOME'] \ and desktop.split(':')[0] != 'GNOME-Flashback' \ or locale.getlocale(locale.LC_CTYPE)[0][:3] in ['zh_', 'ja_', 'ko_', 'vi_']: system_default = autoConfig else: system_default = 'none' if systemConfig == 'default': system_conf = system_default elif os.path.exists('/etc/X11/xinit/xinputrc'): for line in open('/etc/X11/xinit/xinputrc'): if line.startswith('run_im'): system_conf = line.split()[1] break if not system_conf: system_conf = system_default self.setInputMethod(system_conf) return system_conf def setInputMethod(self, im): subprocess.call(['im-config', '-n', im]) if __name__ == '__main__': im = ImConfig() print('available input methods: %s' % im.getAvailableInputMethods()) print('current method: %s' % im.getCurrentInputMethod()) print("setting method 'fcitx'") im.setInputMethod('fcitx') print('current method: %s' % im.getCurrentInputMethod()) print('removing ~/.xinputrc') im.setInputMethod('REMOVE')