Difference between revisions of "Toga Tutorial Log"

From OpenCircuits
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= What =
 
= What =
  
This page is a log of setting up Toga on Ubuntu for Spyder see: [[Setup Toga with Spyder]]
+
This page is a log of running the Toga Tutorial at:  https://toga.readthedocs.io/en/latest/tutorial/tutorial-1.html  see: [[Setup Toga with Spyder]]
  
= The Log =
+
= The Console Log =
 
<pre>
 
<pre>
 
 
==================== most of terminal and console output trying to get toga to run
 
 
on ubuntu with anaconda and spyder some things work and other not search on >= for major sections in this file ===================
 
 
 
> ============================= git and pip =============
 
 
russ@ubuntu-18-base:~$ git config --global user.name "russ-hensel"
 
russ@ubuntu-18-base:~$ git config --global user.email xxxx@comcast.net
 
russ@ubuntu-18-base:~$ pip3 install --upgrade pip
 
Collecting pip
 
  Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
 
    100% |████████████████████████████████| 1.3MB 228kB/s
 
Installing collected packages: pip
 
Successfully installed pip-18.0
 
russ@ubuntu-18-base:~$ git clone https://github.com/russ-hensel/toga.git
 
Cloning into 'toga'...
 
remote: Counting objects: 20364, done.
 
remote: Compressing objects: 100% (133/133), done.
 
remote: Total 20364 (delta 145), reused 152 (delta 108), pack-reused 20123
 
Receiving objects: 100% (20364/20364), 5.46 MiB | 4.81 MiB/s, done.
 
Resolving deltas: 100% (15716/15716), done.
 
 
 
russ@ubuntu-18-base:~$ cd toga
 
russ@ubuntu-18-base:~/toga$ pip install -e src/core
 
Obtaining file:///home/russ/toga/src/core
 
Collecting travertino>=0.1.0 (from toga-core==0.3.0.dev10)
 
  Downloading https://files.pythonhosted.org/packages/56/3f/f03efe63c2bdc72763ac39777c9ebbab98605ced5c74aefe48b4fa0abb4d/travertino-0.1.2-py3-none-any.whl
 
Installing collected packages: travertino, toga-core
 
  Running setup.py develop for toga-core
 
Successfully installed toga-core travertino-0.1.2
 
 
russ@ubuntu-18-base:~/toga$ pip install -e src/dummy
 
Obtaining file:///home/russ/toga/src/dummy
 
Requirement already satisfied: toga-core==0.3.0.dev10 in ./src/core (from toga-dummy==0.3.0.dev10) (0.3.0.dev10)
 
Requirement already satisfied: travertino>=0.1.0 in /home/russ/anaconda3/lib/python3.6/site-packages (from toga-core==0.3.0.dev10->toga-dummy==0.3.0.dev10) (0.1.2)
 
Installing collected packages: toga-dummy
 
  Running setup.py develop for toga-dummy
 
Successfully installed toga-dummy
 
 
 
 
>======================= now src/gtk - which fails ======================
 
 
 
russ@ubuntu-18-base:~/toga$ pip install -e src/gtk
 
Obtaining file:///home/russ/toga/src/gtk
 
Requirement already satisfied: toga-core==0.3.0.dev10 in ./src/core (from toga-gtk==0.3.0.dev10) (0.3.0.dev10)
 
Collecting gbulb>=0.5.3 (from toga-gtk==0.3.0.dev10)
 
  Downloading https://files.pythonhosted.org/packages/3b/90/b46c4caedb2b14fb6a50201631d8181e1efcf8757182821a05fe572e2c9e/gbulb-0.5.3-py3-none-any.whl
 
Collecting pycairo>=1.17.0 (from toga-gtk==0.3.0.dev10)
 
  Downloading https://files.pythonhosted.org/packages/68/76/340ff847897296b2c8174dfa5a5ec3406e3ed783a2abac918cf326abad86/pycairo-1.17.1.tar.gz (194kB)
 
    100% |████████████████████████████████| 194kB 3.0MB/s
 
Collecting pygobject>=3.14.0 (from toga-gtk==0.3.0.dev10)
 
  Downloading https://files.pythonhosted.org/packages/e0/e8/1e4f21800015a9ca153969e85fc29f7962f8f82fc5dbc1ecbdeb9dc54c75/PyGObject-3.28.3.tar.gz (698kB)
 
    100% |████████████████████████████████| 706kB 3.4MB/s
 
Requirement already satisfied: travertino>=0.1.0 in /home/russ/anaconda3/lib/python3.6/site-packages (from toga-core==0.3.0.dev10->toga-gtk==0.3.0.dev10) (0.1.2)
 
