Discuss Scratch
- Discussion Forums
- » Things I'm Making and Creating
- » Python programming language
- mumu245
-
1000+ posts
Python programming language
PyCharm? I use it toono I'm too embarrassed to say(#936)What IDE are you using? I'm using VSCode and it doesn't do that, and neither does IDLE. That seems like a very useless feature…Every time you open a script it just places that in the script by defaultIf you don't need it, you never type in the first place print(“Hello world!”) is always deleted like Sprite 1.
But… can you even be embarrassed by using PyCharm?
- BreadcatGames
-
1000+ posts
Python programming language
Pycharm is basedPyCharm? I use it toono I'm too embarrassed to say(#936)What IDE are you using? I'm using VSCode and it doesn't do that, and neither does IDLE. That seems like a very useless feature…Every time you open a script it just places that in the script by defaultIf you don't need it, you never type in the first place print(“Hello world!”) is always deleted like Sprite 1.
But… can you even be embarrassed by using PyCharm?
- Knightbot63
-
1000+ posts
Python programming language
I don't get the min() function.
It reports 112 but the lowest is 2
lb = ["5", "2", "5234", "112",] print(min(lb))
Working on an RPG. Consistently losing followers because of inactivity.
I head to forums time-to-time. Not as much as I used to.
- imfh
-
1000+ posts
Python programming language
That’s because you have a list of strings, not numbers. Text is sorted alphabetically, so “112” comes first. You would find that “1119” is smaller than “112” since “1” comes before “2” alphabetically. I don't get the min() function.It reports 112 but the lowest is 2lb = ["5", "2", "5234", "112",] print(min(lb))
Try converting everything in the list to a number first with map:
lb = ["5", "2", "5234", "112",] print(min(map(int, lb)))
Last edited by imfh (Feb. 28, 2023 23:33:50)
Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
- UnscrambledEgg
-
100+ posts
Python programming language
Never mind I changed lolToo embarrassed? Now I really want to know no I'm too embarrassed to say
- gosoccerboy5
-
1000+ posts
Python programming language
I wrote some js recently and i struggled because I kept writing python syntax lmao
![](https://assets.scratch.mit.edu/get_image/.%2E/5686b20fbcd79340847255dde8a4c2d3.png)
- UnscrambledEgg
-
100+ posts
Python programming language
No it wasn't Pycharm, anyways I changedPyCharm? I use it toono I'm too embarrassed to say(#936)What IDE are you using? I'm using VSCode and it doesn't do that, and neither does IDLE. That seems like a very useless feature…Every time you open a script it just places that in the script by defaultIf you don't need it, you never type in the first place print(“Hello world!”) is always deleted like Sprite 1.
But… can you even be embarrassed by using PyCharm?
- gilbert_given_189
-
500+ posts
Python programming language
So, do you like to break the convention?
class A: foo = 1 bar = 2 # make everything into a read-only property def read_only(_locals=locals()): for name, value in _locals.items(): if name.startswith("__"): continue _locals[name] = property(fget=lambda self: value) read_only() del read_only test = A() print(test.foo) print("read_only" in dir(test)) test.bar = 3
If you see a line above this text, it means that below this text is my signature.
This place is just a memory to me, I may return occasionally but I'm busy.
I guess I'm an ATer now.
I think I may have seasoned my posts a bit too much.
Also, my posts are getting lengthy lately. Whoops.
![](https://cdn2.scratch.mit.edu/get_image/project/419323906_192x128.png)
Colored Pencil is supposed to color the siggy, but Scratch says it's too big.
There is nothing here…
don don pan pan
dondo pan pan
- StarscreamClone
-
1000+ posts
Python programming language
Gosh, I have to write an AI agent in Common Lisp for a semester-long project and I really miss Python right now - Lisp does NOT like strings ![](//cdn.scratch.mit.edu/scratchr2/static/__d4cb04fd0a3a9e2ed572766284bcfbd0__/djangobb_forum/img/smilies/sad.png)
Saw some discussion on IDEs - Pycharm's my go-to IDE, and if you've got a verifiable student email, you can get Pycharm Professional for free!
![](http://cdn.scratch.mit.edu/scratchr2/static/__d4cb04fd0a3a9e2ed572766284bcfbd0__/djangobb_forum/img/smilies/sad.png)
Saw some discussion on IDEs - Pycharm's my go-to IDE, and if you've got a verifiable student email, you can get Pycharm Professional for free!
Somewhere in my 20s | He/It
Workin' on my degree in computer science and cognitive science, and the future president of 2036!
Surge is my imaginary husband - he's the guy in my icon!
- k0d3rrr
-
1000+ posts
Python programming language
What is a circular import? I keep trying to import the winsound library, but every single time I do that, it says:
AttributeError: partially initialized module ‘winsound’ has no attribute ‘PlaySound’ (most likely due to a circular import)(I'm using the example script from the Python documentation.)
- gilbert_given_189
-
500+ posts
Python programming language
What is a circular import? I keep trying to import the winsound library, but every single time I do that, it says:AttributeError: partially initialized module ‘winsound’ has no attribute ‘PlaySound’ (most likely due to a circular import)(I'm using the example script from the Python documentation.)
# a.py import b
# b.py import a
If you see a line above this text, it means that below this text is my signature.
This place is just a memory to me, I may return occasionally but I'm busy.
I guess I'm an ATer now.
I think I may have seasoned my posts a bit too much.
Also, my posts are getting lengthy lately. Whoops.
![](https://cdn2.scratch.mit.edu/get_image/project/419323906_192x128.png)
Colored Pencil is supposed to color the siggy, but Scratch says it's too big.
There is nothing here…
don don pan pan
dondo pan pan
- k0d3rrr
-
1000+ posts
Python programming language
I entered “module” into the Python shell, and it includes Winsound in there. (I'm using Python 3.10.4 by the way.)What is a circular import? I keep trying to import the winsound library, but every single time I do that, it says:AttributeError: partially initialized module ‘winsound’ has no attribute ‘PlaySound’ (most likely due to a circular import)(I'm using the example script from the Python documentation.)# a.py import bIf you got that on a builtin Python module, your Python install may be borked.# b.py import a
- GoldenAlbans
-
55 posts
Python programming language
What are good books that teach you how to program Raspberry Pi’s with Python.
I’m not much on speeches. That’s all.
Follow @GoldenAlbans! People don’t usually put quotes in signatures.
- Maximouse
-
1000+ posts
Python programming language
The most common reason for that error is trying to import the module from a file named “winsound.py”. Python searches the current directory first when looking for a module to import. What is a circular import? I keep trying to import the winsound library, but every single time I do that, it says:AttributeError: partially initialized module ‘winsound’ has no attribute ‘PlaySound’ (most likely due to a circular import)(I'm using the example script from the Python documentation.)
- UnscrambledEgg
-
100+ posts
Python programming language
Is there a way to save images of codes from Jupyter?
- UnscrambledEgg
-
100+ posts
Python programming language
20% of this forum are users complaining about how they're in University working on a long term project that requires a foreign language from Python and how they miss programming with it.
- mrcoat
-
100+ posts
Python programming language
I made a scratch project thumbnail loader: https://scratch.mit.edu/projects/827525110 It has ton of bugs, but am still proud of it.
My cartoon
Watch My Show!
I was gonna put an image of the studio but it didn't work.
Cool thing I made
when [Awesomeness v] > (100)
forever
play sound [Victory v] until done
set rotation style [The best style v]
go to [The party v]
end
- Knightbot63
-
1000+ posts
Python programming language
bump.
What's so great about “self” in classes, Besides the fact that you can go outside of the class function.
What's so great about “self” in classes, Besides the fact that you can go outside of the class function.
Working on an RPG. Consistently losing followers because of inactivity.
I head to forums time-to-time. Not as much as I used to.
- mybearworld
-
1000+ posts
Python programming language
(#959)…you can go outside of the class function. That's what it does. That's like saying “What's so great about food? Besides the fact that you can eat it.”
bump.
What's so great about “self” in classes, Besides the fact that you can go outside of the class function.
Signatures are the only place where assets links still work.