Bearsampp 2025.8.29
Loading...
Searching...
No Matches
class.tpl.app.python.php
Go to the documentation of this file.
1<?php
2/*
3 *
4 * * Copyright (c) 2021-2024 Bearsampp
5 * * License: GNU General Public License version 3 or later; see LICENSE.txt
6 * * Website: https://bearsampp.com
7 * * Github: https://github.com/Bearsampp
8 *
9 */
10
19{
20 // Constant for the Python menu identifier
21 const MENU = 'python';
22
30 public static function process()
31 {
32 global $bearsamppLang;
33
34 return TplApp::getMenu($bearsamppLang->getValue(Lang::PYTHON), self::MENU, get_called_class());
35 }
36
45 public static function getMenuPython()
46 {
47 global $bearsamppLang, $bearsamppTools;
48
49 // Generate menu item for Python console
50 $resultItems = TplAestan::getItemConsoleZ(
53 $bearsamppTools->getConsoleZ()->getTabTitlePython()
54 ) . PHP_EOL;
55
56 // Generate menu item for Python IDLE
57 $resultItems .= TplAestan::getItemExe(
58 $bearsamppLang->getValue(Lang::PYTHON) . ' IDLE',
59 $bearsamppTools->getPython()->getIdleExe(),
61 ) . PHP_EOL;
62
63 return $resultItems;
64 }
65}
global $bearsamppLang
const PYTHON_CONSOLE
const PYTHON
static getItemExe($caption, $exe, $glyph, $params=null)
static getItemConsoleZ($caption, $glyph, $id=null, $title=null, $initDir=null, $command=null)
static getMenu($caption, $menu, $class)