Building wheels for collected packages: pycairo, pygobject
 
  Running setup.py bdist_wheel for pycairo ... error
 
  Complete output from command /home/russ/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g9bg8dc9/pycairo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-kvus6_it --python-tag cp36:
 
  running bdist_wheel
 
  running build
 
  running build_py
 
  creating build
 
  creating build/lib.linux-x86_64-3.6
 
  creating build/lib.linux-x86_64-3.6/cairo
 
  copying cairo/__init__.py -> build/lib.linux-x86_64-3.6/cairo
 
  copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.6/cairo
 
  copying cairo/py.typed -> build/lib.linux-x86_64-3.6/cairo
 
  running build_ext
 
  'pkg-config' not found.
 
  Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']
 
 
 
  ----------------------------------------
 
  Failed building wheel for pycairo
 
  Running setup.py clean for pycairo
 
  Running setup.py bdist_wheel for pygobject ... error
 
  Complete output from command /home/russ/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g9bg8dc9/pygobject/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-6d3a8tru --python-tag cp36:
 
  running bdist_wheel
 
  running build
 
  running build_py
 
  creating build
 
  creating build/lib.linux-x86_64-3.6
 
  creating build/lib.linux-x86_64-3.6/pygtkcompat
 
  copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-3.6/pygtkcompat
 
  copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-3.6/pygtkcompat
 
  copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-3.6/pygtkcompat
 
  creating build/lib.linux-x86_64-3.6/gi
 
  copying gi/_propertyhelper.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/module.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/_error.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/types.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/_signalhelper.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/_option.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/__init__.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/importer.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/docstring.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/_ossighelper.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/pygtkcompat.py -> build/lib.linux-x86_64-3.6/gi
 
  copying gi/_constants.py -> build/lib.linux-x86_64-3.6/gi
 
  creating build/lib.linux-x86_64-3.6/gi/repository
 
  copying gi/repository/__init__.py -> build/lib.linux-x86_64-3.6/gi/repository
 
  creating build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/GObject.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/Gio.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/GLib.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/Pango.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  copying gi/overrides/__init__.py -> build/lib.linux-x86_64-3.6/gi/overrides
 
  running build_ext
 
  'pkg-config' not found.
 
  Arguments: ('pkg-config', '--print-errors', '--exists', 'glib-2.0 >= 2.38.0')
 
 
 
  ----------------------------------------
 
  Failed building wheel for pygobject
 
  Running setup.py clean for pygobject
 
Failed to build pycairo pygobject
 
Installing collected packages: gbulb, pycairo, pygobject, toga-gtk
 
  Running setup.py install for pycairo ... error
 
    Complete output from command /home/russ/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g9bg8dc9/pycairo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-p1fkc09m/install-record.txt --single-version-externally-managed --compile:
 
    running install
 
    running build
 
    running build_py
 
    creating build
 
    creating build/lib.linux-x86_64-3.6
 
    creating build/lib.linux-x86_64-3.6/cairo
 
    copying cairo/__init__.py -> build/lib.linux-x86_64-3.6/cairo
 
    copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.6/cairo
 
    copying cairo/py.typed -> build/lib.linux-x86_64-3.6/cairo
 
    running build_ext
 
    'pkg-config' not found.
 
    Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']
 
   
 
    ----------------------------------------
 
Command "/home/russ/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g9bg8dc9/pycairo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-p1fkc09m/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-g9bg8dc9/pycairo/
 
russ@ubuntu-18-base:~/toga$
 
 
 
>============= so we have a fail, but lets try testing anyway - it works  =====================
 
 
        Public    Templates  Videos
 
russ@ubuntu-18-base:~$ cd toga
 
russ@ubuntu-18-base:~/toga$ cd src/core
 
russ@ubuntu-18-base:~/toga/src/core$ python setup.py test
 
running test
 
running egg_info
 
writing toga_core.egg-info/PKG-INFO
 
writing dependency_links to toga_core.egg-info/dependency_links.txt
 
writing requirements to toga_core.egg-info/requires.txt
 
writing top-level names to toga_core.egg-info/top_level.txt
 
reading manifest file 'toga_core.egg-info/SOURCES.txt'
 
reading manifest template 'MANIFEST.in'
 
warning: no files found matching 'LICENSE'
 
warning: no files found matching 'tox.ini'
 
writing manifest file 'toga_core.egg-info/SOURCES.txt'
 
running build_ext
 
test_family (tests.test_font.FontTests) ... ok
 
test_measure (tests.test_font.FontTests) ... ok
 
test_size (tests.test_font.FontTests) ... ok
 
test_style (tests.test_font.FontTests) ... ok
 
test_variant (tests.test_font.FontTests) ... ok
 
test_weight (tests.test_font.FontTests) ... ok
 
test_cmd_sort_key (tests.test_command.TestCommand) ... ok
 
test_command_bind (tests.test_command.TestCommand) ... ok
 
test_command_enabler (tests.test_command.TestCommand) ... ok
 
test_command_init_defaults (tests.test_command.TestCommand) ... ok
 
test_command_init_kargs (tests.test_command.TestCommand) ... ok
 
test_group_eq (tests.test_command.TestCommand) ... ok
 
test_group_init_no_order (tests.test_command.TestCommand) ... ok
 
test_group_init_with_order (tests.test_command.TestCommand) ... ok
 
test_group_lt (tests.test_command.TestCommand) ... ok
 
test_cmdset_add (tests.test_command.TestCommandSet) ... ok
 
test_cmdset_init (tests.test_command.TestCommandSet) ... ok
 
test_cmdset_iter (tests.test_command.TestCommandSet) ... ok
 
test_beeliza (tests.style.test_pack.PackLayoutTests) ... ok
 
test_tutorial_0 (tests.style.test_pack.PackLayoutTests) ... ok
 
test_tutorial_1 (tests.style.test_pack.PackLayoutTests) ... ok
 
test_tutorial_3 (tests.style.test_pack.PackLayoutTests) ... ok
 
test_set_background_color (tests.style.test_pack.TestPackStyleApply) ... ok
 
test_set_center_alignment (tests.style.test_pack.TestPackStyleApply) ... ok
 
test_set_color (tests.style.test_pack.TestPackStyleApply) ... ok
 
test_set_default_left_textalign_when_no_rtl (tests.style.test_pack.TestPackStyleApply) ... ok
 
test_set_default_right_textalign_when_rtl (tests.style.test_pack.TestPackStyleApply) ... ok
 
test_set_font (tests.style.test_pack.TestPackStyleApply) ... ok
 
test_set_visibility_hidden (tests.style.test_pack.TestPackStyleApply) ... ok
 
test_app_app_id (tests.test_app.AppTests) ... ok
 
test_app_documents (tests.test_app.AppTests) ... ok
 
test_app_exit (tests.test_app.AppTests) ... ok
 
test_app_icon (tests.test_app.AppTests) ... ok
 
test_app_id (tests.test_app.AppTests) ... ok
 
test_app_init_with_no_factory (tests.test_app.AppTests) ... ok
 
test_app_main_loop_call_impl_main_loop (tests.test_app.AppTests) ... ok
 
test_app_name (tests.test_app.AppTests) ... ok
 
test_app_open_docuemnts_raise_not_implemented (tests.test_app.AppTests) ... ok
 
test_app_startup (tests.test_app.AppTests) ... ok
 
test_full_screen_set (tests.test_window.TestWindow) ... ok
 
test_on_close (tests.test_window.TestWindow) ... ok
 
test_position_getter_and_setter (tests.test_window.TestWindow) ... ok
 
test_size_getter_and_setter (tests.test_window.TestWindow) ... ok
 
test_toolbar (tests.test_window.TestWindow) ... ok
 
test_widget_created (tests.test_window.TestWindow) ... ok
 
test_window_title (tests.test_window.TestWindow) ... ok
 
test_append (tests.sources.test_list_source.ListSourceTests)
 
You can append to a list source using positional args ... ok
 
test_append_kwarg (tests.sources.test_list_source.ListSourceTests)
 
You can append to a list source using kwargs ... ok
 
test_clear (tests.sources.test_list_source.ListSourceTests)
 
A list source can be cleared ... ok
 
test_get_row_index (tests.sources.test_list_source.ListSourceTests)
 
You can get the index of any row within a list source ... ok
 
test_init_with_dict (tests.sources.test_list_source.ListSourceTests)
 
A ListSource can be instantiated from dicts ... ok
 
test_init_with_flat_list_of_numbers (tests.sources.test_list_source.ListSourceTests)
 
A list source can be created from a flat list of numbers ... ok
 
test_init_with_flat_list_of_objects (tests.sources.test_list_source.ListSourceTests)
 
A list source can be created from a flat list of objects ... ok
 
test_init_with_flat_list_of_strings (tests.sources.test_list_source.ListSourceTests)
 
A list source can be created from a flat list of strings ... ok
 
test_init_with_list (tests.sources.test_list_source.ListSourceTests)
 
A ListSource can be instantiated from lists ... ok
 
test_init_with_tuple (tests.sources.test_list_source.ListSourceTests)
 
A ListSource can be instantiated from tuples ... ok
 
test_insert (tests.sources.test_list_source.ListSourceTests)
 
You can insert into a list source using positional args ... ok
 
test_insert_kwarg (tests.sources.test_list_source.ListSourceTests)
 
You can insert into a list source using kwargs ... ok
 
test_iter (tests.sources.test_list_source.ListSourceTests)
 
A list source can be iterated over ... ok
 
test_prepend (tests.sources.test_list_source.ListSourceTests)
 
You can prepend to a list source using positional args ... ok
 
test_prepend_kwarg (tests.sources.test_list_source.ListSourceTests)
 
You can prepend to a list source using kwargs ... ok
 
test_remove (tests.sources.test_list_source.ListSourceTests)
 
You can remove an item from a list source ... ok
 
test_change_value (tests.sources.test_list_source.RowTests)
 
If a row value changes, the source is notified ... ok
 
test_initial_state (tests.sources.test_list_source.RowTests)
 
A row holds values as expected ... ok
 
test_listeners (tests.sources.test_source.SourceTests) ... ok
 
test_missing_listener_method (tests.sources.test_source.SourceTests) ... ok
 
test_clear_value (tests.sources.test_value_source.ValueTests)
 
If the value is cleared, internal representation is updated, and notifications are propegated ... ok
 
test_initial_state (tests.sources.test_value_source.ValueTests)
 
A test value holds data as expected ... ok
 
test_set_value (tests.sources.test_value_source.ValueTests)
 
If the value is modified, internal representation is updated, and notifications are propegated ... ok
 
test_change_value (tests.sources.test_tree_source.LeafNodeTests)
 
If a node value changes, the source is notified ... ok
 
test_initial_state (tests.sources.test_tree_source.LeafNodeTests)
 
A node holds values as expected ... ok
 
test_iterate_children (tests.sources.test_tree_source.LeafNodeTests)
 
Children of a node can be iterated over -- should have no children ... ok
 
test_append_child (tests.sources.test_tree_source.NodeTests)
 
A new child can be appended; defers to the source ... ok
 
test_change_child (tests.sources.test_tree_source.NodeTests)
 
Changing a child notifies the source ... ok
 
test_change_value (tests.sources.test_tree_source.NodeTests)
 
If a node value changes, the source is notified ... ok
 
test_empty_children (tests.sources.test_tree_source.NodeTests)
 
A parent with 0 children isn't the same as a parent who *can't* have children ... ok
 
test_initial_state (tests.sources.test_tree_source.NodeTests)
 
A node holds values as expected ... ok
 
test_insert_child (tests.sources.test_tree_source.NodeTests)
 
A new child can be inserted; defers to the source ... ok
 
test_iterate_children (tests.sources.test_tree_source.NodeTests)
 
Children of a node can be iterated over ... ok
 
test_prepend_child (tests.sources.test_tree_source.NodeTests)
 
A new child can be prepended; defers to the source ... ok
 
test_remove_child (tests.sources.test_tree_source.NodeTests)
 
A child can be removed; defers to the source ... ok
 
test___setitem___for_child (tests.sources.test_tree_source.TreeSourceTests)
 
A child can be set (changed) with __setitem__ ... ok
 
test___setitem___for_root (tests.sources.test_tree_source.TreeSourceTests)
 
A root can be set (changed) with __setitem__ ... ok
 
test_append_child (tests.sources.test_tree_source.TreeSourceTests)
 
A new child can be appended ... ok
 
test_append_root (tests.sources.test_tree_source.TreeSourceTests)
 
A new root can be appended ... ok
 
test_get_node_index (tests.sources.test_tree_source.TreeSourceTests)
 
You can get the index of any node within a tree source, relative to its parent ... ok
 
test_init_with_dict_of_dicts (tests.sources.test_tree_source.TreeSourceTests)
 
TreeSource nodes can be instantiated from dicts of dicts ... ok
 
test_init_with_dict_of_lists (tests.sources.test_tree_source.TreeSourceTests)
 
TreeSource nodes can be instantiated from dicts of lists ... ok
 
test_init_with_list_of_dicts (tests.sources.test_tree_source.TreeSourceTests)
 
TreeSource nodes can be instantiated from lists of dicts ... ok
 
test_init_with_list_of_tuples (tests.sources.test_tree_source.TreeSourceTests)
 
TreeSources can be instantiated from lists of tuples ... ok
 
test_insert_child_args (tests.sources.test_tree_source.TreeSourceTests)
 
A new child can be inserted using value args ... ok
 
test_insert_child_kwargs (tests.sources.test_tree_source.TreeSourceTests)
 
A new child can be inserted using kwargs ... ok
 
test_insert_first_child (tests.sources.test_tree_source.TreeSourceTests)
 
If a node previously didn't allow children, inserting changes this ... ok
 
test_insert_root_args (tests.sources.test_tree_source.TreeSourceTests)
 
A new root can be inserted using value args ... ok
 
test_insert_root_kwargs (tests.sources.test_tree_source.TreeSourceTests)
 
A new root can be inserted using kwargs ... ok
 
test_iter (tests.sources.test_tree_source.TreeSourceTests)
 
TreeSource roots can be iterated over ... ok
 
test_prepend_child (tests.sources.test_tree_source.TreeSourceTests)
 
A new child can be prepended ... ok
 
test_prepend_root (tests.sources.test_tree_source.TreeSourceTests)
 
A new root can be prepended ... ok
 
test_remove_child (tests.sources.test_tree_source.TreeSourceTests)
 
A child can be removed ... ok
 
test_remove_root (tests.sources.test_tree_source.TreeSourceTests)
 
A root can be removed ... ok
 
test_accessor_dict (tests.sources.test_accessors.BuildAccessorsTests)
 
Accessor overrides can be specified as a dictionary ... ok
 
test_accessor_list_mismatch (tests.sources.test_accessors.BuildAccessorsTests)
 
The number of headings must match the number of accessors if specified as a list ... ok
 
test_autoconvert (tests.sources.test_accessors.BuildAccessorsTests)
 
If no accessors are provided, the headings are autoconverted ... ok
 
test_autoconvert_failure (tests.sources.test_accessors.BuildAccessorsTests)
 
If no accessors are provided, all the headings must be autoconvertable ... ok
 
test_manual_accessor_list (tests.sources.test_accessors.BuildAccessorsTests)
 
Accessors can be compltely manually specified ... ok
 
test_partial_accessor_list (tests.sources.test_accessors.BuildAccessorsTests)
 
None is interpreted as a default on an accessor override list ... ok
 
test_unique_accessors (tests.sources.test_accessors.BuildAccessorsTests)
 
The final accessors must be unique ... ok
 
test_digit_first (tests.sources.test_accessors.ToAccessorTests)
 
A digit-first name can't be automatically generated ... ok
 
test_simple (tests.sources.test_accessors.ToAccessorTests)
 
Simple cases can be converted ... ok
 
test_symbols_only (tests.sources.test_accessors.ToAccessorTests)
 
A symbol-only name can't be automatically generated ... ok
 
test_whitespace_duplicates (tests.sources.test_accessors.ToAccessorTests)
 
Multiple whitespace characters are collapsed, after other substitutions have been performed ... ok
 
test_is_printable (tests.test_key.TestKey) ... ok
 
test_direction_property_default (tests.widgets.test_splitcontainer.SplitContainerTests) ... ok
 
test_setting_content_false_input (tests.widgets.test_splitcontainer.SplitContainerTests) ... ok
 
test_setting_content_invokes_impl_method (tests.widgets.test_splitcontainer.SplitContainerTests) ... ok
 
test_setting_content_valid_input (tests.widgets.test_splitcontainer.SplitContainerTests) ... ok
 
test_setting_direction_property_invokes_impl_method (tests.widgets.test_splitcontainer.SplitContainerTests) ... ok
 
test_widget_created (tests.widgets.test_splitcontainer.SplitContainerTests) ... ok
 
test_min_max_values (tests.widgets.test_numberinput.NumberInputTests) ... ok
 
test_on_change (tests.widgets.test_numberinput.NumberInputTests) ... ok
 
test_set_value (tests.widgets.test_numberinput.NumberInputTests) ... ok
 
test_step (tests.widgets.test_numberinput.NumberInputTests) ... ok
 
test_widget_created (tests.widgets.test_numberinput.NumberInputTests) ... ok
 
test_detailedlist_property (tests.widgets.test_detailedlist.TestDetailedList) ... ok
 
test_scroll_to_bottom (tests.widgets.test_detailedlist.TestDetailedList) ... ok
 
test_scroll_to_row (tests.widgets.test_detailedlist.TestDetailedList) ... ok
 
test_scroll_to_top (tests.widgets.test_detailedlist.TestDetailedList) ... ok
 
test_widget_created (tests.widgets.test_detailedlist.TestDetailedList) ... ok
 
test_adding_container_invokes_add_content (tests.widgets.test_optioncontainer.OptionContainerTests) ... ok
 
test_widget_created (tests.widgets.test_optioncontainer.OptionContainerTests) ... ok
 
test_icon_bind (tests.widgets.test_icon.TestIcon) ... ok
 
test_get_selected_item_invokes_impl_method (tests.widgets.test_selection.SelectionTests) ... ok
 
test_items_were_set (tests.widgets.test_selection.SelectionTests) ... ok
 
test_on_select (tests.widgets.test_selection.SelectionTests) ... ok
 
test_set_items (tests.widgets.test_selection.SelectionTests) ... ok
 
test_set_selected_item_invokes_impl_methods (tests.widgets.test_selection.SelectionTests) ... ok
 
test_set_selected_item_is_in_items (tests.widgets.test_selection.SelectionTests) ... ok
 
test_widget_created (tests.widgets.test_selection.SelectionTests) ... ok
 
test_evaluate (tests.widgets.test_webview.WebViewTests) ... ok
 
test_get_dom (tests.widgets.test_webview.WebViewTests) ... ok
 
test_get_user_agent (tests.widgets.test_webview.WebViewTests) ... ok
 
test_set_content_invokes_impl_method (tests.widgets.test_webview.WebViewTests) ... ok
 
test_set_user_agent (tests.widgets.test_webview.WebViewTests) ... ok
 
test_setting_url_invokes_impl_method (tests.widgets.test_webview.WebViewTests) ... ok
 
test_widget_created (tests.widgets.test_webview.WebViewTests) ... ok
 
test_button_label (tests.widgets.test_button.ButtonTests) ... ok
 
test_button_label_with_None (tests.widgets.test_button.ButtonTests) ... ok
 
test_button_on_press (tests.widgets.test_button.ButtonTests) ... ok
 
test_widget_created (tests.widgets.test_button.ButtonTests) ... ok
 
test_widget_created (tests.widgets.test_navigationview.NavigationViewTests) ... skipped 'Not implemented!'
 
