How to use setString method in pyatom

Best Python code snippet using pyatom_python

lredit_resource.py

Source:lredit_resource.py Github

copy

Full Screen

...1112def startupString():13 return _startup_string_fmt % ( lredit_appname, lredit_version )1415ckit.strings.setString( "common_yes",16 en_US = "Yes",17 ja_JP = "はい" )18ckit.strings.setString( "common_no",19 en_US = "No",20 ja_JP = "いいえ" )21ckit.strings.setString( "common_done",22 en_US = "Done.",23 ja_JP = "完了." )24ckit.strings.setString( "common_aborted",25 en_US = "Aborted.",26 ja_JP = "中断しました." )27ckit.strings.setString( "common_failed",28 en_US = "Failed.",29 ja_JP = "失敗." )3031ckit.strings.setString( "menu_file",32 en_US = "&File",33 ja_JP = "ファイル(&F)" )34ckit.strings.setString( "menu_new",35 en_US = "&New",36 ja_JP = "新規作成(&N)" )37ckit.strings.setString( "menu_open",38 en_US = "&Open",39 ja_JP = "開く(&O)" )40ckit.strings.setString( "menu_reopen",41 en_US = "&Reopen",42 ja_JP = "開き直す(&R)" )43ckit.strings.setString( "menu_close",44 en_US = "&Close",45 ja_JP = "閉じる(&C)" )46ckit.strings.setString( "menu_project",47 en_US = "&Project",48 ja_JP = "プロジェクト(&P)" )49ckit.strings.setString( "menu_open_project",50 en_US = "&Open",51 ja_JP = "開く(&O)" )52ckit.strings.setString( "menu_close_project",53 en_US = "&Close",54 ja_JP = "閉じる(&C)" )55ckit.strings.setString( "menu_edit_project",56 en_US = "&Edit",57 ja_JP = "編集(&E)" )58ckit.strings.setString( "menu_project_file_list",59 en_US = "Project &File List",60 ja_JP = "プロジェクトファイル一覧(&F)" )61ckit.strings.setString( "menu_save",62 en_US = "&Save",63 ja_JP = "保存(&S)" )64ckit.strings.setString( "menu_save_as",65 en_US = "Save &As",66 ja_JP = "名前を付けて保存(&A)" )67ckit.strings.setString( "menu_save_all",68 en_US = "Save A&ll",69 ja_JP = "すべて保存(&L)" )70ckit.strings.setString( "menu_encoding",71 en_US = "&Encoding",72 ja_JP = "エンコーディング(&E)" )73ckit.strings.setString( "menu_recent_files",74 en_US = "Recent F&iles",75 ja_JP = "最近のファイル(&I)" )76ckit.strings.setString( "menu_recent_projects",77 en_US = "Recent Pro&jects",78 ja_JP = "最近のプロジェクト(&J)" )79ckit.strings.setString( "menu_quit",80 en_US = "&Quit",81 ja_JP = "終了(&Q)" )8283ckit.strings.setString( "menu_edit",84 en_US = "&Edit",85 ja_JP = "編集(&E)" )86ckit.strings.setString( "menu_undo",87 en_US = "&Undo",88 ja_JP = "元に戻す(&U)" )89ckit.strings.setString( "menu_redo",90 en_US = "&Redo",91 ja_JP = "やり直し(&R)" )92ckit.strings.setString( "menu_cut",93 en_US = "Cu&t",94 ja_JP = "切り取り(&T)" )95ckit.strings.setString( "menu_copy",96 en_US = "&Copy",97 ja_JP = "コピー(&C)" )98ckit.strings.setString( "menu_paste",99 en_US = "&Paste",100 ja_JP = "貼り付け(&P)" )101ckit.strings.setString( "menu_delete",102 en_US = "&Delete",103 ja_JP = "削除(&D)" )104ckit.strings.setString( "menu_select_all",105 en_US = "Select A&ll",106 ja_JP = "すべてを選択(&L)" )107ckit.strings.setString( "menu_convert_char",108 en_US = "Con&vert",109 ja_JP = "文字変換(&V)" )110ckit.strings.setString( "menu_to_upper",111 en_US = "&Uppercase",112 ja_JP = "大文字化(&U)" )113ckit.strings.setString( "menu_to_lower",114 en_US = "&Lowercase",115 ja_JP = "小文字化(&L)" )116ckit.strings.setString( "menu_to_zenkaku",117 en_US = "&Zenkaku",118 ja_JP = "全角に変換(&Z)" )119ckit.strings.setString( "menu_to_hankaku",120 en_US = "&Hankaku",121 ja_JP = "半角に変換(&H)" )122ckit.strings.setString( "menu_complete",123 en_US = "&Word Completion",124 ja_JP = "単語補完(&W)" )125ckit.strings.setString( "menu_jump_lineno",126 en_US = "&Goto Line",127 ja_JP = "指定行ジャンプ(&G)" )128129ckit.strings.setString( "menu_search",130 en_US = "&Search",131 ja_JP = "検索(&S)" )132ckit.strings.setString( "menu_search_next",133 en_US = "Search &Next",134 ja_JP = "次を検索(&N)" )135ckit.strings.setString( "menu_search_prev",136 en_US = "Search &Prev",137 ja_JP = "前を検索(&P)" )138ckit.strings.setString( "menu_grep",139 en_US = "&Grep",140 ja_JP = "ファイルから検索(&G)" )141ckit.strings.setString( "menu_tags",142 en_US = "S&ymbol Search",143 ja_JP = "シンボル検索(&Y)" )144ckit.strings.setString( "menu_tags_jump",145 en_US = "&Jump to Definition",146 ja_JP = "定義位置へジャンプ(&J)" )147ckit.strings.setString( "menu_tags_back",148 en_US = "&Back to Original Position",149 ja_JP = "ジャンプ元へ戻る(&B)" )150ckit.strings.setString( "menu_load_tags",151 en_US = "&Load TAGS",152 ja_JP = "TAGSの読み込み(&L)" )153ckit.strings.setString( "menu_generate_tags",154 en_US = "&Generate TAGS",155 ja_JP = "TAGSの生成(&G)" )156ckit.strings.setString( "menu_replace",157 en_US = "&Replace",158 ja_JP = "置換(&R)" )159ckit.strings.setString( "menu_compare",160 en_US = "&Compare",161 ja_JP = "比較(&C)" )162163ckit.strings.setString( "menu_view",164 en_US = "&View",165 ja_JP = "表示(&V)" )166ckit.strings.setString( "menu_another_pane",167 en_US = "&Another Pane",168 ja_JP = "他方のペイン(&A)" )169ckit.strings.setString( "menu_doclist",170 en_US = "&Document List",171 ja_JP = "文書選択(&D)" )172173ckit.strings.setString( "menu_tool",174 en_US = "&Tool",175 ja_JP = "ツール(&T)" )176ckit.strings.setString( "menu_bookmark_list",177 en_US = "&Bookmark List",178 ja_JP = "ブックマーク一覧(&B)" )179ckit.strings.setString( "menu_bookmark1",180 en_US = "Bookmark&1",181 ja_JP = "ブックマーク1(&1)" )182ckit.strings.setString( "menu_bookmark2",183 en_US = "Bookmark&2",184 ja_JP = "ブックマーク2(&2)" )185ckit.strings.setString( "menu_bookmark3",186 en_US = "Bookmark&3",187 ja_JP = "ブックマーク3(&3)" )188ckit.strings.setString( "menu_bookmark_next",189 en_US = "&Next Bookmark",190 ja_JP = "次のブックマークへ(&N)" )191ckit.strings.setString( "menu_bookmark_prev",192 en_US = "&Prev Bookmark",193 ja_JP = "前のブックマークへ(&P)" )194ckit.strings.setString( "menu_outline",195 en_US = "&Outline",196 ja_JP = "アウトライン(&O)" )197ckit.strings.setString( "menu_expand_tab",198 en_US = "Expand &Tab",199 ja_JP = "タブをスペースに展開(&T)" )200ckit.strings.setString( "menu_remove_trailing_space",201 en_US = "Remove Trailing &Space",202 ja_JP = "行末の空白を削除(&S)" )203ckit.strings.setString( "menu_remove_empty_lines",204 en_US = "Remove &Empty Lines",205 ja_JP = "空行を削除(&E)" )206ckit.strings.setString( "menu_remove_marked_lines",207 en_US = "Remove &Marked Lines",208 ja_JP = "ブックマークされている行を削除(&M)" )209ckit.strings.setString( "menu_remove_unmarked_lines",210 en_US = "Remove &Unmarked Lines",211 ja_JP = "ブックマークされていない行を削除(&U)" )212ckit.strings.setString( "menu_config_menu",213 en_US = "&Config",214 ja_JP = "設定(&C)" )215ckit.strings.setString( "menu_config_edit",216 en_US = "&Edit config.py",217 ja_JP = "config.pyの編集(&E)" )218ckit.strings.setString( "menu_config_reload",219 en_US = "&Reload config.py",220 ja_JP = "config.pyの再読み込み(&R)" )221222ckit.strings.setString( "menu_help",223 en_US = "&Help",224 ja_JP = "ヘルプ(&H)" )225ckit.strings.setString( "menu_about",226 en_US = "&About",227 ja_JP = "バージョン情報(&A)" )228229ckit.strings.setString( "config_menu",230 en_US = "Configuration Menu",231 ja_JP = "設定メニュー" )232ckit.strings.setString( "display_option",233 en_US = "Display Options",234 ja_JP = "表示オプション" )235ckit.strings.setString( "operation_option",236 en_US = "Operation Options",237 ja_JP = "操作オプション" )238ckit.strings.setString( "misc_option",239 en_US = "Misc Options",240 ja_JP = "その他のオプション" )241ckit.strings.setString( "theme",242 en_US = "Theme",243 ja_JP = "テーマ" )244ckit.strings.setString( "font",245 en_US = "Font",246 ja_JP = "フォント" )247ckit.strings.setString( "font_size",248 en_US = "Font Size",249 ja_JP = "フォントサイズ" )250ckit.strings.setString( "visible",251 en_US = "Visible",252 ja_JP = "表示" )253ckit.strings.setString( "invisible",254 en_US = "Invisible",255 ja_JP = "非表示" )256ckit.strings.setString( "menubar",257 en_US = "Menu Bar",258 ja_JP = "メニューバー" )259ckit.strings.setString( "menubar_visibility",260 en_US = "Menu Bar Visibility",261 ja_JP = "メニューバーの表示" )262ckit.strings.setString( "wallpaper",263 en_US = "Wallpaper",264 ja_JP = "壁紙" )265ckit.strings.setString( "wallpaper_visibility",266 en_US = "Wallpaper Visibility",267 ja_JP = "壁紙の表示" )268ckit.strings.setString( "wallpaper_strength",269 en_US = "Wallpaper Strength",270 ja_JP = "壁紙の濃さ" )271ckit.strings.setString( "application_name",272 en_US = "Application Name",273 ja_JP = "アプリケーション名" )274ckit.strings.setString( "locale",275 en_US = "Display Language",276 ja_JP = "表示言語" )277ckit.strings.setString( "locale_en_US",278 en_US = "English",279 ja_JP = "英語" )280ckit.strings.setString( "locale_ja_JP",281 en_US = "Japanese",282 ja_JP = "日本語" )283ckit.strings.setString( "isearch_type",284 en_US = "Incremental Search Behavior",285 ja_JP = "インクリメンタルサーチ動作" )286ckit.strings.setString( "isearch_type_strict",287 en_US = "Strict : ABC*",288 ja_JP = "厳密 : ABC*" )289ckit.strings.setString( "isearch_type_partial",290 en_US = "Partial : *ABC*",291 ja_JP = "部分一致 : *ABC*" )292ckit.strings.setString( "isearch_type_inaccurate",293 en_US = "Inaccurate : *A*B*C*",294 ja_JP = "あいまい : *A*B*C*" )295ckit.strings.setString( "isearch_type_migemo",296 en_US = "Migemo : *AIUEO*",297 ja_JP = "Migemo : *AIUEO*" )298ckit.strings.setString( "beep_type",299 en_US = "Beep Sound",300 ja_JP = "ビープ音" )301ckit.strings.setString( "beep_type_disabled",302 en_US = "Diabled",303 ja_JP = "無効" )304ckit.strings.setString( "beep_type_enabled",305 en_US = "Enabled",306 ja_JP = "有効" )307ckit.strings.setString( "directory_separator",308 en_US = "Directory Separator",309 ja_JP = "ディレクトリ区切り文字" )310ckit.strings.setString( "directory_separator_slash",311 en_US = "Slash : / ",312 ja_JP = "スラッシュ : / " )313ckit.strings.setString( "directory_separator_backslash",314 en_US = "BackSlash : \\ ",315 ja_JP = "バックスラッシュ : \\ " )316ckit.strings.setString( "drive_case",317 en_US = "Case of Drive Letter",318 ja_JP = "ドライブ文字の大文字/小文字" )319ckit.strings.setString( "drive_case_nocare",320 en_US = "Don't care",321 ja_JP = "気にしない" )322ckit.strings.setString( "drive_case_upper",323 en_US = "Upper case",324 ja_JP = "大文字" )325ckit.strings.setString( "drive_case_lower",326 en_US = "Lower case",327 ja_JP = "小文字" )328ckit.strings.setString( "edit_config",329 en_US = "Edit config.py",330 ja_JP = "config.py を編集" )331ckit.strings.setString( "reload_config",332 en_US = "Reload config.py",333 ja_JP = "config.py を再読み込み" )334335ckit.strings.setString( "msgbox_title_generic_error",336 en_US = "Error",337 ja_JP = "エラー" )338ckit.strings.setString( "msgbox_title_insert_task",339 en_US = "Task Order",340 ja_JP = "タスクの処理順序の確認" )341ckit.strings.setString( "msgbox_ask_insert_task",342 en_US = "proceed preferentially?",343 ja_JP = "優先的に処理を行いますか?" )344ckit.strings.setString( "msgbox_title_save",345 en_US = "Save",346 ja_JP = "保存確認" )347ckit.strings.setString( "msgbox_ask_save_document",348 en_US = "Save [%s] ?",349 ja_JP = "[%s] を保存しますか?" )350ckit.strings.setString( "msgbox_title_modified_reload",351 en_US = "Reload",352 ja_JP = "再読み込み確認" )353ckit.strings.setString( "msgbox_ask_modified_reload",354 en_US = "%s is modified from outside. Reload this file?",355 ja_JP = "%sが外部で変更されています。再読み込みしますか?" )356ckit.strings.setString( "msgbox_title_wallpaper_error",357 en_US = "Wallpaper",358 ja_JP = "壁紙のエラー" )359ckit.strings.setString( "msgbox_wallpaper_filename_empty",360 en_US = "Using Wallpaper command, specify the filename of wallpaper.",361 ja_JP = "Wallpaperコマンドを使って、壁紙ファイルを指定してください。" )362ckit.strings.setString( "msgbox_title_modified_reopen",363 en_US = "Reopen",364 ja_JP = "変更内容破棄の確認" )365ckit.strings.setString( "msgbox_ask_modified_reopen",366 en_US = "%s is modified. Is it OK to destroy this modification and reopen this file?",367 ja_JP = "%sは変更されていますが、開きなおしますか?" )368ckit.strings.setString( "msgbox_title_new_window",369 en_US = "New LREdit window",370 ja_JP = "新規 LREdit ウインドウの確認" )371ckit.strings.setString( "msgbox_ask_new_window",372 en_US = "Open a new window?",373 ja_JP = "新しいウインドウを開きますか?" )374 375ckit.strings.setString( "statusbar_task_reserved",376 en_US = "Reserved task : %s",377 ja_JP = "タスクを予約しました : %s" )378ckit.strings.setString( "statusbar_open_failed",379 en_US = "Open failed : %s",380 ja_JP = "オープン失敗 : %s" )381ckit.strings.setString( "statusbar_switch_doc_failed",382 en_US = "Wwitching document failed : %s",383 ja_JP = "ドキュメント切り替え失敗 : %s" )384ckit.strings.setString( "statusbar_regex_wrong",385 en_US = "Regular expression [%s] is wrong.",386 ja_JP = "正規表現 [%s] に誤りがあります." )387ckit.strings.setString( "statusbar_aborted",388 en_US = "Aborted Task.",389 ja_JP = "タスクを中断しました." )390ckit.strings.setString( "statusbar_grep_finished",391 en_US = "Grep : found %d lines.",392 ja_JP = "Grep : %d 件ヒットしました." )393ckit.strings.setString( "statusbar_replace_finished",394 en_US = "Replace : Replaced %d places.",395 ja_JP = "Replace : %d 箇所置換しました." )396ckit.strings.setString( "statusbar_not_saved",397 en_US = "Not saved.",398 ja_JP = "ファイルが保存されていません." )399ckit.strings.setString( "statusbar_jump_failed",400 en_US = "Jump failed.",401 ja_JP = "ジャンプできません." )402ckit.strings.setString( "statusbar_symbol_not_found",403 en_US = "Symbol [%s] is not found.",404 ja_JP = "シンボル [%s] の定義位置が見つかりません." )405ckit.strings.setString( "statusbar_tags_generating",406 en_US = "Generating Tags.",407 ja_JP = "Tags ファイルを生成中." )408ckit.strings.setString( "statusbar_tags_generated",409 en_US = "Generated Tags.",410 ja_JP = "Tags ファイルを生成しました." )411ckit.strings.setString( "statusbar_tags_loading",412 en_US = "Loading Tags.",413 ja_JP = "Tags ロード中." )414ckit.strings.setString( "statusbar_tags_loaded",415 en_US = "Loaded Tags.",416 ja_JP = "Tags ファイルをロードしました." )417ckit.strings.setString( "statusbar_project_opened",418 en_US = "Opened project file : %s",419 ja_JP = "プロジェクトファイルをオープンしました : %s" )420ckit.strings.setString( "statusbar_project_closed",421 en_US = "Closed project file.",422 ja_JP = "プロジェクトファイルをクローズしました." )423 424ckit.strings.setString( "not_textfile",425 en_US = "Not a text file.",426 ja_JP = "テキストファイルではありません." )427ckit.strings.setString( "saving",428 en_US = "Saving...",429 ja_JP = "保存中..." )430ckit.strings.setString( "memory_statistics",431 en_US = "Memory Statistics",432 ja_JP = "メモリ統計情報" )433ckit.strings.setString( "config_reloaded",434 en_US = "Config file reloaded.",435 ja_JP = "設定スクリプトをリロードしました." )436ckit.strings.setString( "project_reloaded",437 en_US = "Project file reloaded.",438 ja_JP = "プロジェクトファイルをリロードしました." )439ckit.strings.setString( "help_opening",440 en_US = "Opening Help...",441 ja_JP = "Helpを起動" )442ckit.strings.setString( "project_not_opened",443 en_US = "Project is not opened.",444 ja_JP = "プロジェクトファイルがオープンされていません." )445ckit.strings.setString( "mode_not_found",446 en_US = "Mode [%s] is not found.",447 ja_JP = "モード [%s] が見つかりません." )448ckit.strings.setString( "mode_enabled",449 en_US = "Mode [%s] is enabled.",450 ja_JP = "モード [%s] を有効にしました." )451ckit.strings.setString( "mode_disabled",452 en_US = "Mode [%s] is disabled.",453 ja_JP = "モード [%s] を無効にしました." )454455ckit.strings.setString( "error_prefix",456 en_US = "ERROR : ",457 ja_JP = "ERROR : " )458ckit.strings.setString( "error_already_exists",459 en_US = "ERROR : Already exists.",460 ja_JP = "ERROR : すでに存在しています." )461ckit.strings.setString( "error_ini_file_load_failed",462 en_US = "ERROR : loading INI file failed.",463 ja_JP = "ERROR : INIファイルの読み込み中にエラーが発生しました." )464ckit.strings.setString( "error_connection_failed",465 en_US = "ERROR : Connection failed : %s",466 ja_JP = "ERROR : 接続失敗 : %s" )467ckit.strings.setString( "error_open_failed",468 en_US = "ERROR : Open failed : %s",469 ja_JP = "ERROR : オープン失敗 : %s" )470ckit.strings.setString( "error_load_failed",471 en_US = "ERROR : Load failed : %s",472 ja_JP = "ERROR : ロード失敗 : %s" )473ckit.strings.setString( "error_out_of_memory",474 en_US = "ERROR : Out of memory : %s",475 ja_JP = "ERROR : メモリ不足 : %s" )476ckit.strings.setString( "error_invalid_wallpaper",477 en_US = "ERROR : Invalid wallpaper file : %s",478 ja_JP = "ERROR : 壁紙ファイルとして使用できない : %s" )479ckit.strings.setString( "error_unknown_parameter",480 en_US = "ERROR : Unknown parameter : %s",481 ja_JP = "ERROR : 不明なパラメタ : %s" )482ckit.strings.setString( "error_unknown_encoding",483 en_US = "ERROR : Unknown encording name : %s",484 ja_JP = "ERROR : 不明なエンコーディング名 : %s" )485ckit.strings.setString( "error_unknown_lineend",486 en_US = "ERROR : Unknown line end name : %s",487 ja_JP = "ERROR : 不明な改行コード : %s" )488489490def setLocale(locale):491 ckit.strings.setLocale(locale) ...

