Discuss Scratch
- spyrofan
- Scratcher
74 posts
Kurt 2.0 Discussion Thread
i can't get pip to install the things necessary for my computer
- CVCoderDojo
- Scratcher
6 posts
Kurt 2.0 Discussion Thread
When I go through all of this and then attempt to use Kurt I get the message
from construct.text import Literal
ImportError: No module named text
Is this a recent change to construct and should I attempt to load an older version?
Never mind. I seem to have worked through the issues. Can't delete this post?
from construct.text import Literal
ImportError: No module named text
Is this a recent change to construct and should I attempt to load an older version?
Never mind. I seem to have worked through the issues. Can't delete this post?
Last edited by CVCoderDojo (April 24, 2015 15:10:41)
- mobluse
- Scratcher
100+ posts
Kurt 2.0 Discussion Thread
It says on Kurt GitHub-page:
“It also includes a parser for converting plain text into Scratch blocks.”
How does one use this? Is the source code for http://kurt.herokuapp.com/parser.sb available?
Can one go in the other direction: converting sb- or sb2-files into text that is parseable?
I think this would be useful for writing Scratch-code faster. Perhaps there is another solution with e.g. an easy to use JSON-editor.
I installed Kurt and Skip today in Raspbian (most upgraded).
“It also includes a parser for converting plain text into Scratch blocks.”
How does one use this? Is the source code for http://kurt.herokuapp.com/parser.sb available?
Can one go in the other direction: converting sb- or sb2-files into text that is parseable?
I think this would be useful for writing Scratch-code faster. Perhaps there is another solution with e.g. an easy to use JSON-editor.
I installed Kurt and Skip today in Raspbian (most upgraded).
- blob8108
- Scratcher
1000+ posts
Kurt 2.0 Discussion Thread
Call “It also includes a parser for converting plain text into Scratch blocks.”.parse() on a Scriptable.
How does one use this?
Can one go in the other direction: converting sb- or sb2-files into text that is parseable?Yup! Call .stringify() on a Script.
Be warned that the parser is experimental and may not work very well. Long-term, I may be working on a secret project which will supersede this feature of Kurt's…
- SimpleScratch
- Scratcher
500+ posts
Kurt 2.0 Discussion Thread
I've finally got round to trying this out to parse Scratch 1.4 files and its great
I've just done a quick prog
which gives me a human readable string that I'm then attempting to parse further
Are there some further Kurt calls that I could use to give me something closer to plain text to save me re-inventing the wheel e.g
OnGreenFlag
doForever(
broadcast something
wait atime)
regards
Simon
I've just done a quick prog
import kurt as kurt
file = "transtest"
filename = "c:\\dropbox\\Private\\ScratchCrumble\\Scratch Projects\\" + file +".sb"
p = kurt.Project.load(filename)
codeInput = ""
for scriptable in p.sprites + :
for script in scriptable.scripts:
#print script
codeInput += str(script)
which gives me a human readable string that I'm then attempting to parse further
Are there some further Kurt calls that I could use to give me something closer to plain text to save me re-inventing the wheel e.g
OnGreenFlag
doForever(
broadcast something
wait atime)
regards
Simon
Last edited by SimpleScratch (June 22, 2015 13:46:03)
- SimpleScratch
- Scratcher
500+ posts
Kurt 2.0 Discussion Thread
Ta :-)
And one little request please ….
Any chance of recognising BYOB files .ypr as valid filetypes?
Obviously it would be a big bonus if Kurt could parse them correctly but as a starter it would be great to see if it could at least convert them from binary to an easier to parse format
Simon
And one little request please ….
Any chance of recognising BYOB files .ypr as valid filetypes?
Obviously it would be a big bonus if Kurt could parse them correctly but as a starter it would be great to see if it could at least convert them from binary to an easier to parse format
Simon
- blob8108
- Scratcher
1000+ posts
Kurt 2.0 Discussion Thread
That's a big feature! I asked Jens about this in Barcelona, and it sounds like the old BYOB format is even messier and more horrible than the Scratch 1.4 one :p Any chance of recognising BYOB files .ypr as valid filetypes?
Like, it's probably feasible, but it would take a long time and I'm unlikely to work on it anytime soon…
- SimpleScratch
- Scratcher
500+ posts
Kurt 2.0 Discussion Thread
Fair enough
If I get some time, I'll have a look at it myself
Simon
If I get some time, I'll have a look at it myself
Simon
- Amaru2
- Scratcher
100+ posts
Kurt 2.0 Discussion Thread
I can't donwload Kurt! Help!
I can help you but DON'T UNINSTALL ME!!!!!!!!!!!!!!!!!!!!!!
- ChocolatePi
- Scratcher
1000+ posts
Kurt 2.0 Discussion Thread
You don't have to download it. Just run ‘pip install kurt’ and start writing Python. I can't donwload Kurt! Help!
- meowflash
- Scratcher
500+ posts
Kurt 2.0 Discussion Thread
Hey, Blob, I wonder if there will be a version of Kurt that supports Python 3.
More Stuff|My Bandcamp
My DeviantArt|Intro Voting For December 2015 August 10th 2016
Check out my Github, too!
Kumquats, this signature is inedible and poisonus.
Also try the code below in IBNIZ.
sxsaxAr+waxBr-*
- Ethan_1
- Scratcher
100+ posts
Kurt 2.0 Discussion Thread
@meowflash I have a version that kind of works with Python 3, but is untested. There is no official port (yet).
- meowflash
- Scratcher
500+ posts
Kurt 2.0 Discussion Thread
Okay. @meowflash I have a version that kind of works with Python 3, but is untested. There is no official port (yet).
More Stuff|My Bandcamp
My DeviantArt|Intro Voting For December 2015 August 10th 2016
Check out my Github, too!
Kumquats, this signature is inedible and poisonus.
Also try the code below in IBNIZ.
sxsaxAr+waxBr-*
- kittyhacker101
- Scratcher
100+ posts
Kurt 2.0 Discussion Thread
How do you add a costume to an existing sprite in kurt? I'm a bit confused, and the documentation doesn't really tell you much.
- blob8108
- Scratcher
1000+ posts
Kurt 2.0 Discussion Thread
Sprite.costumes is a Python list, so you can just append it. How do you add a costume to an existing sprite in kurt?
You can get a new costume from Costume.load:
foo = Costume.load("fridge.png")
sprite.costumes.append(foo)
- __init__
- Scratcher
1000+ posts
Kurt 2.0 Discussion Thread
Hey, I'm writing a program to batch import ~200 1-second sounds into Scratch, and when I play them in Scratch, they're slowed down to about 2s?
Why is this happening?
Edit: relevant part of code
edit2: bitrate is 1411kbps incase that matters
edit3: I tried using 0.25s sounds (same bitrate), and they were slowed down 2x as well.
edit4: I downloaded one of the sounds from the project and the bitrate was 177kbps. I'm going to change the original sound's bitrate to see if that makes a difference
edit5: nope
Why is this happening?
Edit: relevant part of code
scratch_sound = kurt.Sound.load("temp/bit{0}.wav".format(j))
edit2: bitrate is 1411kbps incase that matters
edit3: I tried using 0.25s sounds (same bitrate), and they were slowed down 2x as well.
edit4: I downloaded one of the sounds from the project and the bitrate was 177kbps. I'm going to change the original sound's bitrate to see if that makes a difference
edit5: nope
Last edited by __init__ (Jan. 25, 2017 02:58:41)
thisandagain pls explain
- __init__
- Scratcher
1000+ posts
Kurt 2.0 Discussion Thread
They're stereo; I'll change this and see if it worksProbably the wrong sound format! Are they mono? Have you checked what bit depth they are? 16-bit? 24-bit? Not sure what else to suggest… :-) Why is this happening?
Edit: changed them to mono, it works, yay
Last edited by __init__ (Jan. 25, 2017 22:52:44)
thisandagain pls explain