PDA

View Full Version : How to learn Python...



Celshader
02-04-2009, 09:53 PM
I see LWCore will offer Python access. That is GREAT news. Python's regularly saved my bacon since I first learned it in 2006. RealFlow, Poser, manipulating raw file data, gluing commandline applications together -- Python's always been there for me.

Plus, out of all the languages I've met -- C/C++, Java, JavaScript, and a brief experience with Perl -- Python seems most suited for GETTING STUFF DONE in the heat of production. I can't praise Python highly enough.

If anyone's interested, here's how I learned Python:
http://www.diveintopython.org

So:

Download (http://www.python.org/download/releases/2.6.1/) and install Python for free.
Open up the IDLE program that ships with Python.
Follow the excellent tutorials on DiveIntoPython (http://www.diveintopython.org)


:thumbsup:

bassmanjam
02-04-2009, 10:32 PM
Awesome! I had just picked up an O'Reilly book, Learning Python, a few weeks ago. Coincidence? I think not! Thanks so much for sharing.

Silkrooster
02-04-2009, 10:42 PM
Now I know why they wanted us to check the code side of looking for hints. The core will be using css.

adamredwoods
02-04-2009, 11:46 PM
Python is good. Plus, there are plenty of python libraries already out there.

Guess we'll be converting a lot of old scripts, eh?

hrgiger
02-04-2009, 11:55 PM
Cool, thanks for the resource Jen. Gives me something to look at while I'm waiting for Core Beta to start.

kmacphail
02-05-2009, 12:08 AM
The python docs are a great resource:

http://www.python.org/doc/versions/

I wonder which version of Python NewTek went with? I bet 2.5.X

You might want to look at the python mailing list too, lot's of great tidbits mixed in with the chatter.

Silkrooster
02-05-2009, 12:15 AM
I just marked a bunch of python books for my wish list on Amazon. One more language to learn. LOL.

Jaffro
02-05-2009, 03:00 AM
Thanks Celshader, Python is a great language from what i remember. Easy to learn, fast and free! :D Lots of IDEs out there for it too, many free also. I would've been disappointed if they'd chosen anything else!

Was great to see in the video a command line and if i remember correctly they mentioned that python commands are available into any edit field? Pretty cool with the python txt editor in LWCore too :)

Dirk
02-05-2009, 05:35 AM
@Celshader:

what can be done with Python? Sorry if this sounds totally ignorant, but I have no idea. Without something like CORE in the background, can I do more than doing the "Hello World!" - thing?

colkai
02-05-2009, 06:54 AM
Thanks for the links Jen. :)

Skonk
02-05-2009, 07:07 AM
Thanks for the links :)

Got a question for ya, Bit off topic but..

Is your old Kara tutorial still availible anywhere online?

The LightWave Applied version 6.5 & 7 website doesn't exist anymore it seems.

adk
02-05-2009, 07:10 AM
Cheers Jen :thumbsup:
Will definitely take a peek.

MiniFireDragon
02-05-2009, 09:47 AM
Nice, I've always wanted a reason to learn python, but had no use. Now with the advent of the new CORE I will learn Python and create motion scripts for accident reconstruction.

And look! HA! 30% off a book at Border's arrives in email today... nice!

Julez4001
02-05-2009, 10:14 AM
Can someone show some uses , specifically in terms of 3d appklication, that Python was used?

Lito
02-05-2009, 10:42 AM
I guess I have to learn python now but what version is in LW Core? I would guess 2.6.x but Core is new so maybe they went with v3.0.

MiniFireDragon
02-05-2009, 10:51 AM
Can someone show some uses , specifically in terms of 3d appklication, that Python was used?


www.blender3d.org

They have plenty of python plugins for the app.

Celshader
02-05-2009, 10:57 AM
@Celshader:

what can be done with Python? Sorry if this sounds totally ignorant, but I have no idea. Without something like CORE in the background, can I do more than doing the "Hello World!" - thing?

