Discuss Scratch

youhan_school
Scratcher
41 posts

scratchattach - A Scratch API wrapper (Python)

MinecraftFan19283 wrote:

*installs right away*

You doesn't need to use python, you can also use replit.
youhan_school
Scratcher
41 posts

scratchattach - A Scratch API wrapper (Python)

when green flag clicked
forever
broadcast [ someone is cool!]
end
when I receive [ someone is cool!]
say [Timmccool is cool]
YOSHIPAUL11
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

Which is better to learn for future programers? Python or C?
NFlex23
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

YOSHIPAUL11 wrote:

(#85)
Which is better to learn for future programers? Python or C?
Python. C isn't used quite as often anymore, and Python will probably have a lot more job opportunities.
YOSHIPAUL11
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

NFlex23 wrote:

YOSHIPAUL11 wrote:

(#85)
Which is better to learn for future programers? Python or C?
Python. C isn't used quite as often anymore, and Python will probably have a lot more job opportunities.
Thx
YOSHIPAUL11
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

NFlex23 wrote:

YOSHIPAUL11 wrote:

(#85)
Which is better to learn for future programers? Python or C?
Python. C isn't used quite as often anymore, and Python will probably have a lot more job opportunities.
And for a project beginner an advice?
Joshisaurio
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

I once used ScratchConnect, but I'll probably switch to this library since it looks like it has more options or use both
Joshisaurio
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

YOSHIPAUL11 wrote:

Which is better to learn for future programers? Python or C?
Python I think it's very easy to understand but REALLY powerful.
Joshisaurio
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

NFlex23 wrote:

C isn't used quite as often anymore, and Python will probably have a lot more job opportunities.
Yeah
ISTILLMAKESTUFF
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

only_dg wrote:

now i have 692 followers if i have 7 followers more i have 700

only_dg wrote:

if @TimMcCool follows me i will be crazy for 3 days (I DON'T THINK HE FOLLOWS ME)

Please don't post offtopic stuff
kccuber
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

Joshisaurio wrote:

I once used ScratchConnect, but I'll probably switch to this library since it looks like it has more options or use both
I think you should use both, there are strengths and weaknesses for both modules.
Joshisaurio
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

YOSHIPAUL11 wrote:

And for a project beginner an advice?
Maybe start simple using the
print("Hi there!")
learn how to use the variables and lists
#This is a variable:
color = "Blue" 
#And this is a list: 
foods = ["Pizza", "Spaghetti", "Ice cream"]
How to use functions, and loops and call them, here's an example Python program:
#Create a function:
def askcolor():
    color = input("Say a color please \n") #Ask a color
    answer = input(f'Use {color} or change color? \nAnswer with "Yes" to change color\n') #The F adds variables, \n is a new line
    if answer == "Yes":
        return color #Gives the value of the color said
    else:
        askcolor() #Will repeat the function
colors = []
for i in range(0, 5)
    colors.append(askcolor()) #Add a color using the function we made earlier
for i in range(0, 5):
    print(f"Color #{i}: \n {colors[i]}") #This will print out th list
    

I didn't try out this code, I just typed it out here but it might have a few bugs. But it's pretty simple so I doubt it. It's pretty simple, it asks for 5 colors, and then it prints out those 5 colors. You can understand it pretty quickly. Once you learn that, you can go farther into tuples and dictionaries, the numpy library, and then start using other libraries to start making windows ()but that's more advanced
A code edit that you could use is Pycharm, it's pretty good, for making UI, start with Turtle (It's integrated, you just have to import it) and once you get the hang of it you can use Pygame or another library to make UI.

(Woa this took me 30 mins to write lol it's my longest forum post yet )
Joshisaurio
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

kccuber wrote:

there are strengths and weaknesses for both modules.
Yeah I mean both have their pros and cons I think ScratchConnect is prob better for fetching data but I'm not sure since I haven't used ScratchAttach but I'll start a test today
YOSHIPAUL11
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

Joshisaurio wrote:

YOSHIPAUL11 wrote:

And for a project beginner an advice?
Maybe start simple using the
print("Hi there!")
learn how to use the variables and lists
#This is a variable:
color = "Blue" 
#And this is a list: 
foods = ["Pizza", "Spaghetti", "Ice cream"]
How to use functions, and loops and call them, here's an example Python program:
#Create a function:
def askcolor():
    color = input("Say a color please \n") #Ask a color
    answer = input(f'Use {color} or change color? \nAnswer with "Yes" to change color\n') #The F adds variables, \n is a new line
    if answer == "Yes":
        return color #Gives the value of the color said
    else:
        askcolor() #Will repeat the function
colors = []
for i in range(0, 5)
    colors.append(askcolor()) #Add a color using the function we made earlier
for i in range(0, 5):
    print(f"Color #{i}: \n {colors[i]}") #This will print out th list
    

I didn't try out this code, I just typed it out here but it might have a few bugs. But it's pretty simple so I doubt it. It's pretty simple, it asks for 5 colors, and then it prints out those 5 colors. You can understand it pretty quickly. Once you learn that, you can go farther into tuples and dictionaries, the numpy library, and then start using other libraries to start making windows ()but that's more advanced
A code edit that you could use is Pycharm, it's pretty good, for making UI, start with Turtle (It's integrated, you just have to import it) and once you get the hang of it you can use Pygame or another library to make UI.

(Woa this took me 30 mins to write lol it's my longest forum post yet )
Thx u r awsome
-FreeEngines-
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

youhan_school wrote:

-FreeEngines- wrote:

If replit shuts down, you're most likely using it wrongly
It doesn't 100% mean it is your fault. Maybe replit server has some problems… OR your computer needs a restart.
replit is run in the browser, has nothing to do with your pc
Socialix
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

youhan_school wrote:

-FreeEngines- wrote:

If replit shuts down, you're most likely using it wrongly
It doesn't 100% mean it is your fault. Maybe replit server has some problems… OR your computer needs a restart.
afaik scratch doesn't like requests coming from replit. i don't know though, i don't use replit.
YOSHIPAUL11
Scratcher
67 posts

scratchattach - A Scratch API wrapper (Python)

100th post! XD
coolcoder1213
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

Is this how Blocky was created?

Also, check out s2py, it has a cloud database feature. Maybe use that.
MooMoo5678star
Scratcher
39 posts

scratchattach - A Scratch API wrapper (Python)

when green flag clicked
say [this is 101 post!] for (2) secs
TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

scratchyjimjam wrote:

im having an error with this code
import scratchattach as scratch3
import random as r
import time

session = scratch3.login(“scratchyjimjam”, “*********”)
while True:
number = str(r.randint(100,690000000))
project = session.connect_project(number)
print(number)
dijeudhwuidh = project.author

i get this error:
Traceback (most recent call last):
File “C:\Users\scrat\Videos\userfinder.py”, line 10, in <module>
dijeudhwuidh = project.author
AttributeError: ‘PartialProject’ object has no attribute ‘author’

?

You can't get the author of a project that you can't access.

Read this for more information: https://github.com/TimMcCool/scratchattach#unshared-projects–scratch3partialproject

Last edited by TimMcCool (May 14, 2022 18:06:02)

Powered by DjangoBB