Git Product home page Git Product logo

pippy's Introduction

What is this?

Pippy allows the student to examine, execute, and modify simple Python programs. In addition it is possible to write Python statements to play sounds, calculate expressions, or make simple text based interactive games.

How to use?

Pippy is part of the Sugar desktop. Please refer to;

How to upgrade?

On Sugar desktop systems;

How to integrate?

On Debian and Ubuntu systems;

apt install sugar-pippy-activity

On Fedora systems;

dnf install sugar-pippy

Pippy depends on Python, Sugar Toolkit, Cairo, Telepathy, GTK+ 3, GtkSourceView, Pango, Vte, Box2d and Pygame.

Pippy is started by Sugar.

Pippy is packaged by Linux distributions;

pippy's People

Contributors

aniket21mathur avatar bcjordan avatar chimosky avatar cjb avatar cscott avatar erikos avatar ezequielpereira avatar fdanesse avatar godiard avatar goutamnair7 avatar humitos avatar i5o avatar icarito avatar jpichon avatar leonardcj avatar native93 avatar pootle-sugarlabs avatar quozl avatar rdrsadhu avatar rohitsakala avatar samdroid-apps avatar shaansubbaiah avatar sparshg avatar srevinsaju avatar svineet avatar tchx84 avatar vikramahuja1001 avatar vipulgupta2048 avatar walterbender avatar yell0wfl4sh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pippy's Issues

Avoid imports from Sugar shell

Two imports of jarabe are present. They should be avoided if possible.

On a system with Python 3 Sugar shell and Python 2 bundle of Pippy, the activity fails to start with this in logs;

Traceback (most recent call last):
  File "/usr/bin/sugar-activity", line 5, in <module>
    activityinstance.main()
  File "/usr/lib/python2.7/dist-packages/sugar3/activity/activityinstance.py", line 179, in main
    module = __import__(module_name)
  File "/usr/share/sugar/activities/Pippy.activity/pippy_app.py", line 76, in <module>
    from jarabe.view.customizebundle import generate_unique_id
ImportError: No module named jarabe.view.customizebundle

PyGameActivity not yet ported to GTK+ 3

Activity wrapper for PyGame has not been ported;

  • it does not instantiate the ToolbarBox,
  • it tries to run the generated activity as a forked process with two Xcb connections, causing this error;
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

Erroneous tracking of open files

Related to #27, because an example will take the place of an unmodified tab, it's possible to receive an error claiming that the selected file is already open. However, the file is in no way visible to the user.

Steps to reproduce:

  1. Open Pippy.

  2. In a new tab, write some text. For example:

    print 'Hello, world!'
    
  3. Rename the tab to Hello.

  4. Export as Pippy document.

  5. Open a new tab.

  6. Close the Hello tab.

  7. Import Python file to new tab selecting Hello.py.

  8. Load an example. The example should replace Hello.

  9. Import Python file to new tab selecting Hello.py.

  10. You should now see the following error message:

    Error importing Python file
    The file you selected is already open
    

    The example should remain in its tab. Hello should not be visible.

I think that the solution here is to always open files in new tabs. The only exception might be a blank, unmodified tab. @walterbender, I'd be glad to try implement this in a pull request. However, could you weight in before I go off and do this?

Graphic examples fail to quit

Graphic examples fail to exit full-screen window on esc so there's no way to quit the activity.

Pressing <ctrl>C has no effect, killing the python process or <ctrl>Q does quit the activity.

Noticed this happens mostly with the graphics examples.

This was seen in the logs;

(sugar-activity3:1209): Gtk-CRITICAL **: 09:09:56.307: gtk_notebook_get_tab_label: assertion 'list != NULL' failed

(sugar-activity3:1209): Gtk-CRITICAL **: 09:09:56.308: gtk_notebook_get_tab_label: assertion 'list != NULL' failed

(sugar-activity3:1209): Gtk-CRITICAL **: 09:09:56.310: gtk_notebook_get_tab_label: assertion 'list != NULL' failed

Closing default named tabs

When we close tabs with default names ("New Source File 1", "New Source File 2",....). Then currently we rename the files so they follow the order of 1,2,.....,n (if there are n tabs open). But suppose the user has already filled some content into these tabs then the renaming could get them confused.

I think it would be better if we don't rename the tabs and create new ones with increasing indexes.

Physics example fails

In v72, the Physics example started fine.

In v73, the Physics example fails to start, because the embedded Box2D library is not ported.

Work is needed to;

  • hide the example when Box2D is unavailable,
  • remove the embedded Box2D and rely on Linux distribution dependencies to provide Box2D, (fixed in 546d7bb),

At time of writing,

  • Fedora has a Box2D library available for Python 3, as package pybox2d,
  • Debian and Ubuntu do not have a Box2D library available for Python 3. This has been logged by others as Debian bug 922215. Workaround is to install swig and python-pip3, then use pip3 install box2d.

Confusing import / export options.

image

  • Is "Import Python file" the opposite to "Export as Pippy document"?
  • Why is the third icon grey and what does it do?
  • What does export as distutils package do? How useful is it?
  • What is the point of saving as Pippy Example?

It would be great to clean these up.

Loading two examples programs in pippy

Suppose I need to read and understand two example programs it would be easy if I could open them on two different tabs, but currently opening another example program would close the previously opened example program and this would be shown in its place.
A possible fix would be to just ensure examples are always loaded on new tabs.

No source tab on resume of empty file

Reproducer: start Pippy, stop Pippy, resume Pippy.

Observed result: source editor tab is present on initial start, but not on resume.

Expected result: source editor tab is present on initial start, but not on resume.

Workaround: press the add tab button, or type something before stopping.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.