startup and scripting are appended to the regular python startup script in the following way:
- file startup.py is copied and loaded as a module
- content of scripting.py is appended as text
(see scripting.py in directory $USER/.CityEngine/@CEVERSION/jythonCache)
#loading regular api modules
from jscripting.CE import *
# user startup
<TEXT IN SCRIPTING.PY>
functions in startup need to be called with their module name, e.g.
two words of warning:
- Due to the mechanisms described above, typos/errors in both startup.py or scripting.py can break the whole Python scripting interface.
- Both startup.py and scripting.py are loaded ONLY on CityEngine start. When changing these files, make sure to restart CE.
Hope that helps