Classes | |
class | TextEncoding |
テキストのエンコーディングを表すクラス More... | |
class | FileReaderLock |
ファイルが他のプロセスから変更されないように共有ロックするためのクラス More... | |
class | WordBreak |
単語区切り位置を検索するためのクラス More... | |
class | UnicodeRange |
Unicode の範囲を定義するためのクラス More... | |
Functions | |
def | adjustWindowPosition (new_window, base_rect, default_up=False, monitor_adjust_vertical=True, monitor_adjust_horizontal=True) |
ウインドウの位置を調整する More... | |
def | detectTextEncoding (data, maxlen=1024 *1024, maxline=1000, ascii_as=None) |
テキストのエンコードを検出する More... | |
def | removeBom (s) |
文字列中の最初のBOMを除去して返す More... | |
def | getArgv () |
Unicode 形式で sys.argv 相当の情報を取得する More... | |
def | getDesktopPath () |
デスクトップディレクトリを取得する More... | |
def | getAppExePath () |
アプリケーションの実行ファイルのパスを取得する More... | |
def | getAppDataPath () |
アプリケーションのデータディレクトリのパスを取得する More... | |
def | getDocumentsPath () |
ドキュメントディレクトリのパスを取得する More... | |
def | getProfilePath () |
ユーザプロファイルディレクトリのパスを取得する More... | |
def | getTempPath () |
テンポラリファイル用ディレクトリのパスを取得する More... | |
def | dataPath () |
アプリケーションのデータ格納用のパスを取得する More... | |
def | setDataPath (data_path) |
アプリケーションのデータ格納用のパスを設定する More... | |
def | getDrives () |
利用可能なドライブ文字を連結した文字列を取得する More... | |
def | getDriveType (drive) |
ドライブの種別を取得する More... | |
def | getDriveDisplayName (drive) |
ドライブの表示用の文字列を取得する More... | |
def | getFileAttribute (filename) |
ファイルの属性を取得する More... | |
def | setFileAttribute (filename, attribute) |
ファイルの属性を設定する More... | |
def | deleteFilesUsingRecycleBin (hwnd, filename_list) |
ゴミ箱を使ってファイルを削除する More... | |
def | getDiskSize (drive) |
ディスクの空き容量と全体の容量を取得する More... | |
def | getClipboardText () |
クリップボードのテキストを取得する More... | |
def | setClipboardText (text) |
クリップボードにテキストを設定する More... | |
def | getClipboardSequenceNumber () |
クリップボードのシーケンスナンバーを取得する More... | |
def | terminateProcess (pid) |
指定したプロセスIDのプロセスを終了する More... | |
def | adjustStringWidth (window, s, width, align=ALIGN_LEFT, ellipsis=ELLIPSIS_NONE) |
文字列を指定した長さに調節する More... | |
def | splitLines (window, src, width, keepends=False) |
文字列を改行コードの位置と、決まった幅の位置で分割する More... | |
def | expandTab (window, src, tab_width=4, offset=0) |
TAB文字をスペース文字に置き換える More... | |
def | setPathSlash (use_slash) |
ファイルパスのディレクトリ区切り文字を ¥と / で切り替える More... | |
def | pathSlash () |
ファイルパスのディレクトリ区切り文字を取得する More... | |
def | joinPath (*args) |
ファイルパスを連結する More... | |
def | splitPath (path) |
ファイルパスをディレクトリ名とファイル名に分離する More... | |
def | splitExt (path, maxlen=5) |
拡張子がN文字以下でASCII文字だけからなるときだけ分離する More... | |
def | rootPath (path) |
ファイルパスのルートディレクトリ部分を取得する More... | |
def | normPath (path) |
ファイルパスを標準化する More... | |
def | replacePath (path) |
ディレクトリ区切り文字とドライブ名の設定にしたがってパスを整形する More... | |
def | enableBeep (enable) |
警告音を有効/無効にする More... | |
def | messageBeep () |
警告音を再生する More... | |
def | makeTempDir (prefix) |
テンポラリディレクトリを作成する More... | |
def | makeTempFile (prefix, suffix="") |
テンポラリファイルを作成する More... | |
Variables | |
wordbreak_TextFile | |
テキストファイル用の単語区切り More... | |
wordbreak_Filename | |
ファイル名用の単語区切り More... | |
def keyhac_misc.adjustWindowPosition | ( | new_window, | |
base_rect, | |||
default_up = False , |
|||
monitor_adjust_vertical = True , |
|||
monitor_adjust_horizontal = True |
|||
) |
ウインドウの位置を調整する
def ckit.ckit_misc.detectTextEncoding | ( | data, | |
maxlen = 1024*1024 , |
|||
maxline = 1000 , |
|||
ascii_as = None |
|||
) |
テキストのエンコードを検出する
data | 検出する文字列 |
maxlen | 調査する最大byte数 |
maxline | 調査する最大行数 |
ascii_as | asciiだと検出された場合の代替のエンコーディング |
渡されたデータのエンコーディングを推測します。 以下のエンコーディングの可能性を調査します。
またバイナリデータであると推測された場合は、TextEncoding の encoding には None が入ります。
def ckit.ckit_misc.removeBom | ( | s | ) |
文字列中の最初のBOMを除去して返す
def ckit.ckit_misc.getArgv | ( | ) |
Unicode 形式で sys.argv 相当の情報を取得する
def ckit.ckit_misc.getDesktopPath | ( | ) |
デスクトップディレクトリを取得する
def ckit.ckit_misc.getAppExePath | ( | ) |
アプリケーションの実行ファイルのパスを取得する
def ckit.ckit_misc.getAppDataPath | ( | ) |
アプリケーションのデータディレクトリのパスを取得する
def ckit.ckit_misc.getDocumentsPath | ( | ) |
ドキュメントディレクトリのパスを取得する
def ckit.ckit_misc.getProfilePath | ( | ) |
ユーザプロファイルディレクトリのパスを取得する
def ckit.ckit_misc.getTempPath | ( | ) |
テンポラリファイル用ディレクトリのパスを取得する
def ckit.ckit_misc.dataPath | ( | ) |
アプリケーションのデータ格納用のパスを取得する
def ckit.ckit_misc.setDataPath | ( | data_path | ) |
アプリケーションのデータ格納用のパスを設定する
def ckit.ckit_misc.getDrives | ( | ) |
利用可能なドライブ文字を連結した文字列を取得する
def ckit.ckit_misc.getDriveType | ( | drive | ) |
ドライブの種別を取得する
def ckit.ckit_misc.getDriveDisplayName | ( | drive | ) |
ドライブの表示用の文字列を取得する
"C:\" の形式で渡す必要があります
def ckit.ckit_misc.getFileAttribute | ( | filename | ) |
ファイルの属性を取得する
def ckit.ckit_misc.setFileAttribute | ( | filename, | |
attribute | |||
) |
ファイルの属性を設定する
def ckit.ckit_misc.deleteFilesUsingRecycleBin | ( | hwnd, | |
filename_list | |||
) |
ゴミ箱を使ってファイルを削除する
def ckit.ckit_misc.getDiskSize | ( | drive | ) |
ディスクの空き容量と全体の容量を取得する
def ckit.ckit_misc.getClipboardText | ( | ) |
クリップボードのテキストを取得する
def ckit.ckit_misc.setClipboardText | ( | text | ) |
クリップボードにテキストを設定する
text | クリップボードに設定する文字列 |
def ckit.ckit_misc.getClipboardSequenceNumber | ( | ) |
クリップボードのシーケンスナンバーを取得する
def ckit.ckit_misc.terminateProcess | ( | pid | ) |
指定したプロセスIDのプロセスを終了する
def ckit.ckit_misc.adjustStringWidth | ( | window, | |
s, | |||
width, | |||
align = ALIGN_LEFT , |
|||
ellipsis = ELLIPSIS_NONE |
|||
) |
文字列を指定した長さに調節する
def ckit.ckit_misc.splitLines | ( | window, | |
src, | |||
width, | |||
keepends = False |
|||
) |
文字列を改行コードの位置と、決まった幅の位置で分割する
def ckit.ckit_misc.expandTab | ( | window, | |
src, | |||
tab_width = 4 , |
|||
offset = 0 |
|||
) |
TAB文字をスペース文字に置き換える
def ckit.ckit_misc.setPathSlash | ( | use_slash | ) |
ファイルパスのディレクトリ区切り文字を ¥と / で切り替える
use_slash | True:/を使用する False:¥を使用する |
normPath や joinPath で使用されるディレクトリ区切り文字を設定します。
def ckit.ckit_misc.pathSlash | ( | ) |
ファイルパスのディレクトリ区切り文字を取得する
normPath や joinPath で使用されるディレクトリ区切り文字を取得します。
def ckit.ckit_misc.joinPath | ( | * | args | ) |
ファイルパスを連結する
*args | 連結される任意の個数のパス |
ファイルパスの連結処理に加えて、ディレクトリ区切り文字の \ と / の置き換え処理も行います。
def ckit.ckit_misc.splitPath | ( | path | ) |
ファイルパスをディレクトリ名とファイル名に分離する
path | 分離されるパス |
動作は os.path.split と同じです。
def ckit.ckit_misc.splitExt | ( | path, | |
maxlen = 5 |
|||
) |
拡張子がN文字以下でASCII文字だけからなるときだけ分離する
path | 分離されるパス |
maxlen | 拡張子とみなす最大の長さ (ピリオドを含む) |
この関数の動きは os.path.splitext() に似せてありますが、 os.path.splitext() とは違い、長い拡張子を分離しないことが出来ます。
def ckit.ckit_misc.rootPath | ( | path | ) |
ファイルパスのルートディレクトリ部分を取得する
path | 元になるパス |
def ckit.ckit_misc.normPath | ( | path | ) |
ファイルパスを標準化する
path | 元になるパス |
os.path.normpath() 相当の処理に加え、ディレクトリ区切り文字の \ と / の置き換え処理を行います。
def ckit.ckit_misc.replacePath | ( | path | ) |
ディレクトリ区切り文字とドライブ名の設定にしたがってパスを整形する
path | 元になるパス |
ディレクトリ区切り文字の \ と / の置き換え処理を行います。 ドライブ名の大文字/小文字の変換処理を行います。
def ckit.ckit_misc.enableBeep | ( | enable | ) |
警告音を有効/無効にする
def ckit.ckit_misc.messageBeep | ( | ) |
警告音を再生する
def ckit.ckit_misc.makeTempDir | ( | prefix | ) |
テンポラリディレクトリを作成する
def ckit.ckit_misc.makeTempFile | ( | prefix, | |
suffix = "" |
|||
) |
テンポラリファイルを作成する
wordbreak_TextFile |