~ubuntu-branches/ubuntu/wily/spyder/wily-proposed

« back to all changes in this revision

Viewing changes to spyderlib/widgets/objecteditor.py

  • Committer: Package Import Robot
  • Author(s): Ghislain Antony Vaillant, Ghislain Antony Vaillant, Picca Frédéric-Emmanuel
  • Date: 2014-10-19 11:42:57 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20141019114257-st1rz4fmmscgphhm
Tags: 2.3.1+dfsg-1
* Team upload

[Ghislain Antony Vaillant]
* New upstream release. (Closes: #765963)
* Bump Standards-Version to 3.9.6 (no changes required).
* d/control: fix pedantic lintian warning regarding capitalization in
  packages' description.

[Picca Frédéric-Emmanuel]
* Update the homepage now that upstream moved to bitbucket.
* debian/copyright
  - updated for 2.3.1 version
* debian/control
  + Recommends: python-pandas and python3-pandas

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    # Local import
59
59
    from spyderlib.widgets.texteditor import TextEditor
60
60
    from spyderlib.widgets.dicteditorutils import (ndarray, FakeObject,
61
 
                                                   Image, is_known_type)
 
61
                                                   Image, is_known_type,
 
62
                                                   DataFrame, TimeSeries)
62
63
    from spyderlib.widgets.dicteditor import DictEditor
63
64
    from spyderlib.widgets.arrayeditor import ArrayEditor
64
 
 
 
65
    if DataFrame is not FakeObject:
 
66
        from spyderlib.widgets.dataframeeditor import DataFrameEditor
 
67
    
65
68
    conv_func = lambda data: data
66
69
    readonly = not is_known_type(obj)
67
70
    if isinstance(obj, ndarray) and ndarray is not FakeObject:
79
82
            return
80
83
        from spyderlib.pil_patch import Image
81
84
        conv_func = lambda data: Image.fromarray(data, mode=obj.mode)
 
85
    elif isinstance(obj, (DataFrame, TimeSeries)) \
 
86
         and DataFrame is not FakeObject:
 
87
        dialog = DataFrameEditor()
 
88
        if not dialog.setup_and_check(obj):
 
89
            return              
82
90
    elif is_text_string(obj):
83
91
        dialog = TextEditor(obj, title=obj_name, readonly=readonly)
84
92
    else: