The Special FilesControlling and Customising Movable Python![]() IntroductionSome of the behavior of Movable Python is controlled by a few files in the lib directory. You can configure :
These files all use simple text based formats; they can be edited with any text editor. Some of these can be changed by the GUI, and are probably better not edited by hand. See the individual sections for details. Note The GUI can only save changes if it has write permission in the lib directory. That means you can't save changes if your distribution is on a CD. customize.pyThis Python script is run (rather than imported) before every program is run. This means you can edit it to customise the environment your scripts run in. It is also run before entering interactive mode. (- at the command line, or the interpreter launched from the GUI.) There is a module called movpy which you can import to give you access to information about the environment the interpreter is running. Note Note the spelling of the filename customize.py. Sorry for the inconsistentency in my spelling. The movpy module defines the following names.
syspaths.pthThis file lets you specify directories to add to the module search path (sys.path). If paths are specified as relative locations, they should be relative to the 'lib/' directory in which the path file lives. If you manually add a module into your lib directory that normally has a '.pth' file [1], then you will need to make an entry here. This includes modules like 'wx', 'pyGTK', 'PIL', etc. (Note that win32 has particular complications. Read the instructions at win32ext). Copying the contents of the '.pth' file into syspaths.pth will usually be sufficient. Note .pth files can contain import statements. This isn't supported by Movable Python. Config FilesThe lib/config/ directory contains various config files used by Movable Python. These include :
The Logs DirectoryThe directory lib/config/logs/ is the default location for files created by Movable Python logging. ipythonrc.iniThis file is your configuration file for IPython. IPython is very powerful and flexible. See the manual in the 'manuals' directory for details on how to configure and use IPython to its best. Return to Top |
|