pycrossword  0.4
Pure-Python implementation of a crossword puzzle generator and editor
Namespaces | Functions | Variables
globalvars.py File Reference

Namespaces

 pycross.utils.globalvars
 
 utils.globalvars
 Most application globals are placed here for convenience.
 

Functions

def pycross.utils.globalvars.make_abspath (filename, root='')
 Returns the absolute path for a relative one, for a given root directory. More...
 
def pycross.utils.globalvars.readSettings (settings_file=None, write_defaults_on_error=True)
 Loads the app settings from a settings file. More...
 
def pycross.utils.globalvars.switch_lang (lang='')
 Changes the app interface language by installing the specified translation. More...
 

Variables

bool pycross.utils.globalvars.DEBUGGING = False
 toggle debug message printing More...
 
string pycross.utils.globalvars.APP_VERSION = '0.4.0.3'
 current app version More...
 
string pycross.utils.globalvars.APP_NAME = 'pycrossword'
 app name More...
 
string pycross.utils.globalvars.GIT_REPO = 'https://github.com/S0mbre/crossword.git'
 git repo hosting this app More...
 
string pycross.utils.globalvars.APP_AUTHOR = 'Iskander Shafikov (S0mbre)'
 app author More...
 
string pycross.utils.globalvars.APP_EMAIL = 's00mbre@gmail.com'
 author's email More...
 
string pycross.utils.globalvars.ENCODING = 'utf-8'
 default encoding (for file I/O mostly) More...
 
def pycross.utils.globalvars.SETTINGS_FILE = make_abspath('settings.pxjson')
 path to the current app settings More...
 
def pycross.utils.globalvars.DEFAULT_SETTINGS_FILE = make_abspath('defsettings.pxjson')
 path to the default app settings More...
 
def pycross.utils.globalvars.UPDATE_FILE = make_abspath('update.json')
 path to the Update file that stores info on the available update and last update date More...
 
def pycross.utils.globalvars.SAVEDCW_FILE = make_abspath('autosaved.xpf')
 path to the auto-saved crossword file (in XPF format) More...
 
def pycross.utils.globalvars.DICFOLDER = make_abspath('assets/dic')
 path to the 'dic' folder containing word sources More...
 
def pycross.utils.globalvars.ICONFOLDER = make_abspath('assets/icons')
 path to the icons folder containing GUI icon resources More...
 
def pycross.utils.globalvars.PLUGINS_FOLDER = make_abspath('plugins')
 path to the plugins folder containing user plugins More...
 
def pycross.utils.globalvars.DOCS_FOLDER = make_abspath('doc/manual/html')
 path to the documentation folder More...
 
def pycross.utils.globalvars.APIREF_FOLDER = make_abspath('doc/apiref/html')
 path to the documentation folder More...
 
dictionary pycross.utils.globalvars.LANG = {'en': 'English', 'ru': 'Russian', 'fr': 'French', 'es': 'Spanish', 'de': 'German', 'it': 'Italian'}
 app interface languages in brief and full notation More...
 
list pycross.utils.globalvars.POS
 parts of speech in brief and full notation More...
 
string pycross.utils.globalvars.BRACES = "{}"
 braces More...
 
dictionary pycross.utils.globalvars.SQL_TABLES
 default SQLite DB table names for word sources More...
 
int pycross.utils.globalvars.MAX_RESULTS = 500
 default max results for word source searches More...
 
string pycross.utils.globalvars.PLUGIN_EXTENSION = 'pxplugin'
 user plugin file extension More...
 
string pycross.utils.globalvars.PLUGIN_TEMPLATE_GENERAL
 user plugin template (for the 'general' category) More...
 
list pycross.utils.globalvars.APP_LANGUAGES
 app interface languages More...
 
string pycross.utils.globalvars.NEWLINE = '\n'
 newline character More...
 
 pycross.utils.globalvars.ENCODINGS = \
 string encodings More...
 
dictionary pycross.utils.globalvars.FONT_WEIGHTS = {100: 0, 200: 12, 300: 25, 400: 50, 500: 57, 600: 63, 700: 75, 800: 81, 900: 87}
 CSS-to-Qt font weight conversion table. More...
 
string pycross.utils.globalvars.LINUX_APP_PATH = '~/.local/share/applications/{}.desktop'.format(APP_NAME.lower())
 app path in Linux OS More...
 
 pycross.utils.globalvars.LINUX_MIME_APP = \
 Linux MIME info for app (used for file associations) More...
 
 pycross.utils.globalvars.LINUX_MIME_TYPES = \
 Linux MIME type description (used for file associations) More...
 
string pycross.utils.globalvars.LINUX_MIME_XML = f'~/.local/share/applications/{APP_NAME.lower()}-{APP_NAME.lower()}.xml'
 Linux MIME XML file path (used for file associations) More...
 
string pycross.utils.globalvars.MW_DIC_KEY = '71ae1f74-7edb-4683-be03-8e3d7348660d'
 MW Collegiate Dictionary & Audio API key. More...
 
string pycross.utils.globalvars.MW_DIC_HTTP = 'https://www.dictionaryapi.com/api/v3/references/collegiate/json/{}?key={}'
 MW Collegiate Dictionary API URL. More...
 
int pycross.utils.globalvars.MW_DAILY_REQ = 1000
 MW Collegiate Dictionary daily request limit, see https://www.dictionaryapi.com/. More...
 
string pycross.utils.globalvars.MW_WORD_URL = 'https://www.merriam-webster.com/dictionary/{}'
 MW Collegiate Dictionary URL. More...
 
string pycross.utils.globalvars.YAN_DICT_KEY = 'dict.1.1.20191120T032741Z.d541dffb1a55247b.b090f62ccd320c7e33f8d88eefde8c8e1ea0ba5b'
 Yandex dictionary API key. More...
 
string pycross.utils.globalvars.YAN_DICT_HTTP = 'https://dictionary.yandex.net/api/v1/dicservice.json/lookup?key={}&text={}&lang={}&ui=en'
 Yandex dictionary API URL. More...
 
int pycross.utils.globalvars.YAN_DAILY_REQ = 10000
 Yandex dictionary daily request limit. More...
 
string pycross.utils.globalvars.GOOGLE_KEY = 'AIzaSyAcc_B34Mv7Z4UoVuAMYCEiA9n14_SuEjU'
 Google Search JSON API key. More...
 
string pycross.utils.globalvars.GOOGLE_CSE = '012413034625838642915:je3epsydo2r'
 Google CSE identifier. More...
 
string pycross.utils.globalvars.GOOGLE_HTTP = 'https://www.googleapis.com/customsearch/v1?key={}&cx={}&prettyPrint=true&q={}'
 Google API URL. More...
 
int pycross.utils.globalvars.GOOGLE_DAILY_REQ = 100
 Google daily limit, see https://developers.google.com/custom-search/v1/overview. More...
 
dictionary pycross.utils.globalvars.GOOGLE_LANG_LR
 Google document languages. More...
 
dictionary pycross.utils.globalvars.GOOGLE_LANG_HL
 Google interface languages. More...
 
dictionary pycross.utils.globalvars.GOOGLE_COUNTRIES_CR
 Google document countries. More...
 
dictionary pycross.utils.globalvars.GOOGLE_COUNTRIES_GL
 Google user search countries. More...
 
bool pycross.utils.globalvars.LANGAPPLIED = False
 flag that is set to True when the inerface language has been applied More...