swig/Lib/python
Kris Thielemans a495b5a985 Remove SwigPyObject_print and SwigPyObject_str, and make the generated wrapper use the default python implementations, which will fall back to repr (for -builtin option).
Advantages:
- it avoids the swig user having to jump through hoops to get print to
  work as expected when redefining repr/str slots.
- typing the name of a variable on the python prompt now prints the
  result of a (possibly redefined) repr, without the swig user having to
do any extra work.
- when redefining repr, the swig user doesn't necessarily have to
  redefine str as it will call the redefined repr
- the behaviour is exactly the same as without the -builtin option while
  requiring no extra work by the user (aside from adding the
%feature("python:slot...) statements of course)
- the patch simplifies pyrun.swg a tiny bit.

Disadvantage:
- default str() will give different (but clearer?) output on swigged
  classes compared to unpatched swig

SF Bug #326
2013-08-07 20:22:03 +01:00
..
argcargv.i minor formatting change 2010-04-23 06:44:47 +00:00
attribute.i move attribute.i to the typemap library, now is usable from all the languages 2005-10-25 13:20:50 +00:00
boost_shared_ptr.i Cosmetic Python changes and replace DOH types 2011-04-04 20:13:14 +00:00
builtin.swg Add SF patch #342 fix some director classes crashing on object deletion when using -builtin. 2013-07-01 19:25:34 +01:00
carrays.i Fix constructors in named typedef class declarations 2011-08-25 19:27:38 +00:00
ccomplex.i SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear. 2010-02-27 23:26:02 +00:00
cdata.i massive typemap unification 2005-10-18 13:24:15 +00:00
cmalloc.i more typemaps unification and fixes for valgrind 2005-10-19 10:52:50 +00:00
cni.i uniform cni examples 2006-01-03 19:48:06 +00:00
complex.i more comments and cosmetic fixes 2004-03-23 01:07:45 +00:00
cpointer.i more typemaps unification and fixes for valgrind 2005-10-19 10:52:50 +00:00
cstring.i Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names 2005-10-24 14:59:05 +00:00
cwstring.i Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names 2005-10-24 14:59:05 +00:00
defarg.swg update to use proxy terminology 2006-06-29 21:17:30 +00:00
director.swg Fix typo in comment (swift->swig) 2013-03-20 15:39:03 +13:00
embed.i Fix comment typos 2009-04-29 12:00:38 +00:00
embed15.i SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear. 2010-02-27 23:26:02 +00:00
exception.i use internal SWIG_exception_fail, let SWIG_exception as in 1.3.27 2006-01-14 21:23:36 +00:00
factory.i add the factory library for UTL 2006-02-22 18:42:20 +00:00
file.i SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear. 2010-02-27 23:26:02 +00:00
implicit.i securing the call to SWIG_IsOK, which is a macro 2005-12-30 01:14:24 +00:00
jstring.i add jstring.i for ruby 2005-12-30 10:51:35 +00:00
Makefile.in Remove cvs $Header$ 2007-10-17 21:43:55 +00:00
pyabc.i Merged the Python 3.0 support branch. The merging progress is not so smooth, so hope this commit won't make anything broken. 2008-09-11 17:18:07 +00:00
pyapi.swg Cosmetics - Fix bracket matching 2011-04-09 23:48:19 +00:00
pybackward.swg add more backward comp macros/fragments/methods 2006-01-28 08:59:32 +00:00
pybuffer.i changed the mapped 'SIZE' of buffer interface from the length of raw buffer to number of items in the buffer. So it would be easier to use with type other than 'char' 2009-02-10 14:21:43 +00:00
pyclasses.swg Regressions pass! With a few tweaks for unsupported features, primarily: 2011-01-30 03:17:28 +00:00
pycomplex.swg Fix comment typos 2009-04-29 12:00:38 +00:00
pycontainer.swg Fix some invalid iterator usage in Python when deleting/inserting slices from/into containers 2013-03-26 21:38:45 +00:00
pydocs.swg Numerous autodoc fixes for Python 2011-06-10 19:33:40 +00:00
pyerrors.swg Fix the memory leak related to Python 3 unicode and char * conversion. 2009-03-19 15:26:57 +00:00
pyfragments.swg Fix confusion of filenaming in comment 2007-11-19 21:32:01 +00:00
pyhead.swg Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types 2012-12-09 20:49:52 +00:00
pyinit.swg Suppress -Werror=unused-but-set-variable gcc warning in Python wrappers 2012-08-08 22:24:46 +00:00
pyiterators.swg Fix missing stddef.h when %import of STL containers. Was causing compile failures witht g++-4.6. 2012-03-20 20:07:56 +00:00
pymacros.swg add more backward comp macros/fragments/methods 2006-01-28 08:48:48 +00:00
pyname_compat.i Remove SwigPyObject_print and SwigPyObject_str, and make the generated wrapper use the default python implementations, which will fall back to repr (for -builtin option). 2013-08-07 20:22:03 +01:00
pyopers.swg From swig-user 7/6/11: fix closure for tp_call. 2011-07-20 15:20:24 +00:00
pyprimtypes.swg Fix Python 3 inconsistency handling -ve numbers for unsigned C types. 2013-05-25 10:36:14 +01:00
pyrun.swg Remove SwigPyObject_print and SwigPyObject_str, and make the generated wrapper use the default python implementations, which will fall back to repr (for -builtin option). 2013-08-07 20:22:03 +01:00
pyruntime.swg Use a less confusing macro name, SWIG_PYTHON_NO_DEBUG => SWIG_PYTHON_INTERPRETER_NO_DEBUG 2013-06-11 19:15:57 +01:00
pystdcommon.swg A slew of changes based on William Fulton's code review. 2011-03-29 06:57:02 +00:00
pystrings.swg A slew of changes based on William Fulton's code review. 2011-03-29 06:57:02 +00:00
python.swg fix -external-runtime and warning arounds in subversion 2006-02-01 08:37:53 +00:00
pythonkw.swg Numerous autodoc fixes for Python 2011-06-10 19:33:40 +00:00
pythreads.swg fix extra calls to TypeQuery for 'char *' and 'wchar_t *' 2005-12-10 20:20:19 +00:00
pytuplehlp.swg Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names 2005-10-24 14:59:05 +00:00
pytypemaps.swg Cosmetic Python changes and replace DOH types 2011-04-04 20:13:14 +00:00
pyuserdir.swg Add %pythonbegin directive. 2013-07-05 06:30:16 +01:00
pywstrings.swg SWIG_AsWCharPtrAndSize improper operation if cptr NULL 2013-07-02 18:58:56 +01:00
README Fix comment and documentation typos 2008-05-14 14:53:10 +00:00
std_alloc.i better support for string and def. args, plus adding allocator + sstream 2004-12-01 01:22:30 +00:00
std_basic_string.i add thread support based in proposal #398495 by Joseph Winston 2005-12-06 06:39:24 +00:00
std_carray.i Commited SF#2158938: change all SWIG symbols start with Py to a new name. 2008-12-03 18:43:44 +00:00
std_char_traits.i isolate language independent STD/STL/C++ code + more documentation + cleaning 2004-10-10 06:42:15 +00:00
std_common.i Fix #3475492 - iterating through std::vector wrappers of enumerations. 2012-03-13 07:10:24 +00:00
std_complex.i cosmetic fixes 2005-11-27 02:59:13 +00:00
std_container.i isolate language independent STD/STL/C++ code + more documentation + cleaning 2004-10-10 06:42:15 +00:00
std_deque.i isolate language independent STD/STL/C++ code + more documentation + cleaning 2004-10-10 06:42:15 +00:00
std_except.i add std_except typemaps to the unified typemap library 2005-10-31 09:43:02 +00:00
std_ios.i isolate language independent STD/STL/C++ code + more documentation + cleaning 2004-10-10 06:42:15 +00:00
std_iostream.i better support for string and def. args, plus adding allocator + sstream 2004-12-01 01:22:30 +00:00
std_list.i isolate language independent STD/STL/C++ code + more documentation + cleaning 2004-10-10 06:42:15 +00:00
std_map.i Fix for missing C++ code in std::multimap wrappers. 2013-08-06 07:02:49 +01:00
std_multimap.i Fix for missing C++ code in std::multimap wrappers. 2013-08-06 07:02:49 +01:00
std_multiset.i Commited SF#2158938: change all SWIG symbols start with Py to a new name. 2008-12-03 18:43:44 +00:00
std_pair.i Fix for METH_O and -compactdefaultargs, in two parts: 2011-04-02 21:40:00 +00:00
std_set.i Add discard and add methods to std::set and std::multiset wrappers so that pyabc.i can be used ensuring MutableSet is a valid abstract base class 2012-08-15 22:36:15 +00:00
std_shared_ptr.i Add std_shared_ptr.i and document shared_ptr library 2010-06-01 19:03:55 +00:00
std_sstream.i better support for string and def. args, plus adding allocator + sstream 2004-12-01 01:22:30 +00:00
std_streambuf.i better support for string and def. args, plus adding allocator + sstream 2004-12-01 01:22:30 +00:00
std_string.i Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names 2005-10-24 14:59:05 +00:00
std_vector.i isolate language independent STD/STL/C++ code + more documentation + cleaning 2004-10-10 06:42:15 +00:00
std_vectora.i isolate language independent STD/STL/C++ code + more documentation + cleaning 2004-10-10 06:42:15 +00:00
std_wios.i allow to use iostream and sstream without wchar support, as pointed by Scott 2005-04-03 03:16:25 +00:00
std_wiostream.i add fragment warning and fixes 2006-01-30 22:22:13 +00:00
std_wsstream.i allow to use iostream and sstream without wchar support, as pointed by Scott 2005-04-03 03:16:25 +00:00
std_wstreambuf.i allow to use iostream and sstream without wchar support, as pointed by Scott 2005-04-03 03:16:25 +00:00
std_wstring.i Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names 2005-10-24 14:59:05 +00:00
stl.i add initial stl.i to ensure proper file inclussion and extensions for each language 2006-01-06 00:37:31 +00:00
typemaps.i SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear. 2010-02-27 23:26:02 +00:00
wchar.i allow to use iostream and sstream without wchar support, as pointed by Scott 2005-04-02 19:06:31 +00:00

/* -----------------------------------------------------------------------------
 *
 *  User interfaces: include these ones as needed
 *
 * ----------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------
 *  Special types and user helpers 
 * ----------------------------------------------------------------------------- */

argcargv.i		Handler for (int argc, char **argv)
attribute.i		Convert a pair of set/get methods into a "native" python attribute
ccomplex.i		C99 complex type
complex.i		C99 or C++ complex type
cstring.i		Various forms of C character string handling
cwstring.i		Various forms of C wchar_t string handling
embed.i			embedding the Python interpreter in something else
embed15.i		embedding the Python interpreter in something else
file.i			FILE C type
implicit.i		Allow the use of implicit C++ constructors
wchar.i			wchar_t C type

/* -----------------------------------------------------------------------------
 *  C++ STD + STL
 * ----------------------------------------------------------------------------- */

std_alloc.i		allocator 
std_basic_string.i	basic string
std_char_traits.i	char traits
std_complex.i		complex
std_deque.i		deque	
std_except.i		exceptions
std_ios.i		ios
std_iostream.i		istream/ostream
std_list.i		list
std_map.i		map
std_multimap.i		multimap
std_multiset.i		multiset
std_pair.i		pair
std_set.i		set
std_sstream.i		string stream
std_streambuf.i		streambuf
std_string.i		string
std_vector.i		vector
std_wios.i		wios
std_wiostream.i		wistream/wostream
std_wsstream.i		wstring stream
std_wstreambuf.i	wstreambuf
std_wstring.i		wstring



/* -----------------------------------------------------------------------------
/* 
 *  Implementation files: don't look at them unless you are really drunk
 *
 * ----------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------
 *  Basic files
 * ----------------------------------------------------------------------------- */

python.swg		Main language file, it just includes what is needed.
pyuserdir.swg		User visible directives (%pythonnondynamic, etc)
pymacros.swg		Internal macros used for typemaps
pyfragments.swg		Allow the user to overload the default fragments
pyopers.swg		Python operations (+=, *=, etc)
pythonkw.swg		Python keywords and special names
pyinit.swg		Python Init method

/* -----------------------------------------------------------------------------
 *  The runtime part
 * ----------------------------------------------------------------------------- */

pyruntime.swg		Main runtime file definition
pyapi.swg		SWIG/Python API declarations
pyrun.swg		Python run-time code 

/* -----------------------------------------------------------------------------
 *  Internal typemap specializations
 * ----------------------------------------------------------------------------- */

pyswigtype.swg		SWIGTYPE
pystrings.swg		Char strings (char *)
pywstrings.swg		Wchar Strings (wchar_t *)
pyprimtypes.swg		Primitive types (shot,int,double,etc)
pycomplex.swg		PyComplex and helper for C/C++ complex types
pydocs.swg		Typemaps documentation

/* -----------------------------------------------------------------------------
 *  C++ STD + STL
 * ----------------------------------------------------------------------------- */

pycontainer.swg		python container iterators
std_common.i		general common code for the STD/STL implementation
std_container.i		general common code for the STD/STL containers


/*-----------------------------------------------------------------------------
 *  Backward compatibility and deprecated
 * ----------------------------------------------------------------------------- */

std_vectora.i		vector + allocator (allocators are now supported in STD/STL)
typemaps.i		old in/out typemaps (doesn't need to be included)
defarg.swg		for processing default arguments with shadow classes