osx - Where is the .idlerc folder for Python IDLE on Mac? -


i'm looking .idlerc folder idle. setup python 2.7.9 + mac osx el capitan. folder contains "config-highlight.cfg" file apply new custom themes.

.idlerc should in home directory. code reading , writing in directory in idlelib/confighandler.py, in getusercfgdir 'method'. copied below, useless self parameter removed, , needed imports added.

import os, sys  def getusercfgdir():     """return filesystem directory storing user config files.      creates if required.     """     cfgdir = '.idlerc'     userdir = os.path.expanduser('~')     if userdir != '~': # expanduser() found user home dir         if not os.path.exists(userdir):             warn = ('\n warning: os.path.expanduser("~") points to\n ' +                     userdir + ',\n path not exist.')             try:                 print(warn, file=sys.stderr)             except oserror:                 pass             userdir = '~'     if userdir == "~": # still no path home!         # traditionally idle has defaulted os.getcwd(), adequate?         userdir = os.getcwd()     userdir = os.path.join(userdir, cfgdir)     if not os.path.exists(userdir):         try:             os.mkdir(userdir)         except oserror:             warn = ('\n warning: unable create user config directory\n' +                     userdir + '\n check path , permissions.\n exiting!\n')             print(warn, file=sys.stderr)             raise systemexit     # todo continue without userdir instead of exit     return userdir  print(getusercfgdir()) 

i consider adding information preferences dialog. note 1 can add theme editing existing theme in dialog. 2.7.11, 3.4.4, , 3.5.1, idle has new dark theme start from. make editing easier, plan add easy means of changing default background items use it.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -