Hi André
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
resulting in:
Code:
...
#loading regular api modules
from jscripting.CE import *
...
# user startup
import startup
# scripting
<TEXT IN SCRIPTING.PY>
(see scripting.py in directory $USER/.CityEngine/@CEVERSION/jythonCache)
functions in startup need to be called with their module name, e.g.
Code:
startup.myCustomFunction()
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
Andreas
Bookmarks