This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-25 15:10:16

akhof
Scratcher
Registered: 2008-07-19
Posts: 500+

@Blob8108 - Questions about KURT

Dear Blob8108,

I saw that you made a Python library to handle Scratch files.
As I am also programming with Python and Scratch I am interested in KURT and would like to make a graphical GUI based on KURT. I'd like to use wxPython for the GUI and need a documentation of KURT.

I would be very happy if you would send me a documentation of KURT.
Please excuse that my English is  not always perfect: I’m from Germany and try to do my best.
Yours
Akhof

Last edited by akhof (2012-04-25 15:11:20)


http://simpliciter.bplaced.net/templates/business4/images/logo.png

Offline

 

#2 2012-04-25 15:58:31

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: @Blob8108 - Questions about KURT

do you see my signature?  smile

Offline

 

#3 2012-04-25 16:03:31

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

Your English is fine  smile  It's awesome that you want to use Kurt!  big_smile

First, a quick warning: Kurt doesn't quite handle images properly yet — I'm still working on it. I'll let you know when it does work, of course.

In terms of documentation — there's a basic readme on the homepage, under "Usage". The rest of the documentation is included within the library itself — most of the classes have docstrings that describe what they do (you can always try using python's built-in help() function on the object you're interested in). At some point I might try converting the docstrings to proper documentation using something like epydoc — but for now, you'll just have to read the code, I'm afraid  tongue

Obviously you can ask me if you need help with anything  smile

~ As roijac points out, there are some people working on something similar called M30W — but I'd encourage you to go ahead and make your own version. Much more fun  big_smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#4 2012-04-26 07:51:33

akhof
Scratcher
Registered: 2008-07-19
Posts: 500+

Re: @Blob8108 - Questions about KURT

Dear blob8108!

I've got a prblem:

Code:

aha@linux-aha:~> python ~/Python/blob8108-kurt-cb469a4/blob8108-kurt-cb469a4/test.py
Traceback (most recent call last):
  File "/home/aha/Python/blob8108-kurt-cb469a4/blob8108-kurt-cb469a4/test.py", line 1, in <module>
    from kurt.files import *
  File "/home/aha/Python/blob8108-kurt-cb469a4/blob8108-kurt-cb469a4/kurt/__init__.py", line 51, in <module>
    from kurt.objtable import *
  File "/home/aha/Python/blob8108-kurt-cb469a4/blob8108-kurt-cb469a4/kurt/objtable.py", line 34, in <module>
    from user_objects import *
  File "/home/aha/Python/blob8108-kurt-cb469a4/blob8108-kurt-cb469a4/kurt/user_objects.py", line 250, in <module>
    from scripts import Script # Yes, this is stupid. Circular dependencies ftw. -_-
  File "/home/aha/Python/blob8108-kurt-cb469a4/blob8108-kurt-cb469a4/kurt/scripts.py", line 293, in <module>
    from blockspecs import blocks_by_cmd, block_plugin_inserts, BlockType # YES THIS IS STUPID
  File "/home/aha/Python/blob8108-kurt-cb469a4/blob8108-kurt-cb469a4/kurt/blockspecs.py", line 60, in <module>
    FloatNumber("value"),
NameError: name 'FloatNumber' is not defined

The content of "test.py" is:

Code:

from kurt.files import *


project = ScratchProjectFile("game.sb")

project.info['author'] # u'blob8108'
project.stage # <ScratchStageMorph(Stage)>
    
# List fields on object:
###project.stage.fields.keys() # ['volume', 'lists', 'tempoBPM', 'vars', 'sceneStates', 'color', 'media', 'rotationDegrees', 'draggable', 'bounds', 'submorphs', 'isClone', 'blocksBin', 'visibility', 'flags', 'objName', 'scalePoint', 'owner', 'rotationStyle', 'properties', 'costume']
    
# Access fields using dot notation:
###project.stage.tempoBPM # 100
    
# "sprites" as alias for "submorphs":
###project.stage.sprites # [<WatcherMorph(ScratchCat vx)>, <ScratchSpriteMorph(ScratchCat)>]
# note: you can now use project.sprites instead

cat = project.stage.sprites[1]
cat.vars # {u'vx': 0.0}
cat.vars['vx'] = 100

project.save()

Is this normal?


Yours
Arne


PS:  Thank you for your quick answer!

Last edited by akhof (2012-04-26 08:59:50)


http://simpliciter.bplaced.net/templates/business4/images/logo.png

Offline

 

#5 2012-04-26 10:26:25

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

That's not normal, no.  hmm  What version of Construct are you using?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#6 2012-04-26 12:30:45

akhof
Scratcher
Registered: 2008-07-19
Posts: 500+

Re: @Blob8108 - Questions about KURT

blob8108 wrote:

That's not normal, no.  hmm  What version of Construct are you using?

The last version...
...I think it's Kurt 1.1


http://simpliciter.bplaced.net/templates/business4/images/logo.png

Offline

 

#7 2012-04-26 13:07:38

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

akhof wrote:

blob8108 wrote:

That's not normal, no.  hmm  What version of Construct are you using?

The last version...
...I think it's Kurt 1.1

Sorry — I mean the Construct library. Kurt depends on it to work. Did you install that, too? And which version?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#8 2012-04-26 15:29:31

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

I just uploaded a new version with (almost complete) support for images!  big_smile  See my post here.

Try downloading the new version and see if you have any more success. Make sure you've got Construct installed from here (or just "sudo pip install construct"), and install PyPNG too, for the images.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#9 2012-04-27 07:30:38

akhof
Scratcher
Registered: 2008-07-19
Posts: 500+

Re: @Blob8108 - Questions about KURT

I used "Construct 2.00".


http://simpliciter.bplaced.net/templates/business4/images/logo.png

Offline

 

#10 2012-04-27 10:56:04

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

Ah. Yeah, I that version won't work. Download the one here instead.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#11 2012-04-27 11:02:46

ZeroLuck
Scratcher
Registered: 2010-02-23
Posts: 500+

Re: @Blob8108 - Questions about KURT

Why do you need PNG support?
The Scratch file format doesn't use PNG. (or?)


http://3.bp.blogspot.com/-oL2Atzp0Byw/T465vIQ36dI/AAAAAAAAADo/1vqL4PvhkM0/s1600/scratchdachwiki.png

Offline

 

#12 2012-04-27 11:19:34

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

ZeroLuck wrote:

Why do you need PNG support?
The Scratch file format doesn't use PNG. (or?)

You are quite correct! The PNG library is optional; it's just for exporting costumes inside the project to separate external image files.  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#13 2012-04-27 12:04:20

akhof
Scratcher
Registered: 2008-07-19
Posts: 500+

Re: @Blob8108 - Questions about KURT

blob8108 wrote:

Ah. Yeah, I that version won't work. Download the one here instead.  smile

cool  big_smile
it works!

I will start building the GUI now....


akhof  big_smile   big_smile   big_smile


http://simpliciter.bplaced.net/templates/business4/images/logo.png

Offline

 

#14 2012-04-27 13:05:59

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

akhof wrote:

blob8108 wrote:

Ah. Yeah, I that version won't work. Download the one here instead.  smile

cool  big_smile
it works!

I will start building the GUI now....

Awesome  big_smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#15 2012-04-27 15:41:57

akhof
Scratcher
Registered: 2008-07-19
Posts: 500+

Re: @Blob8108 - Questions about KURT

Hi Blob8108!

What does "isHosting" mean??  -  Please excuse my English!

thanks!

akhof  big_smile


http://simpliciter.bplaced.net/templates/business4/images/logo.png

Offline

 

#16 2012-04-27 15:57:05

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: @Blob8108 - Questions about KURT

akhof wrote:

Hi Blob8108!

What does "isHosting" mean??  -  Please excuse my English!

thanks!

akhof  big_smile

I'm not blob8108 (obviously), but it has to do with mesh. Chances are, you don't need to worry about it.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#17 2012-04-27 16:50:13

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: @Blob8108 - Questions about KURT

bobbybee wrote:

akhof wrote:

What does "isHosting" mean??  -  Please excuse my English!

I'm not blob8108 (obviously), but it has to do with mesh. Chances are, you don't need to worry about it.

Again, your English doesn't need excusing  tongue

Bobbybee is precisely right — I have no idea. (You know as much as I do!) I wouldn't worry about it  smile

Last edited by blob8108 (2012-04-27 16:50:27)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

Board footer