Google Code-In Translation for pykig.py

Anne-Marie Mahfouf annma at kde.org
Thu Dec 1 16:09:30 UTC 2011


Hi,

Here is the file pykig.py translated by th estudent.
He noted that the encoding is not UTF8, it shoudl be UTF8 as all KDE files are 
UTF8.

The student also asks if there aren't better tool instead of using the "DICT" 
variable: quoting him
"Done. I've also tried to fix some blatantly wrong documentation and clean up 
non-perfect English where it was actually used instead of Italian.

The file contains a magical DICT variable whose function I can only guess - I 
tracked down that it's used in def convstr, which is then used in classes 
generated by def databuild. I assume it has to do with some kind of encoding 
conversion - why is it needed and aren't there any better tools to perform it? 

Anyway, please double-check that line - the file is not in UTF-8, and while I 
tried hard not to mess up the characters I found there, I might have failed, 
or the file might have gotten corrupted along the way :)"

The student name is Bartosz Dziewoński  if you need to add the name in the 
file.

Best regards,

Anne-Marie


On Sunday, October 30, 2011 11:48:30 AM Maurizio Paolini wrote:
> There is one "basic" point that needs to be clarified beforehand:
> the "python scripting" provided by "pykig.py" is a completely
> different thing with respect to the "kig python scripting" (the
> one accessible with the "python script" button in kig).
> 
> Generally I refer to the former as "external python scripting" to
> distinguish it from the latter.
> 
> I thing that we should think of some way to make this distinction more
> obvious.
> 
> "external scripting" (privided by pykig.py) is similar to the
> "Figure Scheme for DrGEO"
> (http://documentation.ofset.org/drgeo/it/drgenius_59.html, I cannot find an
> english translation, sorry)
> And it provides a way to build a construction using a python script instead
> of the kig graphical interface.
> This has a number of advantages, e.g. it allow to build very complex
> constructions described by means of an iterative procedure: fractals are an
> example.
> 
> On the contrary the "internal python scripting" (the one associated with the
> "python script" button, or the python script object, in the GUI) allows the
> construction of a single object that has a complicated dependence from its
> parents.
> 
> The present reference in http://userbase.kde.org/Kig/FAQ actually points to
> the "internal" python scripting, and similarly
> http://edu.kde.org/kig/manual/scripting-api/index.html is the API of the
> "internal" python scripting.
> 
> Maurizio
> 
> On Sun, Oct 30, 2011 at 09:03:59AM +0100, Anne-Marie Mahfouf wrote:
> > On Saturday, October 29, 2011 07:32:46 PM David Narvaez wrote:
> > > On Sat, Oct 29, 2011 at 7:22 PM, Maurizio Paolini
> > > 
> > > <paolini at dmf.unicatt.it> wrote:
> > > > I get the point.  My knowledge of python is very basic and I
> > > > just
> > > > treated comments in python scripts like they were comments in
> > > > other languages: invisible to the user.  So this is not the case
> > > > and therefore I perfectly agree that all those comments that are
> > > > exposed to the user should be in english (and, ideally,
> > > > localized
> > > > in a localized environment).
> > > > 
> > > > Concerning 'pykig.py' I appreciate very much that there is
> > > > someone
> > > > using it (besides myself:-).
> > > 
> > > I don't really use it yet: I first found about it when I came across
> > > the bug report in question, and found it very interesting but I
> > > haven't had the time/need to learn more about it.
> > > 
> > > > I have a number of examples (fractals, iterative constructions,
> > > > tessellations,...), it would be nice if there were a place where
> > > > they
> > > > could be stored for anyone to use.
> > > > 
> > > > Maurizio
> > > 
> > > That would be a perfect start point for users like me to start
> > > hacking
> > > with Kig and Python. How about a Wiki entry with samples of how to
> > > use
> > > PyKig? Anne-Marie, does that sound good?
> > 
> > That sounds very good indeeed.
> > On the bottom of this page http://userbase.kde.org/Kig/FAQ is mentioned
> > how to use a Python script which leads to Kig API doc.
> > Instead it could point to a new page explaining scripting in Python.
> > As for the existing examples, you can upload them to kde-files: you can
> > add a kig folder here
> > http://files.kde.org/edu/
> > and a /python subdir for example. Upload the files before the CodeIn
> > task so the student can find them.
> > 
> > The Google CodeIn task would be to create a userbase page, something
> > like
> > http://userbase.kde.org/Kig/PythonScripting
> > explaining the aim of python scripting in Kig, explaining each lines of
> > an existing script and giving clues on extending it. It could also
> > explain briefly the other scripts (please amend as you feel)
> > Pre-requisites are Kig and Python knowledge, wiki syntax knowledge and a
> > userbase account.
> > 
> > Best regards,
> > 
> > Anne-Marie
> > 
> > PS: I'll be away for a week starting tomorrow without internet, I'll be
> > back on Tuesday 8th November.
> > 
> > _______________________________________________
> > kde-edu mailing list
> > kde-edu at mail.kde.org
> > https://mail.kde.org/mailman/listinfo/kde-edu
> 
> _______________________________________________
> kde-edu mailing list
> kde-edu at mail.kde.org
> https://mail.kde.org/mailman/listinfo/kde-edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pykig.py
Type: text/x-python
Size: 26012 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20111201/2e1ba47c/attachment-0001.py>


More information about the kde-edu mailing list