~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to addons/kate/pate/src/plugins/python_console_ipython/__init__.py

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
"""IPython console for hacking kate and doing science"""
3
 
 
4
 
from .python_console_ipython import *
5
 
 
6
 
 
7
 
consoleToolView = None
8
 
 
9
 
@kate.init
10
 
def init():
11
 
    # Make an instance of a console tool view
12
 
    global consoleToolView
13
 
    if consoleToolView is None:
14
 
        consoleToolView = ConsoleToolView(kate.mainWindow())
15
 
 
16
 
 
17
 
@kate.unload
18
 
def destroy():
19
 
    '''Plugins that use a toolview need to delete it for reloading to work.'''
20
 
    global consoleToolView
21
 
    if consoleToolView:
22
 
        del consoleToolView
23
 
        consoleToolView = None