Don't quite know Python

Hey, I’m new to the forum and to Python. I have been going through many tutorials on youtube to teach myself Python, and I haven’t gotten very far with it. I sort of know quite a few of the terms in it (stuff like print, while etc), but I have next to no clue how to use them all together. Right now I have so many questions I’m not sure where to even begin (hopefully this is in the right thread).
For now I’ll just ask one question: how do I go from one ‘while’ block to another? I am trying to make a simple text game to help me learn the platform. So far not doing very well.

Also, any advice is welcome. Thanks.

Not everyone will agree, but in my opinion, Blender isn’t the best platform to learn Python, I would start somewhere else and then go back to Blender. It depends on what you want to do with Python:

  • If you want to develop Blender add-ons, start with Tkinter or PyQt/PySide.
  • If you want to develop game logic, start with pygame.
  • If you want to draw in-game HUDs, start with pyOpenGL and then study Moguri’s BGUI for the Blender Game Engine.

Concerning your question: you can use “break” to go out of a while loop. You can also put your while loop inside a function to call it from anywhere (including from inside other while loops).

Python is a fantastic language and learning it will probably help your professional career. Good luck!

I agree with Sjoerd, before using python in Blender you should first have a fair understanding of python on its own. A free online resource that goes quite a bit further than many shallow tutorials is
o.reilly also had book ‘learning python’ that is quite good.

once you mastered the basics you might have a look at the examples that are present inside Blenders text editor

Cool, thanks for the answers. I think I’ll start looking into Pygame.

If you are new to python or programming itself… I suggest you go through this course. Having taken the last run of the course… I highly recommend it.

This looks like a good start - - warning: the site requires SilverLight.

???,??? ??????,Timberland Australia???,mcm ??? ??? ??? ??? ??? 2013 ???,??? ??? ????? ???,??? 95???,Timberland Outlet? ???1???Barrie Last???,??? ??????Horween???,prada ??????a???Mark McNairy???1971???,??? Air Max? ???: ??? ??? ???

Thanks for the links. I’ve been attempting to learn both version 2 and 3 of Python, so it’s not too hard to switch between the two. :slight_smile: