[Tutor] Assertion Error

2010-03-18 Thread sitharak
I tried this statement to store in RDF form store=TripleStore() But i'm getting this error Traceback (most recent call last): File "", line 1, in store=TripleStore() File "C:\Users\Administrator\Desktop\TripleStore.py", line 13, in __init__ super(TripleStore, self).__init__(backend

Re: [Tutor] Problems with iterations and breaking loops

2010-03-18 Thread Alan Gauld
"Karjer Jdfjdf" wrote In reality I have to do this for a much larger dataset (eg 1 range * 10 = a lot), so the for v1, v2 in list_of_tuples doesn't work because it is too large for it. What does the size have to do with it? v1,v2 in list_of_tuples will only unpack one tuple at a ti

[Tutor] Self-intro and two short newbie questions

2010-03-18 Thread Kevin Kirton
Hi all, I've committed myself to learning Python and have started reading "Learning Python" (Mark Lutz) and looking through various online resources. My career so far has involved a little high school teaching and about 10 years of translating Japanese to English, but no programming or coding. I'

Re: [Tutor] parsing a "chunked" text file

2010-03-18 Thread Stefan Behnel
Karim Liateni, 04.03.2010 01:23: Steven D'Aprano wrote: def skip_blanks(lines): """Remove leading and trailing whitespace, ignore blank lines.""" for line in lines: line = line.strip() if line: yield line Is there a big difference to write your first functions as below because I am not familia

Re: [Tutor] parsing a "chunked" text file

2010-03-18 Thread Hugo Arts
On Thu, Mar 18, 2010 at 12:54 PM, Stefan Behnel wrote: > Karim Liateni, 04.03.2010 01:23: > > Yes, a *big* difference in the true sense of the word. Your code (assuming > you meant to write "... for line in ..." ) evaluates the entire list > comprehension before returning from the call. Steven's c

Re: [Tutor] Self-intro and two short newbie questions

2010-03-18 Thread Wayne Werner
On Thu, Mar 18, 2010 at 6:42 AM, Kevin Kirton wrote: > Hi all, > > I've committed myself to learning Python and have started reading > "Learning Python" (Mark Lutz) and looking through various online > resources. > My career so far has involved a little high school teaching and about > 10 years o

Re: [Tutor] Assertion Error

2010-03-18 Thread Emile van Sebille
On 3/17/2010 11:02 PM sitharak said... I tried this statement to store in RDF form This is too specialized for this list. I couldn't find a dedicated news group for this project, but there is an IRC support channel -- see http://en.wikipedia.org/wiki/RDFLib#Support HTH, Emile store=T

Re: [Tutor] Self-intro and two short newbie questions

2010-03-18 Thread spir
On Thu, 18 Mar 2010 22:42:05 +1100 Kevin Kirton wrote: > My questions are: how long would you estimate it to take and how > complicated would it be to create the following as Python programs? (I > know it varies depending on the person, but for example, how long > would it take _you_?) My opinio

Re: [Tutor] Self-intro and two short newbie questions

2010-03-18 Thread Alan Gauld
"Kevin Kirton" wrote know it varies depending on the person, but for example, how long would it take _you_?) (i) a simple guitar tuning program involving an image of a guitar and the playing of each of the standard strings of a guitar (E, A, D, G, B, E) upon key input by the user For a profe

[Tutor] movement controls

2010-03-18 Thread snet-1
A little stuck and could do with any sudjestions. Aim:- When the character goes past the middle of the screen, the background & level move downwards so the character can get to higher places, think sonic the hedgehog. This is the bit I'm having problems with, I can get the character to get to t

Re: [Tutor] movement controls

2010-03-18 Thread Luke Paireepinart
You should probably decouple the view from the model - have the character move around in a 2d plane in the model and then just draw the level in a certain area around the 2d coordinates of the character. On Thu, Mar 18, 2010 at 6:51 PM, wrote: > A little stuck and could do with any sudjestions.

Re: [Tutor] Self-intro and two short newbie questions

2010-03-18 Thread Kevin Kirton
Thanks very much for the responses. I feel encouraged now to try to create the guitar tuner program by myself first, and then the simple turtle art program after that. It's kind of both exhilarating and daunting that I don't know exactly where to start at the moment, but that's the fun of learning