https://github.com/bsodium/pconsole
Tiny and easy-to-use runtime console for panda3d-powered apps
https://github.com/bsodium/pconsole
command-line console interpreter panda3d python tool
Last synced: 7 months ago
JSON representation
Tiny and easy-to-use runtime console for panda3d-powered apps
- Host: GitHub
- URL: https://github.com/bsodium/pconsole
- Owner: BSoDium
- License: mit
- Created: 2020-04-12T11:34:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T09:00:38.000Z (over 3 years ago)
- Last Synced: 2024-05-01T16:38:01.060Z (over 1 year ago)
- Topics: command-line, console, interpreter, panda3d, python, tool
- Language: Python
- Homepage:
- Size: 4.05 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/py/pconsole)
# panda3d console
a tiny and easy-to-use runtime console for panda3d-powered apps
### Installation
```bash
pip install pconsole
```### Initialize console
```python
import pconsole
commandDic = {"func1_string":func1, # "associated string" : function name
"func2_string":func2
}
key = 't' # this key will toggle the console, by default, pconsole will use 'f1'
myConsole = pconsole.Console()
myConsole.create(commandDic, event = key)
# command line is now up and running
```### default commands
- help: lists all available commands
- usage: specific help
### additional features
use the 'app' argument when creating the console in order to be able to access attributes and variables from your main class in the python interpreter:
```python
myConsole.create(commandDic, event = key, app = self) # the self keyword will be refered to as 'main' in the interpreter
```