Re: [Tutor] Scripting Blender

2010-08-11 Thread Mark Young
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:

Re: [Tutor] Calling a number's methods

2010-06-23 Thread Mark Young
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

[Tutor] Calling a number's methods

2010-06-22 Thread Mark Young
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

Re: [Tutor] Defining operators for custom types

2010-02-12 Thread Mark Young
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:

[Tutor] Defining operators for custom types

2010-02-12 Thread Mark Young
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

Re: [Tutor] What language should I learn after Python?

2009-10-07 Thread Mark Young
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

Re: [Tutor] What language should I learn after Python?

2009-10-06 Thread Mark Young
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

Re: [Tutor] What language should I learn after Python?

2009-10-06 Thread Mark Young
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

[Tutor] What language should I learn after Python?

2009-10-06 Thread Mark Young
, 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

Re: [Tutor] this module

2009-08-08 Thread Mark Young
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 _

[Tutor] this module

2009-08-07 Thread 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