Full Screen

Full Screen

Query.py

Source:Query.py Github

copy

Full Screen

...12 # Collator #13 ############14 def query_collator_ascii(self, ignore_case):15 args = Args()16 args.setString("ignoreCase", ignore_case)17 return self._client.invokeMethod("collator_ascii", args)18 def query_collator_unicode(self, ignore_case, ignore_accents):19 args = Args()20 args.setString("ignoreCase", ignore_case)21 args.setString("ignoreAccents", ignore_accents)22 return self._client.invokeMethod("collator_unicode", args)23 def query_expression_property(self, prop):24 args = Args()25 args.setString("property", prop)26 return self._client.invokeMethod("expression_property", args)27 def query_datasource_database(self, database):28 args = Args()29 args.setString("database", database)30 return self._client.invokeMethod("datasource_database", args)31 def query_create(self, select_prop, from_prop, whr_key_prop):32 args = Args()33 args.setString("select_prop", select_prop)34 args.setMemoryPointer("from_prop", from_prop)35 args.setString("whr_key_prop", whr_key_prop)36 return self._client.invokeMethod("query_create", args)37 def query_run(self, query):38 args = Args()39 args.setString("query", query)40 return self._client.invokeMethod("query_run", args)41 def query_next_result(self, query_result_set):42 args = Args()43 args.setString("query_result_set", query_result_set)44 return self._client.invokeMethod("query_nextResult", args)45 def query_result_string(self, query_result, key):46 args = Args()47 args.setString("query_result", query_result)48 args.setString("key", key)49 return self._client.invokeMethod("result_getString", args)50 def query_select_result_expression_create(self, expression):51 args = Args()52 args.setMemoryPointer("expression", expression)53 return self._client.invokeMethod("selectResult_expressionCreate", args)54 def query_select_result_all_create(self):55 return self._client.invokeMethod("selectResult_all")56 def query_expression_meta_id(self):57 return self._client.invokeMethod("expression_metaId")58 def query_expression_meta_sequence(self):59 return self._client.invokeMethod("expression_metaSequence")60 def create_equalTo_expression(self, expression1, expression2):61 args = Args()62 args.setMemoryPointer("expression1", expression1)63 args.setMemoryPointer("expression2", expression2)64 return self._client.invokeMethod("expression_createEqualTo", args)65 def create_and_expression(self, expression1, expression2):66 args = Args()67 args.setMemoryPointer("expression1", expression1)68 args.setMemoryPointer("expression2", expression2)69 return self._client.invokeMethod("expression_createAnd", args)70 def create_or_expression(self, expression1, expression2):71 args = Args()72 args.setMemoryPointer("expression1", expression1)73 args.setMemoryPointer("expression2", expression2)74 return self._client.invokeMethod("expression_createOr", args)75 def query_get_doc(self, database, doc_id):76 args = Args()77 args.setMemoryPointer("database", database)78 args.setString("doc_id", doc_id)79 return self._client.invokeMethod("query_getDoc", args)80 def query_get_docs_limit_offset(self, database, limit, offset):81 args = Args()82 args.setMemoryPointer("database", database)83 args.setInt("limit", limit)84 args.setInt("offset", offset)85 return self._client.invokeMethod("query_docsLimitOffset", args)86 def query_multiple_selects(self, database, select_property1, select_property2, whr_key, whr_val):87 args = Args()88 args.setMemoryPointer("database", database)89 args.setString("select_property1", select_property1)90 args.setString("select_property2", select_property2)91 args.setString("whr_key", whr_key)92 args.setString("whr_val", whr_val)93 return self._client.invokeMethod("query_multipleSelects", args)94 def query_multiple_selects_forDoubleValue(self, database, select_property1, select_property2, whr_key, whr_val):95 args = Args()96 args.setMemoryPointer("database", database)97 args.setString("select_property1", select_property1)98 args.setString("select_property2", select_property2)99 args.setString("whr_key", whr_key)100 args.setFloat("whr_val", whr_val)101 return self._client.invokeMethod("query_multipleSelectsDoubleValue", args)102 def query_multiple_selects_OrderByLocaleValue(self, database, select_property1, select_property2, whr_key, locale):103 args = Args()104 args.setMemoryPointer("database", database)105 args.setString("select_property1", select_property1)106 args.setString("select_property2", select_property2)107 args.setString("whr_key", whr_key)108 args.setString("locale", locale)109 return self._client.invokeMethod("query_multipleSelectsOrderByLocaleValue", args)110 def query_where_and_or(self, database, whr_key1, whr_val1, whr_key2, whr_val2, whr_key3, whr_val3, whr_key4, whr_val4):111 args = Args()112 args.setMemoryPointer("database", database)113 args.setString("whr_key1", whr_key1)114 args.setString("whr_val1", whr_val1)115 args.setString("whr_key2", whr_key2)116 args.setString("whr_val2", whr_val2)117 args.setString("whr_key3", whr_key3)118 args.setString("whr_val3", whr_val3)119 args.setString("whr_key4", whr_key4)120 args.setBoolean("whr_val4", whr_val4)121 return self._client.invokeMethod("query_whereAndOr", args)122 def query_like(self, database, whr_key, whr_val, select_property1, select_property2, like_key, like_val):123 args = Args()124 args.setMemoryPointer("database", database)125 args.setString("whr_key", whr_key)126 args.setString("select_property1", select_property1)127 args.setString("select_property2", select_property2)128 args.setString("whr_val", whr_val)129 args.setString("like_key", like_key)130 args.setString("like_val", like_val)131 return self._client.invokeMethod("query_like", args)132 def query_regex(self, database, whr_key, whr_val, select_property1, select_property2, regex_key, regex_val):133 args = Args()134 args.setMemoryPointer("database", database)135 args.setString("whr_key", whr_key)136 args.setString("select_property1", select_property1)137 args.setString("select_property2", select_property2)138 args.setString("whr_val", whr_val)139 args.setString("regex_key", regex_key)140 args.setString("regex_val", regex_val)141 return self._client.invokeMethod("query_regex", args)142 def query_isNullOrMissing(self, database, select_property1, limit):143 args = Args()144 args.setMemoryPointer("database", database)145 args.setString("select_property1", select_property1)146 args.setInt("limit", limit)147 return self._client.invokeMethod("query_isNullOrMissing", args)148 def query_ordering(self, database, select_property1, whr_key, whr_val):149 args = Args()150 args.setMemoryPointer("database", database)151 args.setString("select_property1", select_property1)152 args.setString("whr_key", whr_key)153 args.setString("whr_val", whr_val)154 return self._client.invokeMethod("query_ordering", args)155 def query_substring(self, database, select_property1, select_property2, substring):156 args = Args()157 args.setMemoryPointer("database", database)158 args.setString("select_property1", select_property1)159 args.setString("select_property2", select_property2)160 args.setString("substring", substring)161 return self._client.invokeMethod("query_substring", args)162 def query_collation(self, database, select_property1, whr_key1, whr_val1, whr_key2, whr_val2, equal_to):163 args = Args()164 args.setMemoryPointer("database", database)165 args.setString("select_property1", select_property1)166 args.setString("whr_key1", whr_key1)167 args.setString("whr_val1", whr_val1)168 args.setString("whr_key2", whr_key2)169 args.setString("whr_val2", whr_val2)170 args.setString("equal_to", equal_to)171 return self._client.invokeMethod("query_collation", args)172 def query_join(self, database, select_property1, select_property2,173 select_property3, select_property4, select_property5,174 whr_key1, whr_key2, whr_key3, whr_val1, whr_val2,175 whr_val3, join_key):176 args = Args()177 args.setMemoryPointer("database", database)178 args.setString("select_property1", select_property1)179 args.setString("select_property2", select_property2)180 args.setString("select_property3", select_property3)181 args.setString("select_property4", select_property4)182 args.setString("select_property5", select_property5)183 args.setString("whr_key1", whr_key1)184 args.setString("whr_key2", whr_key2)185 args.setString("whr_key3", whr_key3)186 args.setString("join_key", join_key)187 args.setString("whr_val1", whr_val1)188 args.setString("whr_val2", whr_val2)189 args.setString("whr_val3", whr_val3)190 return self._client.invokeMethod("query_join", args)191 def query_left_join(self, database, select_property, limit=100):192 args = Args()193 args.setMemoryPointer("database", database)194 args.setString("select_property", select_property)195 args.setInt("limit", limit)196 return self._client.invokeMethod("query_leftJoin", args)197 def query_left_outer_join(self, database, select_property):198 args = Args()199 args.setMemoryPointer("database", database)200 args.setString("select_property", select_property)201 return self._client.invokeMethod("query_leftOuterJoin", args)202 def query_inner_join(self, database, select_property1, select_property2,203 select_property3, whr_key1, whr_key2, whr_val1, whr_val2,204 join_key1, join_key2, limit=10):205 args = Args()206 args.setMemoryPointer("database", database)207 args.setString("select_property1", select_property1)208 args.setString("select_property2", select_property2)209 args.setString("select_property3", select_property3)210 args.setString("join_key1", join_key1)211 args.setString("join_key2", join_key2)212 args.setString("whr_key1", whr_key1)213 args.setString("whr_key2", whr_key2)214 args.setString("whr_val1", whr_val1)215 args.setInt("whr_val2", whr_val2)216 args.setInt("limit", limit)217 return self._client.invokeMethod("query_innerJoin", args)218 def query_cross_join(self, database, select_property1, select_property2,219 whr_key1, whr_key2, whr_val1, whr_val2, limit=10):220 args = Args()221 args.setMemoryPointer("database", database)222 args.setString("select_property1", select_property1)223 args.setString("select_property2", select_property2)224 args.setString("whr_key1", whr_key1)225 args.setString("whr_key2", whr_key2)226 args.setString("whr_val1", whr_val1)227 args.setString("whr_val2", whr_val2)228 args.setInt("limit", limit)229 return self._client.invokeMethod("query_crossJoin", args)230 def query_between(self, database, prop, val1, val2):231 args = Args()232 args.setMemoryPointer("database", database)233 args.setString("prop", prop)234 args.setInt("val1", val1)235 args.setInt("val2", val2)236 return self._client.invokeMethod("query_between", args)237 def query_equal_to(self, database, prop, val):238 args = Args()239 args.setMemoryPointer("database", database)240 args.setString("prop", prop)241 args.setString("val", val)242 return self._client.invokeMethod("query_equalTo", args)243 def query_greater_than_or_equal_to(self, database, prop, val):244 args = Args()245 args.setMemoryPointer("database", database)246 args.setString("prop", prop)247 args.setInt("val", val)248 return self._client.invokeMethod("query_greaterThanOrEqualTo", args)249 def query_greater_than(self, database, prop, val):250 args = Args()251 args.setMemoryPointer("database", database)252 args.setString("prop", prop)253 args.setInt("val", val)254 return self._client.invokeMethod("query_greaterThan", args)255 def query_less_than(self, database, prop, val):256 args = Args()257 args.setMemoryPointer("database", database)258 args.setString("prop", prop)259 args.setInt("val", val)260 return self._client.invokeMethod("query_lessThan", args)261 def query_less_than_or_equal_to(self, database, prop, val):262 args = Args()263 args.setMemoryPointer("database", database)264 args.setString("prop", prop)265 args.setInt("val", val)266 return self._client.invokeMethod("query_lessThanOrEqualTo", args)267 def query_in(self, database, prop, val1, val2):268 args = Args()269 args.setMemoryPointer("database", database)270 args.setString("prop", prop)271 args.setString("val1", val1)272 args.setString("val2", val2)273 return self._client.invokeMethod("query_in", args)274 def query_is(self, database, prop):275 args = Args()276 args.setMemoryPointer("database", database)277 args.setString("prop", prop)278 return self._client.invokeMethod("query_is", args)279 def query_isNot(self, database, prop):280 args = Args()281 args.setMemoryPointer("database", database)282 args.setString("prop", prop)283 return self._client.invokeMethod("query_isNot", args)284 def query_any_operator(self, database, schedule, departure, departure_prop, departure_val, whr_prop, whr_val):285 args = Args()286 args.setMemoryPointer("database", database)287 args.setString("schedule", schedule)288 args.setString("departure", departure)289 args.setString("departure_prop", departure_prop)290 args.setString("departure_val", departure_val)291 args.setString("whr_prop", whr_prop)292 args.setString("whr_val", whr_val)293 return self._client.invokeMethod("query_anyOperator", args)294 def query_not(self, database, prop, val1, val2):295 args = Args()296 args.setMemoryPointer("database", database)297 args.setString("prop", prop)298 args.setInt("val1", val1)299 args.setInt("val2", val2)300 return self._client.invokeMethod("query_not", args)301 def query_not_equal_to(self, database, prop, val):302 args = Args()303 args.setMemoryPointer("database", database)304 args.setString("prop", prop)305 args.setString("val", val)306 return self._client.invokeMethod("query_notEqualTo", args)307 def query_single_property_fts(self, database, prop, val,308 doc_type, limit, stemming):309 args = Args()310 args.setMemoryPointer("database", database)311 args.setString("prop", prop)312 args.setString("val", val)313 args.setString("doc_type", doc_type)314 args.setBoolean("stemming", stemming)315 args.setInt("limit", limit)316 return self._client.invokeMethod("query_singlePropertyFTS", args)317 def query_multiple_property_fts(self, database, prop1, prop2,318 val, doc_type, limit, stemming):319 args = Args()320 args.setMemoryPointer("database", database)321 args.setString("prop1", prop1)322 args.setString("prop2", prop2)323 args.setString("val", val)324 args.setString("doc_type", doc_type)325 args.setBoolean("stemming", stemming)326 args.setInt("limit", limit)327 return self._client.invokeMethod("query_multiplePropertyFTS", args)328 def query_fts_with_ranking(self, database, prop, val,329 doc_type, limit):330 args = Args()331 args.setMemoryPointer("database", database)332 args.setString("prop", prop)333 args.setString("val", val)334 args.setString("doc_type", doc_type)335 args.setInt("limit", limit)336 return self._client.invokeMethod("query_ftsWithRanking", args)337 def query_arthimetic(self, database):338 args = Args()339 args.setMemoryPointer("database", database)340 return self._client.invokeMethod("query_arthimetic", args)341 def release(self, obj):342 self._client.release(obj)343 def addChangeListener(self, query):344 args = Args()345 args.setMemoryPointer("query", query)346 return self._client.invokeMethod("query_addChangeListener", args)347 def removeChangeListener(self, query, change_listener):348 args = Args()...

Full Screen

Full Screen

run.py

Source:run.py Github

copy

Full Screen

1# ______ _____ _ ________2# / ____/___ / ___/(_)___ ___ / _/ __ |3# / / / __ \\__ \/ / __ `__ \ / // / / /4# / /___/ /_/ /__/ / / / / / / // // /_/ /5# \____/\____/____/_/_/ /_/ /_/___/\____/6# Kratos CoSimulationApplication7#8# License: BSD License, see license.txt9#10# Main authors: Philipp Bucher (https://github.com/philbucher)11#12import CoSimIO13def cosimio_check_equal(a, b):14 assert a == b15s_connection_name = ""16def AdvanceInTime(info):17 settings = CoSimIO.Info()18 settings.SetString("connection_name", s_connection_name)19 settings.SetString("identifier", "info_for_test")20 settings.SetString("name_for_check", "AdvanceInTime")21 CoSimIO.ExportInfo(settings)22 return CoSimIO.Info()23def InitializeSolutionStep(info):24 settings = CoSimIO.Info()25 settings.SetString("connection_name", s_connection_name)26 settings.SetString("identifier", "info_for_test")27 settings.SetString("name_for_check", "InitializeSolutionStep")28 CoSimIO.ExportInfo(settings)29 return CoSimIO.Info()30def Predict(info):31 settings = CoSimIO.Info()32 settings.SetString("connection_name", s_connection_name)33 settings.SetString("identifier", "info_for_test")34 settings.SetString("name_for_check", "Predict")35 CoSimIO.ExportInfo(settings)36 return CoSimIO.Info()37def SolveSolutionStep(info):38 settings = CoSimIO.Info()39 settings.SetString("connection_name", s_connection_name)40 settings.SetString("identifier", "info_for_test")41 settings.SetString("name_for_check", "SolveSolutionStep")42 CoSimIO.ExportInfo(settings)43 return CoSimIO.Info()44def FinalizeSolutionStep(info):45 settings = CoSimIO.Info()46 settings.SetString("connection_name", s_connection_name)47 settings.SetString("identifier", "info_for_test")48 settings.SetString("name_for_check", "FinalizeSolutionStep")49 CoSimIO.ExportInfo(settings)50 return CoSimIO.Info()51def OutputSolutionStep(info):52 settings = CoSimIO.Info()53 settings.SetString("connection_name", s_connection_name)54 settings.SetString("identifier", "info_for_test")55 settings.SetString("name_for_check", "OutputSolutionStep")56 CoSimIO.ExportInfo(settings)57 return CoSimIO.Info()58def ImportData(info):59 settings = CoSimIO.Info()60 settings.SetString("connection_name", s_connection_name)61 settings.SetString("identifier", "info_for_test")62 settings.SetString("name_for_check", "ImportData")63 if (info.Has("identifier")):64 settings.SetString("identifier_control", info.GetString("identifier"))65 CoSimIO.ExportInfo(settings)66 return CoSimIO.Info()67def ExportData(info):68 settings = CoSimIO.Info()69 settings.SetString("connection_name", s_connection_name)70 settings.SetString("identifier", "info_for_test")71 settings.SetString("name_for_check", "ExportData")72 if (info.Has("identifier")):73 settings.SetString("identifier_control", info.GetString("identifier"))74 CoSimIO.ExportInfo(settings)75 return CoSimIO.Info()76def ImportMesh(info):77 settings = CoSimIO.Info()78 settings.SetString("connection_name", s_connection_name)79 settings.SetString("identifier", "info_for_test")80 settings.SetString("name_for_check", "ImportMesh")81 if (info.Has("identifier")):82 settings.SetString("identifier_control", info.GetString("identifier"))83 CoSimIO.ExportInfo(settings)84 return CoSimIO.Info()85def ExportMesh(info):86 settings = CoSimIO.Info()87 settings.SetString("connection_name", s_connection_name)88 settings.SetString("identifier", "info_for_test")89 settings.SetString("name_for_check", "ExportMesh")90 if (info.Has("identifier")):91 settings.SetString("identifier_control", info.GetString("identifier"))92 CoSimIO.ExportInfo(settings)93 return CoSimIO.Info()94# Connection Settings95settings = CoSimIO.Info()96settings.SetString("my_name", "py_run")97settings.SetString("connect_to", "py_runner")98settings.SetInt("echo_level", 1)99settings.SetString("version", "1.25")100# Connecting101return_info = CoSimIO.Connect(settings)102cosimio_check_equal(return_info.GetInt("connection_status"), CoSimIO.ConnectionStatus.Connected)103s_connection_name = return_info.GetString("connection_name")104# registering the functions105fct_info = CoSimIO.Info()106fct_info.SetString("connection_name", s_connection_name)107fct_info.SetString("function_name", "AdvanceInTime")108CoSimIO.Register(fct_info, AdvanceInTime)109fct_info.SetString("function_name", "InitializeSolutionStep")110CoSimIO.Register(fct_info, InitializeSolutionStep)111fct_info.SetString("function_name", "Predict")112CoSimIO.Register(fct_info, Predict)113fct_info.SetString("function_name", "SolveSolutionStep")114CoSimIO.Register(fct_info, SolveSolutionStep)115fct_info.SetString("function_name", "FinalizeSolutionStep")116CoSimIO.Register(fct_info, FinalizeSolutionStep)117fct_info.SetString("function_name", "OutputSolutionStep")118CoSimIO.Register(fct_info, OutputSolutionStep)119fct_info.SetString("function_name", "ImportData")120CoSimIO.Register(fct_info, ImportData)121fct_info.SetString("function_name", "ExportData")122CoSimIO.Register(fct_info, ExportData)123fct_info.SetString("function_name", "ImportMesh")124CoSimIO.Register(fct_info, ImportMesh)125fct_info.SetString("function_name", "ExportMesh")126CoSimIO.Register(fct_info, ExportMesh)127# running the simulation128# externally orchestrated129run_info = CoSimIO.Info()130run_info.SetString("connection_name", s_connection_name)131CoSimIO.Run(run_info)132# Disconnecting133disconnect_settings = CoSimIO.Info()134disconnect_settings.SetString("connection_name", s_connection_name)135return_info = CoSimIO.Disconnect(disconnect_settings)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run pyatom automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful