Hi,
I'm writing a script for Blender and need to build a face array. My
engine needs that all faces must be triangles, so I convert quads to
triangles by dividing them into two triangles. Here is the function:
def build_face_table(mesh):
face_table = {}
i = 0
for f in me
Terry Hancock wrote:
> I'm not sure either, yet, but can you indicate which line in your
> listing is 102 in the source file? That might be helpful.
101: ## f1.normal = copy.deepcopy(f.normal)
102:f1.normal = NMesh.Vert(f.normal[0], f.normal[1], f.normal[2])
I've tried with deepcopy, but the
My apologies for what is probably a simple question to most on this
group. However, I am new to python and very new to json.
I am trying to read in a json file from a twitter download. There are,
generally, two types of lines: those lines with "text" and the other
lines. I am only interested in t
like, and the best
> thing for that is a little bit of formatting. I bet you can figure out
> the problem yourself, once you see the structure of your data more
> clearly. I've reformatted the JSON for you to help out.
>
> On Fri, 2010-04-23 at 07:20 -0700, Red wrot
On Apr 23, 1:17 pm, Terry Reedy wrote:
> On 4/23/2010 10:20 AM, Red wrote:
>
> > My apologies for what is probably a simple question to most on this
> > group. However, I am new to python and very new to json.
>
> > I am trying to read in a json file from a
On Jul 25, 5:52 am, TonyO wrote:
> > Still I dont get how I am supposed to understand the pipe and its task/
> > idea/influece on control flow, of:
> > return |
>
> In the words of René Magritte,
>
> return |
> ^
> Ceci n'est pas une pipe.
We have a WINNER!!
--
http:/
> "We must constantly strive to remove multiplicity from our systems;
> lest it consumes us!"
>
> s/multiplicity/rantingrick/ and I'm in full agreement.
QFT
--
http://mail.python.org/mailman/listinfo/python-list
> To me all this does not look professional for somebody who want to
> attract students / instructors
I'm a big fan of the Menu containing a (useless) link to First Menu
Item
--
http://mail.python.org/mailman/listinfo/python-list
Hi everyone. First of all sorry if my english is not good.
I have a question about something in Python I can not explain:
in every programming language I know (e.g. C#) if you exceed the max-value of a
certain type (e.g. a long-integer) you get an overflow. Here is a simple
example in C#:
Thank you for your answers!
--
https://mail.python.org/mailman/listinfo/python-list
Thank you ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Hi friends;
I would like to pass a string into a dll function. I notice that to pass using
ctypes, it has to be a ctypes type. Looking at the ctypes doc page I don't see
a c_string class.
I tried to pass in byref("name of string") and got back "TypeError: byref()
argument must be a ctype
from collections import defaultdict
d = defaultdict(set)
assert isinstance(d['a'], set)
assert isinstance(d.get('b'), set)
d['a'] is ok, and a new set object is insert to d, but d.get('b') won't.
It's a bug, or just a feature?
I think dict.get() method is just a *safe* version of dict[key], may
9 at 7:46 AM, Rhodri James
wrote:
> On Thu, 21 May 2009 13:07:50 +0100, Red Forks wrote:
>
> from collections import defaultdict
>>
>> d = defaultdict(set)
>> assert isinstance(d['a'], set)
>> assert isinstance(d.get('b'), set)
>>
>>
t, using 'onload'
function to load the value by the key.
When no value correspond to a key, a KeyError will raised. So I need a
*safer* version 'get()' method.
On Fri, May 22, 2009 at 12:35 PM, Rhodri James
wrote:
> Please don't top-post, it makes the thread of argumen
gravating if you don't.
>
I misunderstand you last email, thanks.
>
> On Fri, 22 May 2009 09:53:04 +0100, Red Forks wrote:
>
> Yes, you maybe right. When use defaultdict, should not rely get() method
>> anymore, d[] is just enough.
>>
>
> Almost. You should re
Single - thread programming is great! clean, safe!!!
I'm trying schedual task to several work process (not thread).
On Fri, Jun 5, 2009 at 4:49 AM, MRAB wrote:
> Kaz Kylheku wrote:
>
>> ["Followup-To:" header set to comp.lang.lisp.]
>> On 2009-06-04, Roedy Green wrote:
>>
>>> On Thu, 4 Jun 2009
maybe a shell script to switch PYTHONPATH, like:
start-python-2.5
start-python-2.4 ...
On Fri, Jun 5, 2009 at 4:56 PM, David Cournapeau wrote:
> Hi,
>
> As I don't have admin privileges on my main dev machine, I install a
> good deal of python modules somewhere in my $HOME, using PYTHONPATH to
>
I don't know it is a feature, or implement detail:
>>> class C(object): pass
...
>>> c = C()
>>> setattr(c, ' ', 3)
>>> getattr(c, ' ')
3
>>> setattr(c, 'with blank', 4)
>>> getattr(c, 'with blank')
4
getattr / setattr seems treat any string as attribute name.
--
http://mail.python.org/mailman/l
>
> Yeah, riiight. So it's a crime to have any fun in life, right? Go get
> a life.
>
> -- Benjamin L. Russell
+1
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 1, 10:26 am, rantingrick wrote:
> On Feb 1, 10:29 am, "Littlefield, Tyler" wrote:
>
> > I hope everyone will
> > excuse me now, I must dash off to slit my wrists in a tub of warm water
> > and listen to Free Bird,
>
> Free Bird! hmm, I would have chosen Chopin's nocturne 48-1 or 72-1 if
>
On Feb 1, 11:23 am, rantingrick wrote:
> Hmm, that coming from someone who has two posts in this group. And the
> last he posted was a year ago! Alright, let me add you to the proper
> category...
>
> py> troll_group.append("Red John")
I realize that not agree
On Feb 2, 9:03 pm, alex23 wrote:
> rantingrick wrote:
> > Hmm, that coming from someone who has two posts in this group. And the
> > last he posted was a year ago!
>
> Wait, I thought you had the approval of the silent majority?
>
> So once anyone actually posts, they lost the right to be counted
Read you doc file and set the __doc__ attr of the object you want to change.
On Monday, June 28, 2010, Brian Blais wrote:
> Hello,
>
> I know that the help text for an object will give a description of every
> method based on the doc string. Is there a way to add something to this
> text, spec
On Thu, Jul 30, 2009 at 4:17 PM, Javier Collado wrote:
> Hello,
>
> In the string.Template documentation
> (http://docs.python.org/library/string.html) it's explained that if a
> custom regular expression for pattern substitution is needed, it's
> possible to override idpattern class attribute (wh
On Sun, Aug 2, 2009 at 9:06 AM, Steven D'Aprano <
st...@remove-this-cybersource.com.au> wrote:
> I was playing around with a custom mapping type, and I wanted to use it
> as a namespace, so I tried to use it as my module __dict__:
>
> >>> import __main__
> >>> __main__.__dict__ = MyNamespace()
> T
www.theworldhats.com are promoting
the products:
red bull hats:http://www.theworldhats.com/category-130-b0-Red-Bull-
Hats.html
snapback hats: http://www.theworldhats.com/category-230-b0-Snapback-Hats.html
monster energy hats:
http://www.theworldhats.com/category-128-b0-Monster-Energy
In Fundamental Algorithms (The Art of Computer Programming), the first
algorithm discussed is Euclid's Algorithm.
The only idea I have of writing this in python is that it must involve
usage of the modulo % sign.
How do I write this in python?
--
http://mail.python.org/mailman/listinfo/python-l
So, I did the following:
---
a=input("Give me an integer")
b=input("Give me another integer")
def gcd(a,b):
if a < b:
a, b = b, a
while b != 0:
a, b = b, a % b
return a
---
But, in the xterm, it terminates after "Give me another integer."
Is Euclid's Algorithm suppo
Original Message
Subject:Re: Logging question
Date: Tue, 15 Dec 2009 18:28:54 +
From: Vinay Sajip at Red Dove
To: Yaroslav Molochko
On 15/12/2009 14:29, Yaroslav Molochko wrote:
> Hello Vinay Sajip,
>
> my name is Yaroslav, I'm tryi
On 16/12/2009 12:49, stefan.messerl...@postfinance.ch wrote:
> I have the following error and no clue, how to solve that. Up to python
> version 2.5 the following script worked without an error, but since python
> 2.6. I get the following error:
>
> #!/usr/bin/env python
> # -*- coding: ISO-8859-
31 matches
Mail list logo