##// END OF EJS Templates
Reverse hscrollbar min-height hack on OS X...
Reverse hscrollbar min-height hack on OS X OS X has optional behavior to only draw scrollbars during scroll, which causes problems for CodeMirror's scrollbars. CodeMirror's solution is to set a minimum size for their scrollbars, which is always present. The trade is that the container overlays most of the last line, swallowing click events when there is scrolling to do, even when no scrollbar is visible. This reverses the trade, recovering the click events at the expense of never showing the horizontal scrollbar on OS X when this option is enabled.

File last commit:

r18302:2042215b
r20298:2907e856
Show More
cythonmagic.py
43 lines | 1.4 KiB | text/x-python | PythonLexer
# -*- coding: utf-8 -*-
"""
The cython magic has been integrated into Cython itself,
which is now released in version 0.21.
cf github `Cython` organisation, `Cython` repo, under the
file `Cython/Build/IpythonMagic.py`
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2010-2011, IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
from __future__ import print_function
import IPython.utils.version as version
try:
import Cython
except:
Cython = None
try:
from Cython.Build.IpythonMagic import CythonMagics
except :
pass
## still load the magic in IPython 3.x, remove completely in future versions.
def load_ipython_extension(ip):
"""Load the extension in IPython."""
print("""The Cython magic has been move to the Cython package, hence """)
print("""`%load_ext cythonmagic` is deprecated; Please use `%load_ext Cython` instead.""")
if Cython is None or not version.check_version(Cython.__version__, "0.21"):
print("You need Cython version >=0.21 to use the Cython magic")
return
print("""\nThough, because I am nice, I'll still try to load it for you this time.""")
Cython.load_ipython_extension(ip)