# What's new?

- 2018-apr-24
  - Removed support for Numeric obsolete python package.

- 2018-apr-09
  - The __dir__ method of the gdict container (see section 2.3.3) is now redefined to return the list of Gildas-Python shared variables.

- 2014-oct-13
  - Added support for Python 3 (see details in section 4). Removed support for Python 2.5 and lower. Python 2.6 and 2.7 still supported.

- 2013-may-31
  - Added argument verbose=True|False to the method get() (indicate if the method should be verbose or not when importing Sic variables).

- 2013-may-30
  - Document how to build Gildas with Python 2, when Python 3 is the default on the system. Waiting for Python 3 support in the Gildas-Python binding, currently under development.

- 2012-may-14
  - The method .sicerror() is added to the Gildas-Python modules (e.g. pysic, pygreg, etc). It is intended to set the error status ON in Sic when executing a Python script, in order to raise custom errors from Python.
  - The method .message() is added to the Gildas-Python modules, in conjuction to the object seve. They should be used to print messages like Sic does, including on-screen and/or to-file redirection, and application of filtering rules.

- 2012-mar-06
  - Double quotes surrounding character strings arguments in SIC are now preserved when they are passed to the sys.argv list in Python. This is a change of behavior as they were implicitely removed up to now, but could lead to problems on some cases, e.g. for Python commands using a leading “/” for options as Sic does.

- 2010-sep-07
  - SIC aliases created from the SIC side are now automatically imported to the Python side, like any other variables. SIC aliases were already supported, but not imported by default.

- 2010-jul-08
  - Python 2.7 and NumPy 1.4.1 are supported.

- 2010-mar-03
  - Added automatic creation of booleans (SIC logicals) when they are attached to a SicStructure.

- 2010-jan-11
  - When executing a Python script from Gildas, 'sys.argv' is now a list (and not a tuple anymore). This conforms the standard Python behavior.

- 2010-jan-07
  - Improved retrieving of the arguments passed to a Python script through the SIC PYTHON command. Make sure that double quoted strings with arbitrary number of blanks are not split nor modified.

- 2009-nov-18
  - Nested structures could not be correctly imported into Python in some cases. Fixed.

- 2009-oct-06
  - Added method 'getlogical' which translates a SIC logical and returns it in a Python string.

- 2009-apr-27
  - Fixed a recursive call at initialization time of SicVar instances.
  - Ensure support for Python 2.6.2

- 2008-aug-01
  - Ensure support for Python 2.5.2

- 2008-jun-02
  - Gildas packages are available with a py* prefix: pysic, pygreg, pyastro, pyclass and pymapping.
  - Enhanced support of string (scalar) variables: they are imported as a single element, i.e. characters are not splitted anymore in a subarray.
  - Enhanced support of SicStructure: adding an attribute to a SicStructure in Python automatically augments the corresponding structure in SIC.

- 2008-mar-06
  - New beta release, still under development. As of the current date, pysic and pygreg modules are obsolescent. They are replaced by a direct import of Gildas libraries which have been made Python-importable. This can be done by import commands such as import libgreg. Please consider that the prefix lib will soon disappear, and pysic and pygreg modules will not be available anymore at this point.
  - Thanks to the point above, some of the Gildas programs are now also importable from Python: libastro, libclass. More will come soon.

- 2006-mar-13
  - Python modules pysic and pygreg are now provided to users. Importing one of them into a Python script launches the SIC (resp. GreG) process and imports its variables into the Python __main__.
  - Sic.localspaces: to prevent overwriting a variable when a deeper-level one is created in SIC with the same name, a saving and unsaving automatic mechanism of the SicVar and SicStructure instances into a 10-dimensional array (one per level) is now available. To achieve this, the SicVar and SicStructure instances now have a __siclevel__ attribute.
  - Sic.warnings logical flag activates/deactivates PygildasWarning's.
  - Improvement of the Numeric 24.2 retrocompatibility.
  - Enforced variable write-protection (if any) by setting the `writeable' flag of the numpy.ndarray's. For compatibility with Numeric, read-and-write or read-only status in SIC is still checked each time array elements are attempted to be modified.
  - define() command can now be passed a second optional boolean argument which describes if the variable will be global or not. By default it is not, e.g. it is local to the current execution level.
  - Images are now automatically imported into Python at creation time. The get() command is now also able to import images, thus the getimage() command is not available anymore for users.
  - pexecfile() function is provided to user. It does the same as the execfile() Python function (execute a Python script in current name space), but also prints the commands during execution.
  - SICPYTHON PythonCommandLine and SICPYTHON PythonProcedureName.py functionalities now print or not the command lines depending on the SIC%VERIFY flag value.
  - SICPYTHON PythonProcedureName.py functionality now allows to be passed arguments. They can be retrieved in the 'sys.argv' list from Python. Arguments are parsed by SIC before calling the script. SIC now also searches in the MACRO#DIR: directories to find the Python script. Logical names are parsed if any.
  - Exit behavior is now the same whatever is the master process. To quit both SIC and Python, use CTRL-D (or exit()) from Python, or EXIT from SIC. As a consequence, use PYTHON (from SIC) and Sic() (from Python) to switch to the other command-line interpreter.
  - 64 bits support.

- 2006-oct-12
  - First beta release.

- 2006-sep-13
  - Python embedding into SIC. Python interpreter is started with new SIC command 'PYTHON', and can execute Python command-lines, Python scripts, or even jump to interactive mode.
  - Python (numerical) functions can now be called in SIC formulas, provided Python interpreter is started and function exists in Python __main__.
  - Support for both Numeric and NumPy modules: __sicdata__ attribute is a numpy.ndarray if NumPy is installed, or a Numeric.array if not.

- 2006-jul-07
  - Loss of the sicarray type. SicVar instances have now two elements: __sicname__ (the SIC variable name) and __sicdata__ (a numpy.ndarray). Previously __sicdata__ was a sicarray with itself a Numeric.array attribute.
  - NumPy support: SIC variables (arrays and scalars) are now imported as numpy.ndarray, using the same C-API function from Numeric that NumPy still supports.
  - Adaptation of the adequates methods of the SicVar class to handle the unique element of the numpy.ndarray scalars through [0] indexing (NumPy only provides indexing for its scalars through [()] index).
  - Attempting to define an image attribute which name is already used for a native method or attribute of the numpy.ndarray's will not raise an error anymore but will only warn the user.
  - SicVar strings now support concatenation (+) and duplication (*).
  - Automatic blank filling when assigning a Python string to a SicVar string (Numeric provides this feature but NumPy does not: it requires the two strings to have the same length).
  - A SicVar subarray is now also a SicVar with the same __sicname__ attribute and with a __sicdata__ sharing its data with the original array, and thus with the SIC variable (previously a SicVar subarray was a Numeric.array). Such subarrays inherit the SicVar specific methods, such as string handling or write protection if any.
  - Usefull functions such as get(), comm() or exa() are now methods of the Sicfunctions class, and are visible through the sic instance created during the process initialization.
  - Creation of the sic(), greg(), define() and delete() methods of the Sic functions class.

- 2006-jun-21
  - First unofficial release.