replace os.tmpfile() by tempfile.TemporaryFile()
Merge remote-tracking branch 'origin/develop' into py3_tempfile

Conflicts:
	src/doc/en/thematic_tutorials/linear_programming.rst
	src/sage/numerical/backends/glpk_backend.pyx
	src/sage/numerical/linear_functions.pyx
	src/sage/numerical/mip.pyx
Fixed cocharge for A2Dual and better support for D_4^(3) and relabelled types.
Made half with type B into a global option and French convention latex fix.
Merge branch 'develop' into public/rigged_configurations/fixes-16876
Merge branch 'develop' into public/rigged_configurations/fixes-16876
Updating references.
trac #17038: deprecated_callable_import should mention the deprecation in __doc__
Change random_subposet to use Sage's own random system instead of
Python's internal.
Arghs, again other code within same file. Corrected.
trac #17044 fix to pexpect interface, as required by wstein
Only use script_directory for existing directories
Added some documentation to cocharge.
fix directories to reflect current documentation
Merge branch 'public/rigged_configurations/fixes-16876' of trac.sagemath.org:sage into public/rigged_configurations/fixes-16876
Merge with 6.4.beta4
trac #17004 remove a few unused imports
trac #17004 putting one import back
Trac #16876: Fix cocharge on A2Dual rigged configurations and better support for D_4^(3) and relabelled types

Currently, cocharge is not calculated correctly for type
A,,2n,,^(2)\dagger^. The cocharge should be half of the virtual.
{{{
sage: RC = RiggedConfigurations(CartanType(['A',4,2]).dual(),
[[1,1],[2,2]])
sage: for mg in RC.module_generators:
....:     mg.cocharge()
....:     mg.to_virtual_configuration().cocharge()
....:     print ""
0
0

1/2
2

0
2

1/2
2

1/2
4

0
4

1
6
}}}
Also rigged configurations for type D,,4,,^(3)^ and other relabelled
types aren't well supported, but is solved with better handling of the
index set.
{{{
sage: RC = RiggedConfigurations(['D',4,3], [[1,1]])
sage: RC.module_generators
(

(/)

(/)

)
}}}
There should be another generator.

This also makes `use_half_width_boxes_type_B` into a global option (as
it should've been done in #16324, but I forgot). It also makes the latex
of a rigged configuration respect the French convention.

URL: http://trac.sagemath.org/16876
Reported by: tscrim
Ticket author(s): Travis Scrimshaw
Reviewer(s): Anne Schilling
Trac #17068: Update SageTeX documentation in tutorial

I'm preparing a brief talk on using SageTeX, and discovering that the
tutorial seems to be incorrect.

http://www.sagemath.org/doc/tutorial/sagetex.html

"The full documentation can be found in
SAGE_ROOT/local/share/texmf/tex/generic/sagetex, where SAGE_ROOT is the
directory where your Sage installation is located."

In fact, it refers to this for the doc a few times.  It also refers to
the incorrect name for the .sage file produced, which should be
st_example.sagetex.sage

The installation guide seems to be correct...

http://www.sagemath.org/doc/installation/sagetex.html

says

"While not strictly part of installation, it bears mentioning here that
the documentation for SageTeX is maintained in
SAGE_ROOT/local/share/doc/sagetex/sagetex.pdf. There is also an example
file in the same directory – see example.tex and example.pdf, the pre-
built result of typesetting that file with LaTeX and Sage."

URL: http://trac.sagemath.org/17068
Reported by: kcrisman
Ticket author(s): Dan Drake
Reviewer(s): Dima Pasechnik