Difference between revisions of "User:Quozl"

From Sugar Labs
Jump to navigation Jump to search
Line 2: Line 2:
  
 
=== Purpose ===
 
=== Purpose ===
 +
*a learner will be able to use examples to write more complex code,
 +
*a learner will be able to use modules created by other learners to write more complex code, with or without changing the contributed module,
 
*increase code sharing,
 
*increase code sharing,
 
*increase relevance to Python users,
 
*increase relevance to Python users,
*increase portability of code written.
+
*increase portability of code written, beyond Pippy and Sugar,
  
 
=== Data ===
 
=== Data ===
Line 49: Line 51:
 
*provide a way to import zip bundles from journal into the current pippy instance, using the object chooser,
 
*provide a way to import zip bundles from journal into the current pippy instance, using the object chooser,
 
*on execution of a bundle, allow access to all other currently loaded bundles via import, and access to system bundles via import,
 
*on execution of a bundle, allow access to all other currently loaded bundles via import, and access to system bundles via import,
 
== Discussion Log ==
 
<Quozl> pippy screen might contain a series of zip bundles.  each bundle might contain multiple files, including the setup.py perhaps hidden.  learner might load some bundles into pippy, then write a program as a new bundle that imports the other bundles.
 
<Quozl> i think the program output window might be separate to the main view ... something that pops up when "run" is pressed.
 
<Quozl> i think the series of examples takes up space unnecessarily.
 
<m_anish> Quozl yep, and an activity for a kid could be to use the existing examples in a bundle to write more complex code
 
<Quozl> yes.
 
<m_anish> Quozl agree
 
<Quozl> each of the samples would be a bundle.
 

Revision as of 19:12, 9 March 2011

Pippy Design Idea 2011-03-10

Purpose

  • a learner will be able to use examples to write more complex code,
  • a learner will be able to use modules created by other learners to write more complex code, with or without changing the contributed module,
  • increase code sharing,
  • increase relevance to Python users,
  • increase portability of code written, beyond Pippy and Sugar,

Data

A running Pippy instance will contain the following data:

  • zero or more python zip bundles,
  • each python zip bundle will include a setup.py capable of creating the zip bundle output,
  • unless the user has asked to edited the setup.py, it will not be shown, instead a default will be used, maintained by Pippy,

Input

Pippy may read from:

  • a saved instance of Pippy, in the journal,
  • a zip bundle in the journal,
  • example zip bundles included with Pippy,

Output

Pippy may write to:

  • a saved instance of Pippy, in the journal,
  • a zip bundle in the journal.

Display

Display will contain:

  • toolbar,
  • a series of tabs, one for each bundle, an add bundle button, and an open example bundle button,
  • within each bundle, a series of tabs, one for __doc__ that is not editable, one for each source file that is editable, and an add file button,
  • within each file, a syntax highlighting text edit widget.

(the series of tabs encapsulated in another series of tabs is potentially difficult for a learner to comprehend, but an alternative tree view is thought inappropriate because of the horizontal space consumed, and because use of a bundle should be constrained to the public API of the bundle).

Process

When run is pressed, display will contain:

  • toolbar,
  • stdout stdin vte,
  • a stop button.

Changes

Partial list of changes to bring Pippy existing source to a state consistent with the design above:

  • remove the examples widget from the main screen, provide it only as an "open an example bundle" function,
  • remove the output window from the main screen, provide it only when a program is run, and only if the program generates stdout or reads from stdin,
  • enlarge the program text entry widget to be nearly full screen,
  • encapsulate the program text entry widget in tabs for files in a zip bundle,
  • encapsulate the bundle in tabs for zip bundles loaded into pippy instance,
  • on standard sugar save, save all zip bundles and files in a sugar journal entry,
  • provide an export zip bundle button that creates a sugar journal entry of type zip bundle, for sharing,
  • provide a way to import zip bundles from journal into the current pippy instance, using the object chooser,
  • on execution of a bundle, allow access to all other currently loaded bundles via import, and access to system bundles via import,