Module ImportFrom alias Expr Str Import alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias alias FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If UnaryOpNot NameLoad body Return AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore NameLoad If UnaryOpNot NameLoad body Assign NameStore BoolOpOr Call NameLoad ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr CompareIn NameLoad NameLoad CompareEq NameLoad Str body Assign NameStore NameLoad Break If CompareIn Str NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num If CompareIn NameLoad NameLoad body Assign NameStore NameLoad Break Return BoolOpOr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str NameLoad If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Str If BoolOpAnd NameLoad CompareNotEq NameLoad Str body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return ListComp SubscriptLoad Call AttributeLoad NameLoad attr Index Num comprehension NameStore Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call NameLoad ListComp ListLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num comprehension NameStore ListComp Call AttributeLoad NameLoad attr NameLoad Num comprehension NameStore Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad Num comprehension NameStore Call NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Lambda arguments args defaults Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpAdd NameLoad Str BoolOpOr NameLoad Str Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Dict If UnaryOpNot CompareIn NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AugAssignAdd NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Str For TupleStore NameStore NameStore NameLoad body If BoolOpAnd CompareEq NameLoad NameLoad CompareEq NameLoad NameLoad body For NameStore SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore NameLoad AugAssignAdd NameStore BinOpMod Str Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict If CompareEq NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body If CompareIn SubscriptLoad NameLoad Index Num NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BinOpMod Str Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return Dict If CompareIsNot AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str NameLoad If CompareIs AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str NameLoad AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict For NameStore BoolOpOr NameLoad Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad Str BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareEq Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num orelse If CompareEq Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num orelse Raise Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword Call AttributeLoad Call NameLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr Str keyword ListLoad Str Str keyword Dict Str NameLoad body Expr Call AttributeLoad NameLoad attr Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad Str attr ListComp Call AttributeLoad Str attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Str comprehension NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad If NameLoad body For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad BoolOpOr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str If UnaryOpNot CompareIn Str SubscriptLoad NameLoad Index Num body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr Str body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListComp NameLoad comprehension NameStore NameLoad NameLoad Assign NameStore ListComp TupleLoad BinOpAdd Str NameLoad NameLoad comprehension NameStore NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Assert BoolOpOr NameLoad NameLoad Str Assign NameStore ListLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str keyword Dict Str NameLoad orelse Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str keyword NameLoad ListLoad For NameStore NameLoad body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Break orelse If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str TupleLoad SubscriptLoad NameLoad Index Str keyword NameLoad Expr Call AttributeLoad NameLoad attr ListComp TupleLoad BinOpAdd Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str TupleLoad SubscriptLoad NameLoad Index Str keyword NameLoad Expr Call AttributeLoad NameLoad attr ListComp TupleLoad BinOpAdd Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str TupleLoad SubscriptLoad NameLoad Index Str keyword NameLoad Expr Call AttributeLoad NameLoad attr ListComp TupleLoad BinOpAdd Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad Call NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BoolOpOr Call AttributeLoad NameLoad attr Str keyword NameLoad ListLoad Assign NameStore ListLoad For NameStore NameLoad body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Break orelse If BoolOpAnd Call NameLoad NameLoad NameLoad CompareEq Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str keyword ListLoad Str Str Str Str Str Assign NameStore ListLoad For NameStore NameLoad body For NameStore TupleLoad Str Str body If BoolOpOr UnaryOpNot Call AttributeLoad NameLoad attr NameLoad UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index NameLoad body Continue Expr Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad Str attr NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index NameLoad If BoolOpAnd CompareEq SubscriptLoad NameLoad Index Str Str Call AttributeLoad NameLoad attr Str body For NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str body If BoolOpAnd NameLoad CompareNotIn Str NameLoad Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad BinOpAdd Str SubscriptLoad NameLoad Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call NameLoad Str NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr ListComp TupleLoad NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd Call AttributeLoad NameLoad attr NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body For NameStore Call AttributeLoad NameLoad attr NameLoad body If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad body For NameStore TupleLoad Str Str Str body If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad For NameStore BinOpAdd BoolOpOr Call AttributeLoad NameLoad attr Str keyword NameLoad ListLoad BoolOpOr Call AttributeLoad NameLoad attr Str keyword NameLoad ListLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad For NameStore IfExp NameLoad ListLoad NameLoad Call AttributeLoad NameLoad attr body If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad Str body For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str body If CompareIn Str NameLoad body Continue For NameStore NameLoad body If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Return ListComp TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr ListLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str orelse Return ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass Assign NameStore ListLoad AugAssignAdd NameStore ListComp TupleLoad Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num comprehension NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr NameLoad AugAssignAdd NameStore ListComp TupleLoad Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num comprehension NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr NameLoad If NameLoad body AugAssignAdd NameStore ListComp TupleLoad Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num comprehension NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr NameLoad Assign NameStore ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd Call AttributeLoad NameLoad attr Str NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr NameLoad Assign NameStore Num Assign NameStore Num For TupleStore NameStore NameStore NameLoad body While BoolOpAnd CompareLt NameLoad Call NameLoad NameLoad CompareGt NameLoad SubscriptLoad NameLoad Index NameLoad body AugAssignAdd NameStore Num AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias With Call AttributeLoad NameLoad attr NameLoad Str Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call NameLoad Num Str attr Call NameLoad Num Str Assign NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore Call AttributeLoad NameLoad attr Assign NameStore ListComp ListComp Call NameLoad NameLoad Str comprehension NameStore NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam NameParam defaults Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num ImportFrom alias With Call NameLoad NameLoad Str NameStore body Assign NameStore Call NameLoad NameLoad keyword Str For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad IfExp NameLoad Call AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str attr Str Str decorator_list If NameLoad body Print BinOpAdd Call NameLoad Call NameLoad NameLoad Str With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad BinOpAdd Call NameLoad SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr attr Str orelse Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num If NameLoad body Print BinOpAdd BinOpAdd Call NameLoad Call NameLoad NameLoad Str Call NameLoad Call NameLoad NameLoad With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad BinOpAdd Call NameLoad NameLoad AttributeLoad NameLoad attr attr Str orelse Print Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call NameLoad Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str attr Str Str attr Str Str attr Str Str attr Str Str decorator_list Assign NameStore Dict For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Str For NameStore Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str For NameStore Call NameLoad body For NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body Return Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad Str NameLoad BoolOpOr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareNotIn Str AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore AttributeLoad AttributeLoad NameLoad attr attr Index Str Dict Expr Call AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad keyword NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str If CompareEq NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Dict Str Str NameLoad NameLoad decorator_list
N/A __future__ unicode_literals N/A 
	frappe.translate
	~~~~~~~~~~~~~~~~

	Translation tools for frappe
 N/A frappe os re codecs json frappe.model.utils render_include frappe.utils strip jinja2 TemplateError N/A itertools operator guess_language N/A N/A lang_list N/A None N/A N/A Set `frappe.local.lang` from HTTP headers at beginning of request N/A lang_codes N/A N/A N/A N/A frappe request accept_languages values N/A N/A lang_codes N/A N/A N/A N/A frappe local lang N/A guess None N/A N/A lang_list N/A N/A lang_list N/A N/A get_all_languages N/A N/A l lang_codes N/A N/A code N/A N/A l strip N/A N/A N/A code lang_list N/A code en N/A N/A guess code N/A N/A N/A - code N/A N/A code N/A N/A N/A code split - N/A 0 N/A N/A code lang_list N/A N/A guess code N/A N/A N/A guess N/A N/A frappe local lang N/A get_user_lang N/A N/A user N/A None N/A N/A Set frappe.local.lang from user preferences on session beginning or resumption N/A N/A user N/A N/A user N/A N/A frappe session user N/A lang N/A N/A N/A N/A frappe cache hget lang user N/A N/A lang N/A N/A user_lang N/A N/A N/A frappe db get_value User user language N/A N/A user_lang N/A user_lang Loading... N/A N/A lang N/A get_lang_code user_lang N/A N/A default_lang N/A N/A N/A frappe db get_default lang N/A lang N/A get_lang_code default_lang N/A N/A lang N/A N/A lang N/A N/A N/A frappe local lang en N/A N/A N/A N/A N/A frappe cache hset lang user lang N/A lang N/A get_lang_code N/A N/A lang N/A N/A N/A N/A N/A N/A get_lang_dict get lang lang N/A set_default_language N/A N/A language N/A N/A N/A Set Global default language N/A lang N/A N/A N/A get_lang_dict get language language N/A N/A N/A N/A frappe db set_default lang lang N/A N/A N/A frappe local lang lang N/A get_all_languages N/A N/A N/A N/A N/A Returns all language codes ar, ch etc N/A N/A N/A N/A N/A a split N/A 0 N/A a N/A get_lang_info N/A get_lang_dict N/A N/A N/A N/A N/A Returns all languages in dict format, full name is the key e.g. `{"english":"en"}` N/A N/A dict N/A N/A N/A a N/A 1 N/A a N/A 0 N/A a N/A N/A N/A a split None 1 N/A a N/A get_lang_info N/A get_language_from_code N/A N/A lang N/A N/A N/A N/A N/A N/A dict N/A N/A N/A a split None 1 N/A a N/A get_lang_info get lang N/A get_lang_info N/A N/A N/A N/A N/A Returns a listified version of `apps/languages.txt` N/A N/A N/A N/A N/A frappe cache get_value langinfo N/A N/A N/A N/A N/A N/A frappe get_file_items N/A N/A N/A os path join N/A N/A frappe local sites_path languages.txt N/A get_dict N/A N/A fortype name N/A None N/A N/A Returns translation dict for a type of object.

	 :param fortype: must be one of `doctype`, `page`, `report`, `include`, `jsfile`, `boot`
	 :param name: name of the document for which assets are to be returned.
	  N/A fortype N/A N/A fortype lower N/A cache N/A N/A frappe cache N/A asset_key N/A N/A fortype : N/A name - N/A translation_assets N/A N/A N/A cache hget translation_assets N/A N/A frappe local lang N/A N/A N/A N/A asset_key translation_assets N/A N/A N/A fortype doctype N/A N/A messages N/A get_messages_from_doctype name N/A N/A N/A fortype page N/A N/A messages N/A get_messages_from_page name N/A N/A N/A fortype report N/A N/A messages N/A get_messages_from_report name N/A N/A N/A fortype include N/A N/A messages N/A get_messages_from_include_files N/A N/A N/A fortype jsfile N/A N/A messages N/A get_messages_from_file name N/A N/A N/A fortype boot N/A N/A messages N/A get_messages_from_include_files N/A messages N/A N/A N/A frappe db sql select 'DocType:', name from tabDocType N/A messages N/A N/A N/A frappe db sql select 'Role:', name from tabRole N/A messages N/A N/A N/A frappe db sql select 'Module:', name from `tabModule Def` N/A messages N/A N/A N/A frappe db sql select 'Module:', label from `tabDesktop Icon` where standard=1 or owner=%s N/A N/A frappe session user N/A N/A translation_assets N/A asset_key N/A make_dict_from_messages messages N/A N/A N/A N/A translation_assets N/A asset_key update N/A get_dict_from_hooks fortype name N/A N/A N/A cache hset translation_assets N/A N/A frappe local lang translation_assets N/A N/A translation_assets N/A asset_key N/A get_dict_from_hooks N/A N/A fortype name N/A N/A N/A translated_dict N/A N/A hooks N/A N/A frappe get_hooks get_translated_dict N/A N/A hook_fortype fortype_name hooks N/A N/A N/A N/A hook_fortype fortype N/A fortype_name name N/A N/A method N/A hooks N/A N/A hook_fortype fortype_name N/A N/A N/A N/A translated_dict update N/A N/A N/A frappe get_attr method N/A translated_dict N/A add_lang_dict N/A N/A code N/A N/A N/A Extracts messages and returns Javascript code snippet to be appened at the end
	of the given script

	:param code: Javascript code snippet to which translations needs to be appended. N/A messages N/A extract_messages_from_code code N/A messages N/A message N/A N/A pos message messages N/A code N/A 

