Using the console
Celbridge comes with a Console panel offering a CLI (Command Line Interface). The prompt in this terminal comprises 3 greater-than signs >>>.
The terminal is where you’ll see messages from Celbridge, such as the status of loading new extensions or a different version of Python if you change the project settings and re-load the project.
(I)Python REPL
This terminal offers a full Python REPL , with which you can interact. Some examples of using the Python REPL terminal include:
Run a Python script file named
hello.py, one that contains a Pythonprint()statement to ouput the string Hello world from Python:>>> run hello.py Hello world from Python
some basic Python commands, including setting and then using variables:
>>> print(3 + 3) 6 >>> num_pizzas = 3 >>> print(num_pizzas * 10) 30
CLI commands
CLI bang ! commands
It also offers a range of commands for running CLI programs, available using the bang “!” (exclamation mark ) character. Examples including:
Directory list (in this example I’m working from an X: drive in a Celbridge project named celbridge_sample):
>>> !dir Volume in drive X is Shared Folders Directory of X:\Downloads\celbridge_sample 12/03/2025 10:56 PM hello.py 12/03/2025 07:59 AM celbridge_sample.celbridge 12/03/2025 08:08 AM README.md
Running
makecommands. For example, if you’re building code solution or websites using the MAKE tool. In this example I’m running themake htmlcommand to generate HTML files from RST files in a Sphinx project (only the first few lines of output are shown …):>>> !make html Running Sphinx v8.2.3 loading translations [en]... done loading pickled environment... done building [mo]: targets for 0 po files that are out of date writing output... ... and so on ...
Note
TIP Use <CTRL>+L to clear the console
IPython built-in “magic” % commands
IPython offers a range of commands for running CLI programs, available using the percent “%” character. Examples including:
Print Working Direcotry (
pwd):>>> %pwd 'C:\Documents\github\celbridge-docs' >>>
Change Direcotry (
cd):>>> %pwd 'C:\Documents\github\celbridge-docs' >>> %cd .. C:\Documents\github >>> %pwd 'C:\Documents\github' >>>
The IPython documentation pages provide a full list of the magic commands
Learn more about REPLs and this console at: