This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------ | |
# Copyright (c) 2019, Nucleic Development Team. | |
# | |
# Distributed under the terms of the Modified BSD License. | |
# | |
# The full license is in the file COPYING.txt, distributed with this software. | |
#------------------------------------------------------------------------------ | |
""" An example illustrating the tracing inside declarative function. | |
Declarative function body can be traced. When used as the right hand side of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enaml.compat import IS_PY3 | |
from future.utils import exec_ | |
from enaml.core.enaml_compiler import EnamlCompiler | |
from enaml.core.parser import parse | |
# Timeout for qtbot wait (the value used is large due to Travis being sometimes | |
# very slow). | |
TIMEOUT = 2000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Gist demonstarting the SystemError bug on python 3 | |
""" | |
#------------------------------------------------------------------------------- | |
# Imports: | |
#------------------------------------------------------------------------------- | |
from atom.api import List, observe | |
from enaml.widgets.api import RawWidget | |
from enaml.core.declarative import d_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enaml.widgets.api import Window, Container, Field | |
enamldef Main(Window): | |
attr aux = '' | |
attr bis << str(aux) | |
bis :: | |
print(bis) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from enaml.core.api import Conditional | |
from enaml.widgets.api import (Window, Container, ObjectCombo, PushButton, | |
ScrollArea, GroupBox, Label) | |
enamldef Displayable(GroupBox): cont: | |
attr sp_children = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from numba import jitclass, float64, jit | |
from funcsigs import signature | |
from future.utils import exec_ | |
class Integrand(object): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
""" | |
import os | |
from shutil import copyfile | |
from configobj import ConfigObj | |
# This dictionary specifies tasks whose name has simply changed but are | |
# otherwise untouched and can be simply renamed. | |
UPDATED_TASK_NAMES = {'PrintTask': 'LogTask', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from atom.api import Atom, Dict, Str, Typed | |
class aux(Atom): | |
pass | |
class A(Atom): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from atom.api import Atom, Float | |
class Test(Atom): | |
a = b = Float(0) | |
def _post_setattr_a(x, y, z): | |
print 'a' | |