Going beyond¶
ipython¶
We have presented many functions in this introduction. Recall that ipython is a wonderful tool to find the information quickly, with more details than in this introduction.
Suppose for instance, we want to create a cylinder but we don’t remember the syntax. We can get information on the Cylinder class immediatly by typing ?Cylinder in ipython. And we can get the complete code for the Cylinder class by typing ??Cylinder.
A file called “ipycao” has been prepared for easy interaction with ipython. It is in the located in the core directory of pycao. As for templates, the variable pycaoDir needs to be settled before using the file. Once the pycaoDir variable is settled in the ipycao file, we cd to core directory of ipycao.py and we type “ipython” or “ipython3” to launch ipython. When we have the python prompt, we enter: “run ipycao.py”
THen we can interact with pycao and ask information or source code on a function,class, variable … For instance, ?camera and ??camera to get the information on the camera class as explained above. Moreover, to get the methods of construction of an object, recall that many constructions start with the string from. Thus to see the many ways to define a plane, in ipython, enter “plane.from” and press tab for completion. You will see the name of the functions to construct a plane.