Re: [Tutor] Math Function and Python

2012-07-01 Thread Steven D'Aprano
On Sun, Jul 01, 2012 at 11:21:11PM -0500, Greg Nielsen wrote: > Hello Tutor, > > I'm having some trouble with a mathematical function in my code. I am > attempting to create a realistic acceleration in an object, slower to speed > up at its min and max speeds and fastest in the middle. To kee

[Tutor] Math Function and Python

2012-07-01 Thread Greg Nielsen
Hello Tutor, I'm having some trouble with a mathematical function in my code. I am attempting to create a realistic acceleration in an object, slower to speed up at its min and max speeds and fastest in the middle. To keep the math simpl(er), I just wrote this function for a parabola, which m

Re: [Tutor] Python XML for newbie

2012-07-01 Thread David Kidd
On Mon, Jul 2, 2012 at 12:31 PM, Sean Carolan wrote: > How do you say, "If the field is 11, then print the next value"? The > raw XML looks like this: > > > 1 > 11 > 9780470286975 > > Instead of iterating over the whole tree, grab all the elements then retrieve the child, check the field va

Re: [Tutor] Python XML for newbie

2012-07-01 Thread Sean Carolan
> Thank you, this is helpful. Minidom is confusing, even the > documentation confirms this: > "The name of the functions are perhaps misleading" > >> But I'd start with the etree tutorial (of which >> there are many variations on the web): Ok, so I read through these tutorials and am at least

Re: [Tutor] Python XML for newbie

2012-07-01 Thread Sean Carolan
> The simplest way using the standard library tools is (IMHO) > elementtree. minidom is a complex beast by comparison, > especially if you are not intimately familiar with > your XML structure. Thank you, this is helpful. Minidom is confusing, even the documentation confirms this: "The name of th

Re: [Tutor] Python XML for newbie

2012-07-01 Thread Alan Gauld
On 01/07/12 21:49, Sean Carolan wrote: ... Is there a *simple* way to import an XML file into a dictionary, list, or other usable data structure? The simplest way using the standard library tools is (IMHO) elementtree. minidom is a complex beast by comparison, especially if you are not intimate

[Tutor] Python XML for newbie

2012-07-01 Thread Sean Carolan
I'm trying to parse some XML data (Book titles, ISBN numbers and descriptions) with Python. Is there a *simple* way to import an XML file into a dictionary, list, or other usable data structure? I've poked around with minidom, elementtree, and "untangle" but am not really understanding how they a

[Tutor] How to authorize my application to use Google API

2012-07-01 Thread Surya K
I am building a Facebook application using Django where I am using Blogger API. So, all I want is to just read the data from a public blog (my blog). I tried to read the documentation and found that we have 3 types of authentication mechanisms (ClientLogin, OAuth, AuthSub Proxy). As I can't dir