@ccc this is nice. I like this. im always learning on here.. did you use .format so you didn't have to put the url in the list comp? much cleaner. thanks
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Best posts made by resserone13v2.0
-
RE: mlb web scarper
-
RE: trying to make parallelograms for Side wall
@cvp no. Never that. Lol. I just pop in and out. I was able to use anchor point. I didn’t use transform yet. I’ll probably finish up getting the room to lineed up correctly and then see if I can figure out how to get a sprite the walk thru it and scale depending on where it is on the screen
-
RE: How do you uninvent multiple lines of code in pythonista?
@cvp I was able to open it on my phone and do all the indenting then open it back up on the Mac. i had to update the iCloud
-
RE: trying to make parallelograms for Side wall
I found this
In parallelogram ABCDABCD {AB} = 10AB=10 and measured angle A = 60. Find {CD}CD
and ask chatgpt to use it to make a parallelogram then mix that with what I had before
it makes a parallelogram and now have to work on the size and placement
import ui from scene import * def parallelogram(a, angle_of_a, color, x_pos, y_pos): b = a # Calculate the coordinates of points B and C angle_A_rad = math.radians(angle_of_a) bx = a by = 0 cx = bx + b * math.cos(angle_A_rad) cy = b * math.sin(angle_A_rad) # Create a path to draw the parallelogram path = ui.Path() path.move_to(bx, by) # Point B path.line_to(cx, cy) # Point C path.line_to(cx - a,cy + a) # Point D path.line_to(bx - a, by + a) # Point A path.close() # Create a shape node with the path parallelogram = ShapeNode(path=path) parallelogram.fill_color = color parallelogram.stroke_color = 'black' parallelogram.position = (x_pos, y_pos) return parallelogram class MyScene(Scene): def setup(self): self.background_color = 'white' self.left_wall = parallelogram(400, 100, 'orange', self.size.w / 2, self.size.h / 2) self.add_child(self.left_wall) if __name__ == '__main__': run(MyScene(), show_fps=False)