#-------------------------------------------------------------------- debug = False profile = False option_list, args = getopt.getopt(sys.argv[1:], "dp") for option in option_list: if option[0] == "-d": debug = True elif option[0] == "-p": profile = True #-------------------------------------------------------------------- ckit.registerWindowClass("Keyhac") # exeと同じ位置にある設定ファイルを優先する if os.path.exists(os.path.join(ckit.getAppExePath(), 'config.py')): ckit.setDataPath(ckit.getAppExePath()) else: ckit.setDataPath( os.path.join(ckit.getAppDataPath(), keyhac_resource.keyhac_dirname)) if not os.path.exists(ckit.dataPath()): os.mkdir(ckit.dataPath()) default_config_filename = os.path.join(ckit.getAppExePath(), '_config.py') config_filename = os.path.join(ckit.dataPath(), 'config.py') keyhac_ini.ini_filename = os.path.join(ckit.dataPath(), 'keyhac.ini') # config.py がどこにもない場合は作成する
#-------------------------------------------------------------------- debug = False profile = False option_list, args = getopt.getopt( sys.argv[1:], "dp" ) for option in option_list: if option[0]=="-d": debug = True elif option[0]=="-p": profile = True #-------------------------------------------------------------------- ckit.registerWindowClass( "Keyhac" ) # exeと同じ位置にある設定ファイルを優先する if os.path.exists( os.path.join( ckit.getAppExePath(), 'config.py' ) ): ckit.setDataPath( ckit.getAppExePath() ) else: ckit.setDataPath( os.path.join( ckit.getAppDataPath(), keyhac_resource.keyhac_dirname ) ) if not os.path.exists(ckit.dataPath()): os.mkdir(ckit.dataPath()) default_config_filename = os.path.join( ckit.getAppExePath(), '_config.py' ) config_filename = os.path.join( ckit.dataPath(), 'config.py' ) keyhac_ini.ini_filename = os.path.join( ckit.dataPath(), 'keyhac.ini' ) # config.py がどこにもない場合は作成する if not os.path.exists(config_filename) and os.path.exists(default_config_filename):
if existing_clnch_wnd: sendIpc(existing_clnch_wnd) sys.exit(0) #-------------------------------------------------------------------- # IPCのために必要でないモジュールはここで import する import shutil import clnch import clnch_mainwindow import clnch_ini import clnch_misc ckit.registerWindowClass( "Clnch" ) ckit.registerCommandInfoConstructor( ckit.CommandInfo ) sys.path[0:0] = [ os.path.join( ckit.getAppExePath(), 'extension' ), ] # exeと同じ位置にある設定ファイルを優先する if os.path.exists( os.path.join( ckit.getAppExePath(), 'config.py' ) ): ckit.setDataPath( ckit.getAppExePath() ) else: ckit.setDataPath( os.path.join( ckit.getAppDataPath(), clnch_resource.clnch_dirname ) ) if not os.path.exists(ckit.dataPath()): os.mkdir(ckit.dataPath()) default_config_filename = os.path.join( ckit.getAppExePath(), '_config.py' )
import os import sys sys.path[0:0] = [ os.path.abspath(os.path.join(os.path.split(sys.argv[0])[0], '../..')), ] import ckit from ckit.ckit_const import * ckit.registerWindowClass("CkitTest") ckit.setTheme("black", {}) class Test1(ckit.TextWindow): def __init__(self): ckit.TextWindow.__init__( self, x=20, y=10, width=80, height=24, title_bar=True, title="Ckit Test", sysmenu=True, activate_handler=self.onActivate, size_handler=self.onSize, close_handler=self.onClose, keydown_handler=self.onKeyDown,
profile = False left_location = None right_location = None option_list, args = getopt.getopt( ckit.getArgv()[1:], "dpL:R:" ) for option in option_list: if option[0]=="-d": debug = True elif option[0]=="-p": profile = True elif option[0]=="-L": left_location = option[1] elif option[0]=="-R": right_location = option[1] ckit.registerWindowClass( "Cfiler" ) ckit.registerCommandInfoConstructor( ckit.CommandInfo ) sys.path[0:0] = [ os.path.join( ckit.getAppExePath(), 'extension' ), ] # exeと同じ位置にある設定ファイルを優先する if os.path.exists( os.path.join( ckit.getAppExePath(), 'config.py' ) ): ckit.setDataPath( ckit.getAppExePath() ) else: ckit.setDataPath( os.path.join( ckit.getAppDataPath(), cfiler_resource.cfiler_dirname ) ) if not os.path.exists(ckit.dataPath()): os.mkdir(ckit.dataPath()) default_config_filename = os.path.join( ckit.getAppExePath(), '_config.py' )
pyd_fullpath = os.path.join( exe_path, "lib", pyd_filename_body + ".pyd" ) if os.path.exists(pyd_fullpath): for importer in sys.meta_path: if isinstance(importer, self.__class__): continue loader = importer.find_module( fullname, None) if loader: return loader sys.meta_path.append(CustomPydFinder()) import ckit from ckit.ckit_const import * ckit.registerWindowClass( "CkitTest" ) ckit.setTheme( "black", {} ) class Test1( ckit.TextWindow ): def __init__(self): ckit.TextWindow.__init__( self, x=20, y=10, width=80, height=24, title_bar = True, title = "Ckit Test",
if existing_clnch_wnd: sendIpc(existing_clnch_wnd) sys.exit(0) #-------------------------------------------------------------------- # IPCのために必要でないモジュールはここで import する import shutil import clnch import clnch_mainwindow import clnch_ini import clnch_misc ckit.registerWindowClass("Clnch") ckit.registerCommandInfoConstructor(ckit.CommandInfo) sys.path[0:0] = [ os.path.join(ckit.getAppExePath(), 'extension'), ] # exeと同じ位置にある設定ファイルを優先する if os.path.exists(os.path.join(ckit.getAppExePath(), 'config.py')): ckit.setDataPath(ckit.getAppExePath()) else: ckit.setDataPath( os.path.join(ckit.getAppDataPath(), clnch_resource.clnch_dirname)) if not os.path.exists(ckit.dataPath()): os.mkdir(ckit.dataPath())
debug = False profile = False option_list, args = getopt.getopt( sys.argv[1:], "dp" ) for option in option_list: if option[0]=="-d": debug = True elif option[0]=="-p": profile = True #-------------------------------------------------------------------- if __name__ == "__main__": ckit.registerWindowClass( "Cmemo" ) sys.path[0:0] = [ os.path.join( ckit.getAppExePath(), 'extension' ), os.path.join( ckit.getAppExePath(), 'script' ), ] # exeと同じ位置にある設定ファイルを優先する if os.path.exists( os.path.join( ckit.getAppExePath(), 'config.py' ) ): ckit.setDataPath( ckit.getAppExePath() ) else: ckit.setDataPath( os.path.join( ckit.getAppDataPath(), cmemo_resource.cmemo_dirname ) ) if not os.path.exists(ckit.dataPath()): os.mkdir(ckit.dataPath()) default_config_filename = os.path.join( ckit.getAppExePath(), '_config.py' )