Absolutely! Python's great with or without a 3D software package that recognizes it. Here's some of the Python utilities I've written since early 2006 for various studios:

External scripts

For studios with render farms, I've written an external Python utility that analyzes an *.LWS scene, extracts the RGB output path and start/end/framestep, goes to the directory specified in the RGB output path and checks if all frames are there. If any frames are missing, the script offers to render the frames locally with Screamernet III. If the user chooses "no" to that offer, the script then offers to write a report that lists which frames are missing.
In a failed attempt to get RealFlow data natively into LightWave as partigons, I wrote a *.BIN>*.PFX converter. The *.BIN file format documentation ships with RealFlow, and the *.PFX file format is documented at DStorm (http://tinyurl.com/ahtgwc). This script worked fine for small calculations, but we had MASSIVE amounts of RealFlow data to get into LightWave, and the PFX file format tops out at a million particles. So...
I wrote a Python script to convert a *.BIN sequence into an *.LWO sequence. Each *.LWO object was a partigon cloud with a "Speed" endomorph and weightmaps for "particle age" and "velocity." There were so many partigons, though, that we didn't bother surfacing with the weightmaps and instead rendered the Default-surfaced partigon data.
An external Python script to shift the numbering of any sequence on the hard drive, since LW9.0 did not have an offset in its Object Sequence plug-in.
An external Python script to change the extension of a file sequence, in case someone tried to renumber an *.LWO sequence with ARRIBA and accidentally renamed the entire sequence to *.TIF.
An external Python script that would go through an *.LWO sequence generated from RealFlow, catch which points on the "Speed" endomorph exceed a certain threshold, and scale the endomorph values of those points back to something that worked. Sometimes particles on RealFlow reach outrageous speeds, and the resulting Realflow-generated mesh looks great until you try to render it and all these "spikes" appear during the motion-blurred render. This script fixes that problem.
External pipeline scripts to automate tedious tasks.


RealFlow scripts

A PFX importer for RealFlow, aka *.PFX>*.BIN converter.
Generate emitters along the spline defined by a given motion path (one of my earliest "test" scripts).
Pipeline scripts, again to automate tedious tasks.


Poser 7 scripts

Toggle clothing on/off
Hide/reveal hierarchy
Hide/reveal character
Delete a figure and its clothes
Delete just a figure's clothes
Make all lights white
Zero non-expression morphs
Actor/figure material settings export/import
Conform all free clothes to a selected figure
Add a prefix to the names of each part of a hierarchy
Remove a prefix from the names of each part of a hierarchy
Load character scenes one after the other and render turnarounds of each scene
Load a character scene one after the other and render out portraits of each character
Blink generator
Character fixes


Thanks to Python's slew of handy, built-in functions (http://docs.python.org/modindex.html), I could focus on getting stuff done instead of wondering how to do any of it.

This XKCD cartoon sums it up:

http://imgs.xkcd.com/comics/python.png

archijam
02-05-2009, 11:19 AM
Generous of you, Jen! Thanks for sharing, experiences especially..

Now all I need is to python myself command line input for LW like rhino and autocad........

dballesg
02-05-2009, 11:27 AM
Now all I need is to python myself command line input for LW like rhino and autocad........

Jonas showed that possibility on the video!

And thanks Jen for the links.

David

Chrizto
02-05-2009, 11:49 AM
Awesome! I had just picked up an O'Reilly book, Learning Python, a few weeks ago. Coincidence? I think not! Thanks so much for sharing.

That book is very good. I started using python in 2003, and it is only a small part of the language you need to master to use API's in 3D apps.

Wickster
02-05-2009, 12:31 PM
I see LWCore will offer Python access. That is GREAT news. Python's regularly saved my bacon since I first learned it in 2006. RealFlow, Poser, manipulating raw file data, gluing commandline applications together -- Python's always been there for me.

Plus, out of all the languages I've met -- C/C++, Java, JavaScript, and a brief experience with Perl -- Python seems most suited for GETTING STUFF DONE in the heat of production. I can't praise Python highly enough.

If anyone's interested, here's how I learned Python:
http://www.diveintopython.org

So:

Download (http://www.python.org/download/releases/2.6.1/) and install Python for free.
Open up the IDLE program that ships with Python.
Follow the excellent tutorials on DiveIntoPython (http://www.diveintopython.org)


:thumbsup:
LOL! i was about to email you from your site about this. Thanks for pointing these out. :D

avkills
02-05-2009, 12:38 PM
You all need to buy my brother's book "Python: Essential Reference"; I think he is due to release a new revision shortly; not only that -- my brother invented SWIG so there is probably some good references about it in his Python book. I can check on that if you want.

I do not know Python or SWIG; but at least I have a good mentor. :D

Links:

Python Essential Reference (http://www.amazon.com/Python-Essential-Reference-Developers-Library/dp/0672329786/ref=sr_1_1?ie=UTF8&s=books&qid=1233862528&sr=1-1)

SWIG (http://www.swig.org/)

Newtek is really on to something here. Python is used at many animation studios and with other 3D apps.

-mark

(edit * the Amazon link is for the latest revision)

dballesg
02-05-2009, 12:47 PM
my brother invented SWIG so there is probably some good references about it in his Python book. I can check on that if you want.



Sent his contact info to Chuck Baker on a pm or an email, I am sure they would be interested on that information.

David

Celshader
02-05-2009, 12:49 PM
Newtek is really on to something here. Python is used at many animation studios and with other 3D apps.

Absolutely! Almost every major and minor 3D software package includes a Python interpreter:


Blender (http://jmsoler.free.fr/didacticiel/blender/tutor/python_script00_en.htm)
Hash:Animation Master (http://www.sorfa.com/plugins/am_pythonscript.html)
Houdini (http://www.sidefx.com/index.php?option=com_content&task=view&id=545&Itemid=66)
Massive (http://www.massivesoftware.com/prime/)
Maya (http://www.digitaltutors.com/store/product.php?productid=3414)
modo (http://wiki.cgsociety.org/index.php/Modo#Scripting)
MotionBuilder (http://www.lulu.com/content/1842341)
Poser (http://3dtrue.com/tutorial/6.html)
RealFlow (http://www.nextlimit.com/nlscript/)
trueSpace (http://home.mindspring.com/~clintonr/MyTruespace/TSPython.html)
Vue (http://www.impworks.co.uk/vue/vuepythonforbeginners.php)
XSI (http://softimage.wiki.softimage.com/index.php/Python_(XSISDK))


...and now LWCORE, which promises deep access with Python.

Python scripters already working at places like ILM (http://www.python.org/about/success/ilm/) can dive right into LWCORE without learning a new language.

:boogiedow

Jure
02-05-2009, 12:50 PM
Here's a nice tutorial for beginners:

http://www.freenetpages.co.uk/hp/alan.gauld/

Liber777
02-05-2009, 12:54 PM
Nice. Now I can concentrate on learning a single scripting language that will work with both LightWave and Fusion.

avkills
02-05-2009, 01:01 PM
Sent his contact info to Chuck Baker on a pm or an email, I am sure they would be interested on that information.

David

Yeah I just sent my brother an email to find out more. I was surprised that Newtek had not talked to him already.

-mark

Joa2020
02-05-2009, 01:03 PM
Now with the python feature, is it possible that some programmer may build a script that may allow the use of Nvidia´s Tesla cards, or for that matter ATI´s streamline cards? The use of these professional cards may greatly improve rendering speed as you all know. Anyways, I am not knowledgable on programming so excuse my ignorance.


Regards

dballesg
02-05-2009, 01:19 PM
Now with the python feature, is it possible that some programmer may build a script that may allow the use of Nvidia´s Tesla cards, or for that matter ATI´s streamline cards? The use of these professional cards may greatly improve rendering speed as you all know. Anyways, I am not knowledgable on programming so excuse my ignorance.


Regards

That is nothing to do with Python. It is part of LW Core itself, and for what I know. LW COre is GPU aware, meaning it will use the power of the graphic card where it's possible.

David

dballesg
02-05-2009, 01:20 PM
Yeah I just sent my brother an email to find out more. I was surprised that Newtek had not talked to him already.

-mark

OH good and thanks. I am sure they can benefit form contact him directly! :)

David

Joa2020
02-05-2009, 01:32 PM
That is nothing to do with Python. It is part of LW Core itself, and for what I know. LW COre is GPU aware, meaning it will use the power of the graphic card where it's possible.

David

Thanks for your reply now I get it.

I saw that in the Core´s faq too, I don´t understand when they mean that Core will use the power of the card in certain cases, I´d like to know what role will the graphics card play, maybe I can send them an email.

I´m patiently awaiting for an future app that could make use of those Nvidia´s Tesla or Ati cards, probably still will take some time then. :)

jin choung
02-05-2009, 02:37 PM
Generous of you, Jen! Thanks for sharing, experiences especially..

Now all I need is to python myself command line input for LW like rhino and autocad........

yeah, as mentioned, lwcore has it already... ala maya. as for doing it for 9.6....?! good luck with that.

jin

don_culbertson
02-05-2009, 06:25 PM
The following books will help you with a basic understanding of the Python language, particularly if you find "Dive into Python" too complex to start with.

How to Think Like a Computer Scientist - Learning with Python (http://openbookproject.net/thinkCSpy/index.xhtml)

A Byte of Python (http://www.swaroopch.com/notes/Python)

Don

aurora
02-05-2009, 07:01 PM
A couple of books I really like for Python are

Core Python Programming by Wesley Chun
Python Scripting for Computational Science by H.P. Langtangen

WROK also has a couple great Python books.

jameswillmott
02-05-2009, 07:18 PM
Python is awesome, I can't recommend learning it enough.

colkai
02-07-2009, 11:23 AM
Here's a thing.
Am I correct in presuming the Python we are talking about here is the 2.X series not the latest 3.X which seems to be incompatible with the older version.
This also being the case, which version do you think CORE will support? The newer one or the 'standard' 2.x version?

Hopper
02-07-2009, 12:15 PM
Here's a thing.
Am I correct in presuming the Python we are talking about here is the 2.X series not the latest 3.X which seems to be incompatible with the older version.
This also being the case, which version do you think CORE will support? The newer one or the 'standard' 2.x version?
Technically it will support both.

Sekhar
02-07-2009, 12:33 PM
In a failed attempt to get RealFlow data natively into LightWave as partigons, I wrote a *.BIN>*.PFX converter. The *.BIN file format documentation ships with RealFlow, and the *.PFX file format is documented at DStorm (http://tinyurl.com/ahtgwc). This script worked fine for small calculations, but we had MASSIVE amounts of RealFlow data to get into LightWave, and the PFX file format tops out at a million particles. So...
I wrote a Python script to convert a *.BIN sequence into an *.LWO sequence. Each *.LWO object was a partigon cloud with a "Speed" endomorph and weightmaps for "particle age" and "velocity." There were so many partigons, though, that we didn't bother surfacing with the weightmaps and instead rendered the Default-surfaced partigon data.

Can you share these? I've been trying to import an RF bin sequence as particles for using FXLinker. I found a workaround, but the particles only get the position info - not the age, velocity, or rotation. BTW, do you handle rotation, or do the bin files have rotation info at all?

Celshader
02-07-2009, 12:58 PM
Can you share these? I've been trying to import an RF bin sequence as particles for using FXLinker. I found a workaround, but the particles only get the position info - not the age, velocity, or rotation. BTW, do you handle rotation, or do the bin files have rotation info at all?

I wrote the originals for another studio, so the studio owns those scripts, not me. I'd have to write a new converter from scratch. :o

RF3 *.bin files have velocity information, but not rotation information. RF4 *.bin files contain "vorticity (http://en.wikipedia.org/wiki/Vorticity)" information, but I'm not sure if that's useful for FXLinker stuff.

For what it's worth, a *.pfx v3 (http://tinyurl.com/ahtgwc) file has only position information for each frame, but not rotation information. LightWave figures out "Align to Path" information from the overall path of each particle. So, translating even an RF3 *.bin sequence to a *.pfx file should work for FXLinker.

Sekhar
02-07-2009, 01:21 PM
I wrote the originals for another studio...

Oh well, thanks anyway. FYI, there's a neat trick a guy (Shaun) suggested on the RF forums for generating LW particles from RF. What you do is create a mesh with mpolys on the RF particles, import to LW, and attach an emitter to the polys, each generating one particle. A bit convoluted, but does the job without any extra converter.

colkai
02-07-2009, 02:16 PM
Technically it will support both.

Sweet :)

zapper1998
02-07-2009, 02:28 PM
oh wow cool more books to read ...... Yaaaaaa

aurora
02-07-2009, 02:41 PM
So, translating even an RF3 *.bin sequence to a *.pfx file should work for FXLinker
Thanks to a wee bit of info Jennifer gave me last year I can confirm that YES this does work!!!!

As for Python version's. Yeah I also tend to think that Core will support both 2.x and 3.x. I have found that using the 2to3 converter does a pretty decent job on most of my files. But I have to admit that I still flip flop back and forth between using 2 and 3. The more I use three and get used to it nuances the more I want to use it. At first it was hard being time crunched and running into errors that worked just fine in 2.x.

lots
02-07-2009, 03:42 PM
Well since it seems Core supports SWIG languages such as Python, as long as the newer version 3.0 of Python is SWIG capable, it should work in Core as well...

The SWIG site has a bunch of supported languages...

mav3rick
02-08-2009, 03:08 AM
so if i recall any1 into phyton already will be easy able to port that tools in core? :) and best of all phyton is about to access all from sdk ...

archijam
02-08-2009, 03:36 AM
yeah, as mentioned, lwcore has it already... ala maya. as for doing it for 9.6....?! good luck with that.

jin

Just talking about core.

What I mean is there is a difference between command line as launching commands, and context sensitive command line that goes several levels deep, ie. box, width, height, horizontal divs, vertical divs, etc, continually prompting, or accepting defaults ..

colkai
02-08-2009, 04:04 AM
Ok, I guess the obvious question is, should I focus on Python 3.0 if I do go CORE as there are some major differences to 2.61?

dballesg
02-08-2009, 04:26 AM
Ok, I guess the obvious question is, should I focus on Python 3.0 if I do go CORE as there are some major differences to 2.61?

That is a very, very good question. Without unveiling anything, at least one of the developers could tell us which version start to learn? :)

I would like to know as well how it's going to deal if you had installed a Python version on your computer. Or even 32 bits and 64 bits versions at the same time.

I can easily confuse Blender 2.48 if I installed Python 2.6 instead of Python 2.5.

David

colkai
02-08-2009, 04:50 AM
Yep, that's another thing to consider too, that Blender requires 2.5.1, the latest 2.x is 2.6.1 and then we have 3.0
Makes for a confusing start to learning, just grateful at least I have a vague understanding of code structures. (Though it's took me 30 years :p ;) )

kopperdrake
02-08-2009, 02:16 PM
As a guy who only uses LW as an artist at the moment, is there any benefit for someone like me to learn Python? I don't really use other 3D packages, apart from Vue xStream 6.

Just sounds like fun to learn something different, but then not sure if I'd get anything from it!

dballesg
02-08-2009, 03:24 PM
Yep, that's another thing to consider too, that Blender requires 2.5.1, the latest 2.x is 2.6.1 and then we have 3.0

And add Python on Windows, Mac & Linux to the combination! :)

I do not know how they thought on manage all that combinations, but is clear that there is a lot of things we need to learn.

And I would like a clue on where to start really.

That they included Python it is a big thing for me, because I can use that knowledge on Blender, and xStream as well! :)



Makes for a confusing start to learning, just grateful at least I have a vague understanding of code structures. (Though it's took me 30 years :p ;) )

Colkai, sometimes you are a big fat liar (joking) :D We know it didn't took you so long :D

David

JVitale
02-08-2009, 07:19 PM
If you are like me and don't have any experience programming but would like to learn Python here's a free e-book that teaches you Python by writing simple games (I'm on page 60 of 330 so I haven't mastered Python yet)

Invent Your Own Computer Games with Python by Al Sweigart
http://pythonbook.coffeeghost.net/


Here's a cheat sheet for Python for more experience programmers. It's a handy dandy reference, also by Al Sweigart

http://coffeeghost.net/

Silkrooster
02-08-2009, 08:16 PM
Last night I was thinking about Aurora's thread on those reflection balls. I forgot what their called. Anyway, I was think what python would do to such a scene. I recall back in the qbasic days of creating lines on the screen using sine and cosine. Now we have the ability to do so in 3d and not just lines any more.

kmacphail
02-08-2009, 10:46 PM
For what it is worth, I watched the Ustream feed again to take a second look at the Python demonstration. Although it is too compressed to clearly make out any text in the Python editor pane, you can see that there is a three digit version number like 2.5.4 or 2.6.1, not a two digit version like 3.0 (I checked my 3.0 install at work, the version number is indeed 3.0).

Cheers,

-Kevin

Jaffro
02-09-2009, 08:01 AM
If your just starting out with Python I dont really think you can go wrong with what version you pick. Ideally it would be good to know what Core has been using, and its a pretty safe bet that its 2.x (considering the development period), but you wont lose much if you learn 3 and it turns out quirky in Core.

kopperdrake.. From an artist perspective it can be really handy to have a basic understanding of the technical stuff that you dont see because everything is built on a logical system and if you have a deeper understanding of that logic then quite often you can approach things differently to begin with for a better end result. So i guess it really depends how much time you have :) You'll certainly gain a lot just from the experience, even if you only end up using python just a few times for 'bits and bobs'.

dsol
02-09-2009, 08:29 AM
If you're new to programming - then this might be your cup of tea:
http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/

It's an introduction to Python, aimed at kids! It's pretty well written though. God, I would've loved to have something like this when I was a little 'un :)

As you can imagine, it's written in a very unthreatening, non-techy way

kopperdrake
02-09-2009, 10:53 AM
Cheers Jaffro :)

There's never enough time but if it turns out useful then I'll make time :thumbsup:

Wickster
02-10-2009, 02:12 PM
Wait so...is the switch between Python 2.X to 3.0 a huge jump like Adobe's Actionscript 2 to Actionscript 3?

I would guess that whatever you write on Python 2.X will work with Python 3.0 but not the other way around right?

Lito
02-10-2009, 03:20 PM
I can't compare it to Adobe's Action script cause I never used it, but from the python page:



Python 3.0 (a.k.a. "Python 3000" or "Py3k") is a new version of the language that is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Also, the standard library has been reorganized in a few prominent places.


So no 2.x scripts won't necessarily work with the v3.0 version.

Wickster
02-10-2009, 03:32 PM
...So no 2.x scripts won't necessarily work with the v3.0 version.
Thanks Lito.

This makes it a lot harder to learn and use for me then.

I mean I would start learning version 2.X for core but I like learning the current version for beyond core scripting.

Silkrooster
02-10-2009, 04:30 PM
Makes it a bit difficult for us to jump the gun. Just about have to wait for Newtek to let us know which version.
In the mean time I did order a python book. Hopefully I can get some use out of it.

hrgiger
02-10-2009, 05:24 PM
I was at Barnes and Noble tonight and was looking at Python books. But I'll want to know more about what would make for a good book before I buy one.

dwburman
02-10-2009, 08:52 PM
You might want to take a look at the books/material online before buying a book. There are several freely downloadable ones. If they don't work for you (or you want something paper to read) you could get the book then.

http://www.techbooksforfree.com/perlpython.shtml

kfinla
02-10-2009, 09:04 PM
Just wanted to thank DSOL for this link;
http://www.briggs.net.nz/log/writing...ling-for-kids/

It was slow today at work, so I started teaching myself python while the books are in the mail.

Liber777
02-10-2009, 09:10 PM
http://docs.activestate.com/activepython/3.0/python/whatsnew/3.0.html

It seems that Python 3.0 is not backwards-compatible with Python 2.5/2.6. Going either way requires a rework of the code.


Python 3.0 (a.k.a. "Python 3000" or "Py3k") is a new version of the Python language that is incompatible with the current 2.x line of releases. The language is largely the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Also, the standard library has been reorganized in a few prominent places.

Python 2.x is continuing to be developed alongside 3.0 since most existing apps are written with 2.x in mind. It looks like you can install both side by side.

http://www.python.org/download/

Tranimatronic
02-10-2009, 09:20 PM
http://docs.python.org/tutorial/

Written by the guy that wrote the language (i think). I constantly refer back to this site. With a basic understanding of programming concepts this is all you need. As far as I remember python 3 is an attempt at fixing puthon's poor object orientation. In general usage it will be only slightly different to any other version.
Also with the new browser view you should be able to bring it up in LW.
T

kmacphail
02-10-2009, 09:36 PM
Python 2.7 is in the planning stages, so the 2.X series isn't going anywhere soon, it will continue to be developed in parallel with Python 3.X. You can feel confident that any version of Python you learn now will be useful for many years to come.

-K

kmacphail
02-10-2009, 09:55 PM
As a guy who only uses LW as an artist at the moment, is there any benefit for someone like me to learn Python? I don't really use other 3D packages, apart from Vue xStream 6.

Just sounds like fun to learn something different, but then not sure if I'd get anything from it!

An example that comes to mind is making selections. Being able to write a three line script to select the items you want out of a list of 10000, filtered however you want, is a huge boon (this is pretty much true of any scripting language in any app). A script I wrote years ago let me accomplish three days worth of manual selection and editing in about 10 minutes. Do it once and you'll be hooked.

-K

hrgiger
02-10-2009, 10:07 PM
Yeah, I can only read on screen for so long. I have to have a paper version.

DarkLight
02-11-2009, 06:27 AM
I think i'm going to take a look at learning Python this weekend.

Yet another language to learn! :)

zareh
02-11-2009, 11:45 AM
You all need to buy my brother's book "Python: Essential Reference"; I think he is due to release a new revision shortly; not only that -- my brother invented SWIG so there is probably some good references about it in his Python book. I can check on that if you want.

I do not know Python or SWIG; but at least I have a good mentor. :D

Links:

Python Essential Reference (http://www.amazon.com/Python-Essential-Reference-Developers-Library/dp/0672329786/ref=sr_1_1?ie=UTF8&s=books&qid=1233862528&sr=1-1)

SWIG (http://www.swig.org/)

Newtek is really on to something here. Python is used at many animation studios and with other 3D apps.

-mark

(edit * the Amazon link is for the latest revision)

I'm in a class with your brother this very minute. It's an awesome class. Just the right amount of lecture vs. actual programming exercises. We're learning about Generators now.
Very impressive,
Zareh

faulknermano
02-18-2009, 02:28 AM
i'd like to add that diveintopython have several things is specific to v2.x (and that won't work in 3.x) . i think it's better for newcomers (like myself) to head first to v2.x if they're planning to learn it using this resource.

thanks to Jen for the link. :)

frantbk
02-18-2009, 09:53 AM
I was at Barnes and Noble tonight and was looking at Python books. But I'll want to know more about what would make for a good book before I buy one.

You just made a good point. It would be nice if NewTek could give people a heads-up about which python books might be better for core use.

I'm not up with all of the acronyms, so css doesn't mean anything to me. Anyone willing to give me the long version of what css means?

frantbk
02-18-2009, 09:54 AM
http://docs.activestate.com/activepython/3.0/python/whatsnew/3.0.html

It seems that Python 3.0 is not backwards-compatible with Python 2.5/2.6. Going either way requires a rework of the code.



Python 2.x is continuing to be developed alongside 3.0 since most existing apps are written with 2.x in mind. It looks like you can install both side by side.

http://www.python.org/download/

Thanks for the link, I've already added to my bookmarks.:thumbsup:

Liber777
02-18-2009, 12:39 PM
...It would be nice if NewTek could give people a heads-up about which python books might be better for core use...

In the reveal video, it looks to me like they are using Python version 2.5.1.

paulhart
02-18-2009, 12:45 PM
CSS references Cascading Style Sheets, a tool used actively in HTML web site development, and XML document formatting. It is a comprehensive description page of attributes that are used throughout a site or document, so that you can describe a particular treatment for a font, color block, button style, etc. once in the CSS, link it to your development, and then use the "shorthand" label (i.e. ".maintext") anytime you want those elements to have the same look & feel. Great stuff, in that, you can make global changes just by tweaking the definitions in the CSS and any reference to them immediately updates. Hope this helps.
Paul

frantbk
02-18-2009, 12:56 PM
In the reveal video, it looks to me like they are using Python version 2.5.1.

Ok. Do any of you think they will move to 3.x before the release of core 1.x

frantbk
02-18-2009, 01:00 PM
CSS references Cascading Style Sheets, a tool used actively in HTML web site development, and XML document formatting. It is a comprehensive description page of attributes that are used throughout a site or document, so that you can describe a particular treatment for a font, color block, button style, etc. once in the CSS, link it to your development, and then use the "shorthand" label (i.e. ".maintext") anytime you want those elements to have the same look & feel. Great stuff, in that, you can make global changes just by tweaking the definitions in the CSS and any reference to them immediately updates. Hope this helps.
Paul

Thanks for answering. I came up with Command structure scripting. Container scripting structure. Also when everything gos wrong Crap, silly sh** #@%#&*. :stop:

I'll have to use the web and look up info on it. I'll need to get up to speed on it. Yeah I'm out of date on some things :).

art
02-25-2009, 09:05 AM
Other than the "dive into python" book, I'm not sure if these other books were already posted:

http://www.computer-books.us/python.php

frantbk
02-26-2009, 07:30 AM
Thanks for the information. I bookmarked the page. :)

Silkrooster
02-26-2009, 10:05 PM
Thanks for answering. I came up with Command structure scripting. Container scripting structure. Also when everything gos wrong Crap, silly sh** #@%#&*. :stop:

I'll have to use the web and look up info on it. I'll need to get up to speed on it. Yeah I'm out of date on some things :).

This should get you started.


CSS

http://css-discuss.incutio.com/
http://www.w3schools.com/Css/default.asp
http://en.wikipedia.org/wiki/Cascading_Style_Sheets
http://www.csszengarden.com/
http://www.w3.org/TR/CSS2/
http://www.addedbytes.com/cheat-sheets/css-cheat-sheet/
https://developer.mozilla.org/en/CSS
http://www.alistapart.com/topics/code/css/
http://www.cssbasics.com/

frantbk
02-27-2009, 06:50 AM
Thank you very much for the links. I've bookmarked them and will now spend some time reviewing them. :) :thumbsup:

Silkrooster
02-27-2009, 05:23 PM
You're welcome

avkills
03-01-2009, 06:39 PM
I'm in a class with your brother this very minute. It's an awesome class. Just the right amount of lecture vs. actual programming exercises. We're learning about Generators now.
Very impressive,
Zareh

Cool.

-mark

EXOSOUL
03-01-2009, 06:58 PM
well, I think I've been bitten by the Python bug!!! I just started reading about it and can't wait to learn it.. ( I never thought I would say that I can't wait to learn a how to code.. man. this Core thing is really getting into me... what is wrong with me?!?! :D )