##// END OF EJS Templates
Merge pull request #3538 from minrk/launch_ip...
Merge pull request #3538 from minrk/launch_ip add IPython.start_ipython A public API for starting a real (non-embedded) IPython instance. should avoid API breakage in the future due to simple module renames, as has just happened with the removal of frontend. For implementation purposes, I have added launch_new_instance as a classmethod on Application. I did this, because I wanted to add the ability to pass arguments to the instance, and didn't want to manually update every duplicate launch_new_instance. closes #1537

File last commit:

r11033:fa36e98f
r11281:fa43da77 merge
Show More
fabfile.py
30 lines | 1.0 KiB | text/x-python | PythonLexer
""" fabfile to prepare the notebook """
from fabric.api import local,lcd
from fabric.utils import abort
import os
static_dir = 'static'
components_dir = os.path.join(static_dir, 'components')
def css(minify=True, verbose=False):
"""generate the css from less files"""
source = os.path.join('style', 'style.less')
target = os.path.join('style', 'style.min.css')
_compile_less(source, target, minify, verbose)
def _to_bool(b):
if not b in ['True', 'False', True, False]:
abort('boolean expected, got: %s' % b)
return (b in ['True', True])
def _compile_less(source, target, minify=True, verbose=False):
"""Complie a less file by source and target relative to static_dir"""
minify = _to_bool(minify)
verbose = _to_bool(verbose)
min_flag = '-x' if minify is True else ''
ver_flag = '--verbose' if verbose is True else ''
lessc = os.path.join('components', 'less.js', 'bin', 'lessc')
with lcd(static_dir):
local('{lessc} {min_flag} {ver_flag} {source} {target}'.format(**locals()))