python scripts

Blender's implementation of Python, the scripting language used by Blender.

Re: python scripts

Postby djallalnamri » Thu Mar 11, 2010 6:52 pm

hello
from an educational point of view,which version of python would be recommanded to learn or start with for someone who plans to write scripts for blender 2.50?
i have downloaded a pdf book in french made for pupils in secondary school and preparing for computer programming studies
i am not in hurry to learn at the age of 52 :)
just need an advice from experienced people
djallalnamri
 
Posts: 12
Joined: Fri Mar 05, 2010 4:13 pm

Re: python scripts

Postby irakrakow » Thu Mar 11, 2010 7:06 pm

It has to be Python 3. Here's the place to start:

http://docs.python.org/3.1/tutorial/index.html

From there, there's tons of stuff in the Python 3.1 documentation, at:

http://docs.python.org/3.1/index.html

Finally, of course, you can watch my tutorials, at:

http://forum.irakrakow.com/viewforum.php?f=31

Hope this helps.

Ira
User avatar
irakrakow
Site Admin
 
Posts: 438
Joined: Fri Jan 22, 2010 9:01 pm

Re: python scripts

Postby djallalnamri » Thu Mar 11, 2010 7:38 pm

hello again
i have already visited those websites you are directing to
i have downloaded a documentation
now i am downloading python 3.1.1
i have installed it from ubuntu repository
2.6.4 was already installed
so when when i type python in a terminal,it is only 2.6.4 which is started
thought i might uninstall 2.6.4 just to see how it reacts
but i am hesitating thinking that might keep blender 2.49a from working
anyway thanks again for quick reply!
djallalnamri
 
Posts: 12
Joined: Fri Mar 05, 2010 4:13 pm

Re: python scripts

Postby djallalnamri » Thu Mar 11, 2010 8:34 pm

installed python 3.1.1 on ubuntu
works fine
now in order not to go astray...i am going to look for tutorials that are blender targeted
i hope yours are!
thanks
djallalnamri
 
Posts: 12
Joined: Fri Mar 05, 2010 4:13 pm

Re: python scripts

Postby irakrakow » Thu Mar 11, 2010 8:58 pm

I have two types of Python tutorials. If you look in the BlenderPython section, at:

http://forum.irakrakow.com/viewforum.php?f=15

the tutorials are about the Blender 2.50 implementation of Python, not the language but how Python works in the Blender environment.

In the Python 3 section, at:

http://forum.irakrakow.com/viewforum.php?f=31

are tutorials about the Python 3 language itself. I use the Python console in Blender 2.5, but actually any Python 3 console, such as IDLE, will work as well.

Hope this helps.

Ira
User avatar
irakrakow
Site Admin
 
Posts: 438
Joined: Fri Jan 22, 2010 9:01 pm

Re: python scripts

Postby djallalnamri » Fri Mar 12, 2010 9:36 am

Now it's great that you have the Blender Python console. There's a lot more. You can load and run any Python script (with the .py extension), by going to the Text window, at the top, selecting Text - Open, and opening the file. Included in the zip file for 2.5 Alpha 1 are many scripts. They're either in the Python or Scripts folders. As a simple example, there are Template files included, which gives you a Python file with the basics filled in, so you can start programming more easily. In the Templates folder, under Scripts, is the file operator_simple.py. We'll load this into the text area.

the unzipped file of 2.5 alpha 1 contains only 3 folders named:
-icons
-lib
-plugins
and none of them contains things like python scripts.
djallalnamri
 
Posts: 12
Joined: Fri Mar 05, 2010 4:13 pm

Re: python scripts

Postby irakrakow » Fri Mar 12, 2010 9:42 am

You need to unhide files beginning with the dot. There's a folder called .blender which has all that stuff. Most likely, your OS is set up to hide files beginning with a dot. You need to unhide it.
User avatar
irakrakow
Site Admin
 
Posts: 438
Joined: Fri Jan 22, 2010 9:01 pm

Re: python scripts

Postby djallalnamri » Fri Mar 12, 2010 9:45 am

yes i found it!
thanks again!
djallalnamri
 
Posts: 12
Joined: Fri Mar 05, 2010 4:13 pm

Previous

Return to BlenderPython

Who is online

Users browsing this forum: No registered users and 1 guest