It is possible to start Python runningwith the command
<GiDdirectory>/scripts/tohil/python/python
This opens the typical Python console:
in Windows:
in Linux:
Code Block language py gid-user@linux:~ $ $HOME/GiDx64/gid-16.1.2d/scripts/tohil/python/python Python 3.10.8 (main, Oct 27 2022, 17:52:20) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> print( "Hello World !!!"); Hello World !!! >>>
This python process is not related with the gid.exe process (it is not an embedded Python)
...
Code Block | ||
---|---|---|
| ||
gid-user@linux:~ $ $HOME/GiDx64/gid-16.1.2d/scripts/tohil/python/python
Python 3.10.8 (main, Oct 27 2022, 17:52:20) [GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import *
>>> from tkinter import ttk
>>> root = Tk()
>>> frm = ttk.Frame( root, padding = 10)
>>> frm.grid()
>>> ttk.Label( frm, text = "Helo World !!!").grid( column = 0, row = 0)
>>> ttk.Button( frm, text = "Quit", command = root.destroy).grid( column = 1, row = 0)
>>> root.mainloop()
|