2010/8/11 Corey Richardson
> Yes. It's called the Python API, it comes with Blender ;) bpy and Blender
> are the top modules. There are submodules for everything. The reference is
> here: http://www.blender.org/documentation/249PythonDoc/index.html
>
> HTH,
> ~Corey Richardson
>
> aug dawg wrote:
Hmm, apparently python doesn't care about whitespace in method calls or
attribute access:
class person:
def __init__(self):
self.name ="jim"
def hi(self):
print("hello")
>>> guy = person()
>>> guy. name
'jim'
>>> guy .hi()
hello
That at least explains that par
Why does this work
>>> a = 6
>>> b = 7
>>> answer = a.__sub__(b.__neg__())
>>> answer
13
but this does not?
>>> answer = 6.__sub__(7.__neg__())
SyntaxError: invalid syntax
I searched the internet, and found someone suggest adding spaces after each
number, which indeed works properly.
>>> answ
Thanks for the help. That's exactly the kind of solution I wanted. I've been
to that page several times already, but just ignored that section
apparently. Thanks alot.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
I created a custom vector type, inheriting from object, and defined __mul__,
__add__, etc. Unfortunately, the operators only work if I type "vector *
(int/float/number)", in that exact order. My program produces an error if I
instead type "number * vector". This makes sense to me, because I haven't
2009/10/7 Serdar Tumgoren
> And in case you hadn't heard enough suggestions yet, here's something
> I just stumbled into this morning:
>
> Programming Paradigms for Dummies, by Peter Norvig
> http://lambda-the-ultimate.org/node/3465
>
> Here's a portion of the soundbite from the website (where yo
a project with other people before, so it would definitely be helpful, for
both my Python and for whatever language I pick up. I think I may wait a bit
though, so I can actually help someone instead of slowing them down.
Anyway, thanks everyone for the input, you've
I have no real need to learn anything for a job, it's just a hobby right
now. I mostly just want "a programming language that has a different
philosophy or approach than
Python". However, you guys are right, if I just learn a language without a
reason, it will be worthless.
When I tried to learn
, if it's the
wrong place, I'm sorry.
Mark Young
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Thanks everybody, I didn't know modules ran code when you imported them, I
just thought they defined the functions, etc. in them. Thanks for the info.
I'm going to go look at the module's code now that I know where it's at.
Mark Young
_
Hi, I was reading a tutorial, and it mentioned the "import this" easter egg.
I was curious, and looked up the contents of the module, and dscovered that
it had attributes c, d, i, and s. I was wondering if anyone had any clue
what these attributes were supposed to mean. I think (this.s) is the zen
11 matches
Mail list logo