$.extend(frappe._messages, %s) N/A N/A json dumps N/A make_dict_from_messages messages N/A code N/A make_dict_from_messages N/A N/A messages full_dict N/A None N/A N/A Returns translated messages as a dict in Language specified in `frappe.local.lang`

	:param messages: List of untranslated messages
	 N/A out N/A N/A N/A full_dict None N/A N/A full_dict N/A get_full_dict N/A N/A frappe local lang N/A m messages N/A N/A N/A N/A m N/A 1 full_dict N/A N/A N/A out N/A N/A m N/A 1 N/A full_dict N/A N/A m N/A 1 N/A out N/A get_lang_js N/A N/A fortype name N/A N/A N/A Returns code snippet to be appended at the end of a JS script.

	:param fortype: Type of object, e.g. `DocType`
	:param name: Document name
	 N/A N/A 

$.extend(frappe._messages, %s) N/A N/A json dumps N/A get_dict fortype name N/A get_full_dict N/A N/A lang N/A N/A N/A Load and return the entire translations dictionary for a language from :meth:`frape.cache`

	:param lang: Language Code, e.g. `hi`
	 N/A N/A lang N/A N/A N/A N/A N/A N/A N/A frappe local lang_full_dict None N/A N/A N/A N/A frappe local lang_full_dict N/A N/A N/A frappe local lang_full_dict N/A N/A N/A N/A frappe cache hget lang_full_dict lang N/A N/A N/A N/A frappe local lang_full_dict None N/A N/A N/A N/A frappe local lang_full_dict N/A load_lang lang N/A N/A N/A N/A N/A frappe cache hset lang_full_dict lang N/A N/A frappe local lang_full_dict N/A N/A N/A user_translations N/A get_user_translations lang N/A N/A N/A Exception N/A N/A user_translations None N/A user_translations N/A N/A N/A N/A N/A N/A frappe local lang_full_dict update user_translations N/A N/A N/A frappe local lang_full_dict N/A load_lang N/A N/A lang apps N/A None N/A N/A Combine all translations from `.csv` files in all `apps` N/A out N/A N/A app N/A apps N/A N/A frappe get_all_apps True N/A N/A path N/A N/A N/A os path join N/A N/A frappe get_pymodule_path app translations N/A lang .csv N/A N/A N/A out update N/A get_translation_dict_from_file path lang app N/A out N/A get_translation_dict_from_file N/A N/A path lang app N/A N/A N/A load translation dict from given path N/A cleaned N/A N/A N/A N/A N/A os path exists path N/A N/A csv_content N/A read_csv_file path N/A item csv_content N/A N/A N/A N/A len item 3 N/A N/A N/A cleaned N/A N/A item N/A 1 N/A strip N/A item N/A 2 N/A N/A N/A N/A len item 2 N/A N/A N/A cleaned N/A N/A item N/A 0 N/A strip N/A item N/A 1 N/A N/A N/A Exception N/A N/A Bad translation in '{app}' for language '{lang}': {values} format app app lang lang values N/A N/A N/A repr item encode utf-8 N/A cleaned N/A get_user_translations N/A N/A lang N/A N/A N/A out N/A N/A N/A N/A frappe cache hget lang_user_translations lang N/A N/A out None N/A N/A out N/A N/A fields N/A N/A frappe get_all Translation fields N/A source_name target_name filters N/A language_code lang N/A N/A N/A N/A out update N/A N/A fields source_name N/A fields target_name N/A N/A N/A N/A N/A frappe cache hset lang_user_translations lang out N/A out N/A clear_cache N/A N/A N/A N/A N/A Clear all translation assets from :meth:`frappe.cache` N/A cache N/A N/A frappe cache N/A N/A N/A cache delete_key langinfo N/A N/A N/A cache delete_key lang_full_dict N/A N/A N/A cache delete_key translation_assets N/A get_messages_for_app N/A N/A app N/A N/A N/A Returns all messages (list) for a specified `app` N/A messages N/A N/A modules N/A N/A ,  join N/A N/A N/A "{}" format N/A N/A N/A N/A m title replace _ N/A m N/A N/A N/A frappe local app_modules N/A app N/A modules N/A N/A name N/A N/A N/A frappe db sql_list N/A N/A select name from tabDocType
			where module in ({}) format modules N/A N/A N/A N/A messages extend N/A get_messages_from_doctype name N/A N/A name title N/A N/A N/A frappe db sql N/A N/A select name, title from tabPage
			where module in ({}) format modules N/A N/A N/A N/A messages append N/A None N/A title name N/A N/A N/A messages extend N/A get_messages_from_page name N/A name N/A N/A N/A frappe db sql_list N/A N/A select tabReport.name from tabDocType, tabReport
			where tabReport.ref_doctype = tabDocType.name
				and tabDocType.module in ({}) format modules N/A N/A N/A N/A messages append N/A None name N/A N/A N/A messages extend N/A get_messages_from_report name N/A i messages N/A N/A N/A N/A isinstance i tuple N/A N/A Exception N/A N/A N/A messages extend N/A get_messages_from_workflow app_name app N/A N/A N/A messages extend N/A get_messages_from_custom_fields app_name app N/A N/A N/A messages extend N/A get_all_messages_from_js_files app N/A N/A N/A messages extend N/A get_server_messages app N/A N/A deduplicate_messages messages N/A get_messages_from_doctype N/A N/A name N/A N/A N/A Extract all translatable messages for a doctype. Includes labels, Python code,
	Javascript code, html templates N/A messages N/A N/A meta N/A N/A frappe get_meta name N/A messages N/A N/A meta name N/A meta module N/A N/A meta description N/A N/A N/A N/A messages append N/A meta description N/A d N/A N/A meta get fields N/A N/A N/A N/A messages extend N/A N/A d label N/A d description N/A N/A N/A N/A d fieldtype Select N/A d options N/A N/A options N/A N/A N/A d options split N/A N/A N/A icon N/A options N/A 0 N/A N/A N/A N/A messages extend options N/A d N/A N/A meta get permissions N/A N/A N/A d role N/A N/A N/A N/A messages append N/A d role N/A messages N/A message N/A message messages message N/A messages N/A N/A N/A DocType:  name message N/A message messages N/A is_translatable message N/A doctype_file_path N/A N/A frappe get_module_path N/A meta module doctype N/A meta name N/A meta name N/A N/A N/A messages extend N/A get_messages_from_file N/A doctype_file_path .js N/A N/A N/A messages extend N/A get_messages_from_file N/A doctype_file_path _list.js N/A N/A N/A messages extend N/A get_messages_from_file N/A doctype_file_path _list.html N/A N/A N/A messages extend N/A get_messages_from_file N/A doctype_file_path _calendar.js N/A N/A N/A messages extend N/A get_messages_from_workflow doctype name N/A messages N/A get_messages_from_workflow N/A N/A doctype app_name N/A None None N/A N/A N/A doctype app_name doctype or app_name should be provided N/A workflows N/A N/A doctype N/A N/A workflows N/A N/A frappe get_all Workflow filters N/A document_type doctype N/A N/A fixtures N/A N/A N/A frappe get_hooks fixtures app_name app_name N/A N/A fixture fixtures N/A N/A N/A N/A isinstance fixture basestring N/A fixture Worflow N/A N/A workflows N/A N/A frappe get_all Workflow N/A N/A N/A N/A N/A isinstance fixture dict N/A N/A N/A fixture get dt N/A N/A fixture get doctype Workflow N/A N/A N/A N/A workflows extend N/A N/A frappe get_all Workflow filters N/A N/A fixture get filters N/A messages N/A N/A w workflows N/A N/A states N/A N/A N/A frappe db sql select distinct state from `tabWorkflow Document State` where parent=%s N/A N/A w N/A name as_dict True N/A N/A N/A messages extend N/A N/A N/A Workflow:  N/A w N/A name N/A state N/A state N/A state states N/A is_translatable N/A state N/A state N/A states N/A N/A N/A frappe db sql select distinct message from `tabWorkflow Document State` where parent=%s and message is not null N/A N/A w N/A name as_dict True N/A N/A N/A messages extend N/A N/A N/A Workflow:  N/A w N/A name N/A states N/A message N/A state states N/A is_translatable N/A state N/A state N/A actions N/A N/A N/A frappe db sql select distinct action from `tabWorkflow Transition` where parent=%s N/A N/A w N/A name as_dict True N/A N/A N/A messages extend N/A N/A N/A Workflow:  N/A w N/A name N/A action N/A action N/A action actions N/A is_translatable N/A action N/A action N/A messages N/A get_messages_from_custom_fields N/A N/A app_name N/A N/A N/A fixtures N/A N/A N/A frappe get_hooks fixtures app_name app_name N/A N/A custom_fields N/A N/A fixture fixtures N/A N/A N/A N/A isinstance fixture basestring N/A fixture Custom Field N/A N/A custom_fields N/A N/A frappe get_all Custom Field N/A N/A N/A N/A N/A isinstance fixture dict N/A N/A N/A fixture get dt N/A N/A fixture get doctype Custom Field N/A N/A N/A N/A custom_fields extend N/A N/A frappe get_all Custom Field filters N/A N/A fixture get filters fields N/A name label description fieldtype options N/A messages N/A N/A cf custom_fields N/A N/A prop N/A label description N/A N/A N/A N/A N/A N/A cf get prop N/A N/A is_translatable N/A cf N/A prop N/A N/A N/A N/A N/A messages append N/A N/A N/A Custom Field - {}: {} format prop N/A cf N/A name N/A cf N/A prop N/A N/A N/A N/A cf N/A fieldtype Selection N/A N/A cf get options N/A N/A option N/A N/A N/A cf N/A options split N/A N/A N/A option N/A icon option N/A is_translatable option N/A N/A N/A N/A messages append N/A N/A Custom Field - Description:  N/A cf N/A name option N/A messages N/A get_messages_from_page N/A N/A name N/A N/A N/A Returns all translatable strings from a :class:`frappe.core.doctype.Page` N/A N/A _get_messages_from_page_or_report Page name N/A get_messages_from_report N/A N/A name N/A N/A N/A Returns all translatable strings from a :class:`frappe.core.doctype.Report` N/A report N/A N/A frappe get_doc Report name N/A messages N/A _get_messages_from_page_or_report Report name N/A N/A N/A frappe db get_value DocType N/A report ref_doctype module N/A N/A report query N/A N/A N/A N/A messages extend N/A N/A None message N/A message N/A N/A re findall "([^:,^"]*): N/A report query N/A is_translatable message N/A N/A N/A messages append N/A None N/A report report_name N/A messages N/A _get_messages_from_page_or_report N/A N/A doctype name module N/A None N/A N/A N/A module N/A N/A module N/A N/A N/A frappe db get_value doctype name module N/A doc_path N/A N/A frappe get_module_path module doctype name N/A messages N/A get_messages_from_file N/A N/A N/A os path join doc_path N/A N/A N/A frappe scrub name .py N/A N/A N/A N/A os path exists doc_path N/A N/A filename N/A N/A os listdir doc_path N/A N/A N/A N/A N/A filename endswith .js N/A N/A filename endswith .html N/A N/A messages N/A get_messages_from_file N/A N/A N/A os path join doc_path filename N/A messages N/A get_server_messages N/A N/A app N/A N/A N/A Extracts all translatable strings (tagged with :func:`frappe._`) from Python modules inside an app N/A messages N/A N/A N/A basepath folders files N/A N/A os walk N/A N/A frappe get_pymodule_path app N/A N/A dontwalk N/A .git public locale N/A N/A N/A dontwalk folders N/A N/A N/A N/A folders remove dontwalk N/A f files N/A N/A N/A N/A N/A f endswith .py N/A N/A f endswith .html N/A N/A f endswith .js N/A N/A N/A N/A messages extend N/A get_messages_from_file N/A N/A N/A os path join basepath f N/A messages N/A get_messages_from_include_files N/A N/A app_name N/A None N/A N/A Returns messages from js files included at time of boot like desk.min.js for desk and web N/A messages N/A N/A file N/A N/A N/A N/A frappe get_hooks app_include_js app_name app_name N/A N/A N/A N/A frappe get_hooks web_include_js app_name app_name N/A N/A N/A N/A N/A messages extend N/A get_messages_from_file N/A N/A N/A os path join N/A N/A frappe local sites_path file N/A messages N/A get_all_messages_from_js_files N/A N/A app_name N/A None N/A N/A Extracts all translatable strings from app `.js` files N/A messages N/A N/A app N/A app_name N/A app_name N/A N/A frappe get_installed_apps N/A N/A N/A N/A N/A os path exists N/A N/A frappe get_app_path app public N/A N/A N/A basepath folders files N/A N/A os walk N/A N/A frappe get_app_path app public N/A N/A N/A frappe/public/js/lib basepath N/A N/A N/A fname files N/A N/A N/A N/A N/A fname endswith .js N/A N/A fname endswith .html N/A N/A N/A N/A messages extend N/A get_messages_from_file N/A N/A N/A os path join basepath fname N/A messages N/A get_messages_from_file N/A N/A path N/A N/A N/A Returns a list of transatable strings from a code file

	:param path: path of the code file
	 N/A apps_path N/A get_bench_dir N/A N/A N/A N/A os path exists path N/A N/A N/A open path r sourcefile N/A N/A N/A N/A N/A N/A N/A os path relpath N/A N/A  + join N/A path N/A str pos apps_path message N/A N/A pos message N/A extract_messages_from_code N/A N/A sourcefile read N/A N/A path endswith .py N/A N/A N/A N/A extract_messages_from_code N/A N/A code is_py N/A False N/A N/A Extracts translatable srings from a code file

	:param code: code from which translatable files are to be extracted
	:param is_py: include messages in triple quotes e.g. `_('''message''')` N/A N/A N/A code N/A render_include code N/A N/A N/A TemplateError N/A N/A N/A messages N/A N/A messages N/A N/A N/A N/A m start N/A N/A N/A m groups N/A 0 N/A m N/A N/A N/A N/A re compile _\("([^"]*)" finditer code N/A messages N/A N/A N/A N/A m start N/A N/A N/A m groups N/A 0 N/A m N/A N/A N/A N/A re compile _\('([^']*)' finditer code N/A is_py N/A N/A messages N/A N/A N/A N/A m start N/A N/A N/A m groups N/A 0 N/A m N/A N/A N/A N/A re compile _\("{3}([^"]*)"{3}.*\) finditer code N/A messages N/A N/A pos message N/A N/A pos message messages N/A is_translatable message N/A N/A pos_to_line_no messages code N/A is_translatable N/A N/A m N/A N/A N/A N/A N/A N/A re search [a-zA-Z] m N/A N/A N/A m startswith icon- N/A N/A N/A m endswith px N/A N/A N/A m startswith eval: N/A N/A True N/A False N/A pos_to_line_no N/A N/A messages code N/A N/A N/A ret N/A N/A messages N/A sorted messages key N/A N/A N/A x N/A N/A x N/A 0 N/A newlines N/A N/A N/A m start N/A m N/A N/A N/A N/A re compile \n finditer code N/A line 1 N/A newline_i 0 N/A N/A pos message messages N/A N/A N/A N/A newline_i N/A len newlines N/A pos N/A newlines N/A newline_i N/A N/A line 1 N/A newline_i 1 N/A N/A N/A ret append N/A line message N/A ret N/A read_csv_file N/A N/A path N/A N/A N/A Read CSV file and return as list of list

	:param path: File path csv reader N/A N/A N/A codecs open path r utf-8 msgfile N/A N/A data N/A N/A msgfile read N/A data N/A N/A N/A N/A data replace N/A chr 28 replace N/A chr 29 N/A data N/A reader N/A N/A N/A r encode utf-8 N/A r N/A N/A data splitlines N/A newdata N/A N/A N/A unicode val utf-8 N/A val row N/A row data N/A newdata N/A write_csv_file N/A N/A path app_messages lang_dict N/A N/A N/A Write translation CSV file.

	:param path: File path, usually `[app]/translations`.
	:param app_messages: Translatable strings for this app.
	:param lang_dict: Full translated dict.
	 N/A N/A N/A app_messages sort N/A N/A N/A x y N/A N/A cmp N/A x N/A 1 N/A y N/A 1 csv writer N/A N/A open path wb msgfile N/A N/A w N/A writer msgfile lineterminator N/A N/A p m app_messages N/A N/A t N/A N/A lang_dict get m N/A t N/A N/A re sub {\s?([0-9]+)\s?} {\g<1>} t N/A N/A N/A w writerow N/A N/A p N/A N/A p encode utf-8 N/A N/A m encode utf-8 N/A N/A t encode utf-8 N/A get_untranslated N/A N/A lang untranslated_file get_all N/A False N/A N/A Returns all untranslated strings for a language and writes in a file

	:param lang: Language code.
	:param untranslated_file: Output file path.
	:param get_all: Return all strings, translated or not. N/A N/A clear_cache N/A apps N/A N/A frappe get_all_apps True N/A messages N/A N/A untranslated N/A N/A app apps N/A N/A N/A N/A messages extend N/A get_messages_for_app app N/A messages N/A deduplicate_messages messages escape_newlines N/A N/A s N/A N/A N/A N/A N/A N/A N/A N/A N/A s replace \
 ||||| replace \n |||| replace ||| N/A N/A get_all N/A N/A N/A N/A str N/A len messages  messages N/A N/A open untranslated_file w f N/A N/A m messages N/A N/A N/A N/A f write N/A N/A N/A N/A escape_newlines N/A m N/A 1 N/A os linesep encode utf-8 N/A N/A full_dict N/A get_full_dict lang N/A m messages N/A N/A N/A N/A N/A full_dict get N/A m N/A 1 N/A N/A N/A N/A untranslated append N/A m N/A 1 N/A untranslated N/A N/A N/A N/A N/A str N/A len untranslated  missing translations of  N/A str N/A len messages N/A N/A open untranslated_file w f N/A N/A m untranslated N/A N/A N/A N/A f write N/A N/A N/A N/A escape_newlines m N/A os linesep encode utf-8 N/A N/A all translated! N/A update_translations N/A N/A lang untranslated_file translated_file N/A N/A N/A Update translations from a source and target file for a given language.

	:param lang: Language code (e.g. `en`).
	:param untranslated_file: File path with the messages in English.
	:param translated_file: File path with messages in language to be updated. N/A N/A clear_cache N/A full_dict N/A get_full_dict lang restore_newlines N/A N/A s N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A s replace ||||| \
 replace | | | | | \
 replace |||| \n replace | | | | \n replace ||| replace | | | N/A N/A translation_dict N/A N/A N/A key value N/A zip N/A N/A frappe get_file_items untranslated_file ignore_empty_lines False N/A N/A frappe get_file_items translated_file ignore_empty_lines False N/A N/A N/A translation_dict N/A N/A restore_newlines key N/A restore_newlines value N/A N/A N/A full_dict update translation_dict N/A app N/A N/A frappe get_all_apps True N/A N/A N/A write_translations_file app lang full_dict N/A import_translations N/A N/A lang path N/A N/A N/A Import translations from file in standard format N/A N/A clear_cache N/A full_dict N/A get_full_dict lang N/A N/A N/A full_dict update N/A get_translation_dict_from_file path lang import N/A app N/A N/A frappe get_all_apps True N/A N/A N/A write_translations_file app lang full_dict N/A rebuild_all_translation_files N/A N/A N/A N/A N/A Rebuild all translation files: `[app]/translations/[lang].csv`. N/A lang N/A get_all_languages N/A N/A app N/A N/A frappe get_all_apps N/A N/A N/A write_translations_file app lang N/A write_translations_file N/A N/A app lang full_dict app_messages N/A None None N/A N/A Write a translation file for a given language.

	:param app: `app` for which translations are to be written.
	:param lang: Language code.
	:param full_dict: Full translated language dict (optional).
	:param app_messages: Source strings (optional).
	 N/A N/A app_messages N/A N/A app_messages N/A get_messages_for_app app N/A N/A app_messages N/A N/A N/A tpath N/A N/A frappe get_pymodule_path app translations N/A N/A N/A frappe create_folder tpath N/A N/A write_csv_file N/A N/A N/A os path join tpath N/A lang .csv app_messages N/A full_dict N/A get_full_dict lang N/A send_translations N/A N/A translation_dict N/A N/A N/A Append translated dict in `frappe.local.response` N/A N/A __messages N/A N/A frappe local response N/A N/A N/A N/A N/A frappe local response N/A __messages N/A N/A N/A N/A N/A N/A N/A frappe local response N/A __messages update translation_dict N/A deduplicate_messages N/A N/A messages N/A N/A N/A ret N/A N/A op N/A N/A operator itemgetter 1 N/A messages N/A sorted messages key op N/A N/A k g N/A N/A itertools groupby messages op N/A N/A N/A N/A ret append N/A N/A g next N/A ret N/A get_bench_dir N/A N/A N/A N/A N/A N/A N/A N/A os path join N/A frappe __file__ .. .. .. .. N/A rename_language N/A N/A old_name new_name N/A N/A N/A language_in_system_settings N/A N/A N/A frappe db get_single_value System Settings language N/A N/A language_in_system_settings old_name N/A N/A N/A N/A N/A frappe db set_value System Settings System Settings language new_name N/A N/A N/A N/A frappe db sql update `tabUser` set language=%(new_name)s where language=%(old_name)s N/A old_name new_name old_name new_name N/A