Python preferences

You can set the CityEngine preferences by clicking Edit > Preferences in the main menu.

Under Python preferences you can update preferences such as editor, code formatting, and environments.

Python Editor

You can change code highlighting in the Python editor under Python > Editor.

Code Formatting

You can change code formatting rules under Python > Editor > Code Style > Code Formatter.

Code Templates

You can edit code templates under Python > Editor > Templates. The Python editor will suggest inserting these templates while you are typing or when you press Ctrl+1.

Environments

Under Python > Environments you can add, remove, and edit Python 3 environments. See Working with Python 3 to manage Python environments.

Interactive Console

You can set preferences for the Interactive Console under Python > Interactive Console.

  • Colors—Specify the text and background colors.
  • Maximum number of lines to store in global history—The interactive console stores entered commands so that they can easily be repeated with the arrow up key. This setting specifies the maximum number of commands retained in the history.
  • Default interpreter—Specify whether the interactive console runs Python 3, Jython, or ask every time the console is opened.

Initial Console Commands

Under Python > Interactive Console > Initial Commands you can specify Python commands which are executed every time a new interactive console is opened. See Special scripts for more details.

Startup Script

Under Python > Startup you can specify a Python script which runs every time CityEngine starts. See Special scripts for more details.