From: Kevin A. <al...@se...> - 2001-09-10 02:17:31
|
PythonCard has pycrustrc.py file support, so that the shell is automatically loaded with some useful variables. The main pycrustrc.py file in the PythonCardPrototype directory: shell.autoCompleteIncludeMagic = 1 shell.autoCompleteIncludeSingle = 0 shell.autoCompleteIncludeDouble = 0 bg = pcapp.getCurrentBackground() comp = bg.components Here is the pycrustrc.py file for the turtle sample: from wxTurtle import * dc = TurtleDC(pcapp.getCurrentBackground().panel) t = Pen(dc) You can put any valid Python code in there and it will be executed when the app starts up. The main package pycrustrc.py file is run at startup followed by the one in the app directory. Among other things it means you can put repetitive test commands in the pycrustrc.py file and as you change your source and rerun the app it will automatically load the commands and run your tests. Patrick might have something to add to this description. It is a very useful feature we've had almost since we started using PyCrust. ka |