Opened 10 years ago

Closed 10 years ago

#2709 closed enhancement (fixed)

Include sample TA code in Python samples

Reported by: tonyforster Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Its not always easy to understand how to use Python samples. In the py code put TA block samples, commented out, either as pseudocode or as TA code.

suggestions attached

Attachments (6)

python samples.doc (12.5 KB) - added by tonyforster 10 years ago.
TA sample code to call py sample
tmpuIPqty.rtf (17.3 KB) - added by tonyforster 10 years ago.
tmpZRZ4DL.rtf (18.1 KB) - added by tonyforster 10 years ago.
tmpk5YREj.rtf (19.0 KB) - added by tonyforster 10 years ago.
tmpH3xL7y.rtf (19.3 KB) - added by tonyforster 10 years ago.
ignore all but the last file
tmpn1gBnM.rtf (19.6 KB) - added by tonyforster 10 years ago.
ignore all but last file

Download all attachments as: .zip

Change History (11)

Changed 10 years ago by tonyforster

TA sample code to call py sample

Changed 10 years ago by tonyforster

Changed 10 years ago by tonyforster

Changed 10 years ago by tonyforster

Changed 10 years ago by tonyforster

ignore all but the last file

Changed 10 years ago by tonyforster

ignore all but last file

comment:1 Changed 10 years ago by walter

  • Status changed from new to assigned

I just made the switch from lc to tw (LogoCode to TurtleWindow) as the first argument to the userdefined blocks. Needed to do this in order to fix some issues with broken samples due to plugin modules. There could be a way of doing all of this without introducing a Flag Day, but I suspect that the end users defining blocks should not have a difficult time with this change. Will document thoroughly at release date.

Tested all the samples and they work as per http://git.sugarlabs.org/turtleart/mainline/commit/fc4b6a64cc06bb35328835a382c14a8af542d20c

Will add some comments as per this ticket before final release of v 107

comment:2 Changed 10 years ago by tonyforster

Yes, I am getting some broken samples, I assume its just work in progress

sorry about the multiple file uploads, sugar is mangling filenames so its not easy to write over the old version.

comment:3 Changed 10 years ago by walter

  • Resolution set to fixed
  • Status changed from assigned to closed

I think the samples are all working again and all have some form of documentation in the code itself.

comment:4 Changed 10 years ago by tonyforster

  • Resolution fixed deleted
  • Status changed from closed to reopened

Pseudo code or block code doesn't seem to be in the samples 07:34, 23 March 2011

suggested pseudo code for load block:
Start
Seth 180
Python forward, 250 (ie. block has 2 inputs)
Forward pop
Python right, 90

Adding a third numeric argument adds an extension block. Pushed displacement is then wrong. Is this intentional? If so should be documented

comment:5 Changed 10 years ago by walter

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.