Translation

python_programming.xhp tit help.text
English ej5WE
Context English Japanese Actions
python_platform.xhp
N0511
help.text
ComputerName property is solely available for Windows. Basic calls to Python macros help overcome %PRODUCTNAME Basic limitations. ComputerNameプロパティは、Windowsでのみ使用可能です。 PythonマクロからBasicの呼び出しは、%PRODUCTNAME BASICの制限克服に役立ちます。
python_platform.xhp
N0512
help.text
Using a Python class: Pythonクラスを使って:
python_platform.xhp
N0529
help.text
Using a Basic classmodule: Basicクラスモジュールを使って:
python_platform.xhp
NO529b
help.text
%PRODUCTNAME Basic lacks MacOS X native recognition. Platform identification is possible using %PRODUCTNAME Application Programming Interface (API). %PRODUCTNAME Basicには、macOSネイティブの認識機能はありません。LibreOffice API(Application Programming Interface)を使ってプラットフォームの識別は可能です。
python_platform.xhp
N0451
help.text
' Return platform name as "MAC", "UNIX", "WIN"
python_platform.xhp
N0551
help.text
' Inferred from "Tools.UCB.ShowHelperDialog" function
python_platform.xhp
N0564
help.text
Examples: サンプル:
python_platform.xhp
N0565
help.text
With Python Pythonから
python_platform.xhp
N0567
help.text
<literal>>>> print(Platform().isMacOSX) # object property</literal>
python_platform.xhp
N0569
help.text
<literal>>>> input(Platform().OSName) # object property</literal>
python_platform.xhp
N0571
help.text
From <menuitem>Tools – Macros - Run Macro...</menuitem> menu. メニュー <menuitem>[ツール] – [マクロ] - [マクロを実行]</menuitem>から。
python_platform.xhp
N0576
help.text
With %PRODUCTNAME Basic %PRODUCTNAME Basicから
python_platform.xhp
N0578
help.text
Dim p As New Platform ' instance of Platform class
python_platform.xhp
N0579
help.text
MsgBox p.isLinux ' object property
python_platform.xhp
N0580
help.text
Print p.isWindows, p.OSName ' object properties
python_programming.xhp
tit
help.text
Python : Programming with Python
python_programming.xhp
N0218
help.text
<bookmark_value>Python;Programming</bookmark_value> <bookmark_value>XSCRIPTCONTEXT;Python</bookmark_value> <bookmark_value>XSCRIPTCONTEXT;getComponentContext()</bookmark_value> <bookmark_value>uno.py</bookmark_value> <bookmark_value>uno.py;getComponentContext()</bookmark_value>
python_programming.xhp
hd_id691546462755220
help.text
<variable id="pythonprogrammingheading"><link href="text/sbasic/python/python_programming.xhp" name="python programming">Programming with Python Scripts</link></variable>
python_programming.xhp
N0220
help.text
A Python macro is a function within a .py file, identified as a module. Unlike %PRODUCTNAME Basic and its dozen of <link href="text/sbasic/shared/uno_objects.xhp" name="UNO objects functions or services">UNO objects functions or services</link>, Python macros use the <literal>XSCRIPTCONTEXT</literal> UNO single object, shared with JavaScript and BeanShell. The <literal>g_exportedScripts</literal> global tuple explicitly lists selectable macros from a module. Python modules hold autonomous code logic, and are independent from one another.
python_programming.xhp
N0221
help.text
XSCRIPTCONTEXT Global Variable
python_programming.xhp
N0222
help.text
Genuine Basic UNO facilities can be inferred from <literal>XSCRIPTCONTEXT</literal> global variable. Refer to %PRODUCTNAME API for a complete <link href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1script_1_1provider_1_1XScriptContext.html" name="description of XSCRIPTCONTEXT">description of XSCRIPTCONTEXT</link>. <literal>XSCRIPTCONTEXT</literal> methods summarize as:
python_programming.xhp
N0224
help.text
Methods
python_programming.xhp
N0225
help.text
Description
python_programming.xhp
N0226
help.text
Mapped in Basic as
python_programming.xhp
N0228
help.text
The document reference on which the script can operate.
python_programming.xhp
N0231
help.text
The desktop reference on which the script can operate.
python_programming.xhp
N0234
help.text
The component context which the script can use to create other uno components.
python_programming.xhp
N0237
help.text
<emph>HelloWorld</emph> and <emph>Capitalise</emph> installation shared scripts illustrate UNO-related macros making use of <literal>XSCRIPTCONTEXT</literal> global variable.
python_programming.xhp
N0238
help.text
Python standard output file is not available when running Python macros from <menuitem>Tools - Macros - Run Macro</menuitem> menu. Refer to <emph>Input/Output to Screen</emph> for more information.
python_programming.xhp
N0239
help.text
Module import
python_programming.xhp
N0240
help.text
<literal>XSCRIPTCONTEXT</literal> is not provided to imported modules.
User avatar 345133

Suggestion added

Suggested change:

2 months ago

Loading…

User avatar 345133

Suggestion added

LibreOffice Help - master / text/sbasic/pythonJapanese

2 months ago
Browse all component changes

Things to check

Suggestions

There is 1 suggestion for this string.

View

Glossary

English Japanese
Help ヘルプ LibreOffice UI - master

String information

Context
python_programming.xhp
tit
help.text
Source string description
ej5WE
Source string location
python_programming.xhp
String age
2 years ago
Source string age
2 years ago
Translation file
ja/helpcontent2/source/text/sbasic/python.po, string 284