test_disabled_cases (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_set_max_to_none (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_set_max_to_number (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_set_value_to_none (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_set_value_to_number_greater_than_max (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_set_value_to_number_less_than_max (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_start (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_stop (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_widget_created (tests.widgets.test_progressbar.ProgressBarTests) ... ok
 
test_getting_image_invokes_impl_method (tests.widgets.test_imageview.ImageViewTests) ... ok
 
test_setting_image_invokes_impl_method (tests.widgets.test_imageview.ImageViewTests) ... ok
 
test_widget_created (tests.widgets.test_imageview.ImageViewTests) ... ok
 
test_arguments_are_all_set_properly (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_clear (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_getting_value_invokes_impl_method (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_on_change_callback_set (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_set_placeholder_with_None (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_set_value_with_None (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_setting_value_invokes_impl_method (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_widget_created (tests.widgets.test_textinput.TextInputTests) ... ok
 
test_custom_data_source (tests.widgets.test_table.TableTests) ... ok
 
test_list_of_lists_data_source (tests.widgets.test_table.TableTests) ... ok
 
test_nothing_selected (tests.widgets.test_table.TableTests) ... ok
 
test_scroll_to_bottom (tests.widgets.test_table.TableTests) ... ok
 
test_scroll_to_row (tests.widgets.test_table.TableTests) ... ok
 
test_scroll_to_top (tests.widgets.test_table.TableTests) ... ok
 
test_widget_created (tests.widgets.test_table.TableTests) ... ok
 
test_box_with_without_factory (tests.widgets.test_box.BoxTests) ... ok
 
test_children_added (tests.widgets.test_box.BoxTests) ... ok
 
test_widget_created (tests.widgets.test_box.BoxTests) ... ok
 
test_update_label_text (tests.widgets.test_label.LabelTests) ... ok
 
test_widget_created (tests.widgets.test_label.LabelTests) ... ok
 
test_arguments_are_all_set_properly (tests.widgets.test_switch.SwitchTests) ... ok
 
test_getting_is_on_invokes_impl_method (tests.widgets.test_switch.SwitchTests) ... ok
 
test_label_with_None (tests.widgets.test_switch.SwitchTests) ... ok
 
test_setting_is_on_invokes_impl_method (tests.widgets.test_switch.SwitchTests) ... ok
 
test_setting_label_invokes_impl_method (tests.widgets.test_switch.SwitchTests) ... ok
 
test_widget_created (tests.widgets.test_switch.SwitchTests) ... ok
 
test_data_setter_creates_tree_with_data_none (tests.widgets.test_tree.TreeTests) ... ok
 
test_data_setter_creates_tree_with_data_source (tests.widgets.test_tree.TreeTests) ... ok
 
test_data_setter_creates_tree_with_list_data (tests.widgets.test_tree.TreeTests) ... ok
 
test_data_setter_creates_tree_with_tuple_data (tests.widgets.test_tree.TreeTests) ... ok
 
test_setter_creates_tree_with_dict_data (tests.widgets.test_tree.TreeTests) ... ok
 
test_widget_created (tests.widgets.test_tree.TreeTests) ... ok
 
test_false_range (tests.widgets.test_slider.SliderTests) ... ok
 
test_get_value_invokes_impl_method (tests.widgets.test_slider.SliderTests) ... ok
 
test_new_value_is_None (tests.widgets.test_slider.SliderTests) ... ok
 
test_new_value_out_of_range (tests.widgets.test_slider.SliderTests) ... ok
 
test_new_value_works_with_range (tests.widgets.test_slider.SliderTests) ... ok
 
test_parameter_are_all_set_correctly (tests.widgets.test_slider.SliderTests) ... ok
 
test_set_enabled_with_working_values (tests.widgets.test_slider.SliderTests) ... ok
 
test_set_value_invokes_impl_method (tests.widgets.test_slider.SliderTests) ... ok
 
test_widget_created (tests.widgets.test_slider.SliderTests) ... ok
 
test_working_range_values (tests.widgets.test_slider.SliderTests) ... ok
 
test_object_created (tests.widgets.test_image.ImageTests) ... ok
 
test_path (tests.widgets.test_image.ImageTests) ... ok
 
test_adding_child (tests.widgets.test_base.WidgetTests) ... ok
 
test_adding_children (tests.widgets.test_base.WidgetTests) ... ok
 
test_arguments_were_set_correctly (tests.widgets.test_base.WidgetTests) ... ok
 
test_create_widget_with_no_style (tests.widgets.test_base.WidgetTests) ... ok
 
test_enabled_with_None (tests.widgets.test_base.WidgetTests) ... ok
 
test_multiline_properties_with_None (tests.widgets.test_multilinetextinput.MultilineTextInputTests) ... ok
 
test_multiline_values (tests.widgets.test_multilinetextinput.MultilineTextInputTests) ... ok
 
test_widget_created (tests.widgets.test_multilinetextinput.MultilineTextInputTests) ... ok
 
test_arc_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_arc_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_arc_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_basic_drawing (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_bezier_curve_to_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_bezier_curve_to_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_bezier_curve_to_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_closed_path_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_closed_path_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_context_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_draw_3circles (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_draw_triangle (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_ellipse_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_ellipse_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_ellipse_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_fill_checks (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_fill_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_fill_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_line_to_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_line_to_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_line_to_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_move_to_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_move_to_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_move_to_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_new_path_remove (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_new_path_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_new_path_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_quadratic_curve_to_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_quadratic_curve_to_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_quadratic_curve_to_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_rect_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_rect_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_remove_arc (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_reset_transform_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_reset_transform_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_rotate_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_rotate_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_rotate_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_scale_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_scale_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_scale_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_self_oval_path (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_stroke_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_stroke_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_translate_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_translate_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_translate_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_widget_created (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_write_text_default (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_write_text_modify (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_write_text_repr (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_write_text_simple (tests.widgets.test_canvas.CanvasTests) ... ok
 
test_horizontal_property (tests.widgets.test_scrollcontainer.ScrollContainerTests) ... ok
 
test_set_content_with_None (tests.widgets.test_scrollcontainer.ScrollContainerTests) ... ok
 
test_set_content_with_widget (tests.widgets.test_scrollcontainer.ScrollContainerTests) ... ok
 
test_vertical_property (tests.widgets.test_scrollcontainer.ScrollContainerTests) ... ok
 
test_widget_created (tests.widgets.test_scrollcontainer.ScrollContainerTests) ... ok
 
test_widget (tests.widgets.test_passwordinput.PasswordInputTests) ... ok
 
test_widget_created (tests.widgets.test_passwordinput.PasswordInputTests) ... ok
 
 
----------------------------------------------------------------------
 
Ran 273 tests in 0.501s
 
 
OK (skipped=1)
 
russ@ubuntu-18-base:~/toga/src/core$
 
  
 
>================== run tutorial inside of spyder with adjusted sys.path =====================
 
>================== run tutorial inside of spyder with adjusted sys.path =====================
Line 534: Line 30:
 
     print( " sys.path already modified" )
 
     print( " sys.path already modified" )
  
     ...... rest of file  taken from:
+
     ...... rest of file  taken from:   https://toga.readthedocs.io/en/latest/tutorial/tutorial-1.html
  
---------------- here is spyder ipython console ------------------
+
---------------- here is spyder ipython console output ------------------
  
  
Line 602: Line 98:
 
----- no output shown  
 
----- no output shown  
  
------------------------- works in ipython from terminal if path setting is changed to: ---------------
+
------------------------- also works in ipython from terminal if path setting is changed to: ---------------
  
 
# brute force  
 
# brute force  
Line 612: Line 108:
 
  -----------  
 
  -----------  
 
   
 
   
 +
rest of ouptut similar to the Spyder console above.
  
 +
</pre>
  
</pre>
+
[[category:Python]]

Latest revision as of 11:28, 2 August 2018

What[edit]

This page is a log of running the Toga Tutorial at: https://toga.readthedocs.io/en/latest/tutorial/tutorial-1.html see: Setup Toga with Spyder

The Console Log[edit]


>================== run tutorial inside of spyder with adjusted sys.path =====================

running in spyter, the toga_2.py gets its own  interpreter, start fresh each time 


added code for sys.path ( does not run without this, some may have more than absolutely necessary )

print( "--- modify sys.path if necessary add until it works ---" )
import sys
for_sys_path     = []
for_sys_path.append( "/home/russ/python03" )
for_sys_path.append( "/home/russ/toga/src" )
for_sys_path.append( "/home/russ/toga/src/core" )
for_sys_path.append( "/home/russ/toga/src/gtk" )
for_sys_path.append( '/home/russ/anaconda3/lib/python3.6/site-packages' )
test_path_add = for_sys_path  [0]

if sys.path[ 0 ] != test_path_add:
    print( "adding to sys.path" )
    sys.path   = for_sys_path + sys.path 
    pass
else:
    print( " sys.path already modified" )

    ...... rest of file  taken from:   https://toga.readthedocs.io/en/latest/tutorial/tutorial-1.html

---------------- here is spyder ipython console output ------------------


runfile('/home/russ/python03/toga_proj/toga_2.py', wdir='/home/russ/python03/toga_proj')
--- modify sys.path if necessary add until it works ---
adding to sys.path
sys.path = ['/home/russ/python03', '/home/russ/toga/src', '/home/russ/toga/src/core', '/home/russ/toga/src/gtk', '/home/russ/anaconda3/lib/python3.6/site-packages', '', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/russ/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3/dist-packages/IPython/extensions', '/home/russ/.ipython']
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: TextInput.set_alignment()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: TextInput.set_alignment()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: TextInput.set_font()
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: Widget.set_hidden()
[GTK+] Not implemented: Button.set_background_color()
[GTK+] Not implemented: Widget.set_hidden()

======================= in terminal following ipython fails ===================


russ@ubuntu-18-base:~$ python /home/russ/python03/toga_proj/toga_2.py
--- modify sys.path if necessary ---
adding to sys.path
sys.path = ['/home/russ/python03', '/home/russ/toga/src', '/home/russ/toga/src/core', '/home/russ/toga/src/gtk', '/home/russ/anaconda3/lib/python3.6/site-packages', '', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/russ/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3/dist-packages/IPython/extensions', '/home/russ/.ipython']
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/__init__.py", line 9, in <module>
    from . import selectors
ImportError: cannot import name 'selectors'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/russ/python03/toga_proj/toga_2.py", line 43, in <module>
    import toga
  File "/home/russ/toga/src/core/toga/__init__.py", line 1, in <module>
    from .app import *
  File "/home/russ/toga/src/core/toga/app.py", line 6, in <module>
    from toga.command import CommandSet
  File "/home/russ/toga/src/core/toga/command.py", line 1, in <module>
    from toga.handlers import wrapped_handler
  File "/home/russ/toga/src/core/toga/handlers.py", line 1, in <module>
    import asyncio
  File "/usr/lib/python3.6/asyncio/__init__.py", line 11, in <module>
    import selectors  # Will also be exported.
  File "/usr/lib/python3.6/selectors.py", line 10, in <module>
    import math
ModuleNotFoundError: No module named 'math'
russ@ubuntu-18-base:~$ 

------------------------ similiar failure in straight ahead python ..... ---------------------

----- no output shown 

------------------------- also works in ipython from terminal if path setting is changed to: ---------------

# brute force 
print( " sys.path set from literal" )   
sys.path = ['/home/russ/python03', '/home/russ/toga/src', '/home/russ/toga/src/core', '/home/russ/toga/src/gtk', '/home/russ/anaconda3/lib/python3.6/site-packages',
 '', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/russ/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', 
 '/usr/lib/python3/dist-packages', '/usr/lib/python3/dist-packages/IPython/extensions', '/home/russ/.ipython']    

 ----------- 
 
rest of ouptut similar to the Spyder console above.