Re: [Tutor] Difficulty Understanding Example Code for Blender Script

2010-07-22 Thread David Hutto
On Thu, Jul 22, 2010 at 2:47 AM, Marc Tompkins wrote: > On Wed, Jul 21, 2010 at 9:48 PM, Andrew Martin > wrote: >> >> This code was part of a Blender script to build a 3d bar graph, so I don't >> know if understanding Blender is a prereq for understanding this code. The >> function is for the axi

[Tutor] "expected an indented block" (see attached)

2010-07-22 Thread Alex Hall
Hi all, Attached is a file. When I run the program it is part of, I get an error that says: line 62: IndentationError: expected an indented block. I can see nothing wrong with the indentation, though. This is part of my Battleship game, defining all the different ships and aircraft the user can ha

Re: [Tutor] "expected an indented block" (see attached)

2010-07-22 Thread Evert Rol
> Attached is a file. When I run the program it is part of, I get an > error that says: > line 62: IndentationError: expected an indented block. This function: def fromString(self, str): #creates a Craft object from the string #end class Craft Is completely empty (the comment lines are disca

Re: [Tutor] "expected an indented block" (see attached)

2010-07-22 Thread Alex Hall
On 7/22/10, Evert Rol wrote: >> Attached is a file. When I run the program it is part of, I get an >> error that says: >> line 62: IndentationError: expected an indented block. > > This function: > > def fromString(self, str): > #creates a Craft object from the string > #end class Craft > > > I

Re: [Tutor] "expected an indented block" (see attached)

2010-07-22 Thread Hugo Arts
On Thu, Jul 22, 2010 at 3:35 PM, Evert Rol wrote: >> Attached is a file. When I run the program it is part of, I get an >> error that says: >> line 62: IndentationError: expected an indented block. > > This function: > >  def fromString(self, str): >  #creates a Craft object from the string > #end

Re: [Tutor] "expected an indented block" (see attached)

2010-07-22 Thread Evert Rol
>> (also consider using four spaces for indentation, which I've also found much >> clearer. Have a read through PEP 8; has a lot of interesting tidbits. > > Did you read the rest of his post? He's using a screen reader for a > reason; he can't *see* the code. visual means of structuring code like

Re: [Tutor] "expected an indented block" (see attached)

2010-07-22 Thread Alex Hall
On 7/22/10, Hugo Arts wrote: > On Thu, Jul 22, 2010 at 3:35 PM, Evert Rol wrote: >>> Attached is a file. When I run the program it is part of, I get an >>> error that says: >>> line 62: IndentationError: expected an indented block. >> >> This function: >> >> def fromString(self, str): >> #creat

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-22 Thread Lie Ryan
On 07/05/10 22:23, Adam Bark wrote: > > I should add that this is how something like: > > if x != y: > do_something() > > works, if expects a True or False (this isn't always true but works for > comparison operators expressions such as this). > "if" expects an expression that can be con

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-22 Thread Adam Bark
On 6 July 2010 02:05, Lie Ryan wrote: > On 07/05/10 22:23, Adam Bark wrote: > > > > > I should add that this is how something like: > > > > if x != y: > > do_something() > > > > works, if expects a True or False (this isn't always true but works for > > comparison operators expressions such a

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-22 Thread Peter Otten
Lie Ryan wrote: > On 07/05/10 22:23, Adam Bark wrote: > >> >> I should add that this is how something like: >> >> if x != y: >> do_something() >> >> works, if expects a True or False (this isn't always true but works for >> comparison operators expressions such as this). >> > > "if" exp

[Tutor] sound libraries?

2010-07-22 Thread Alex Hall
Hi all, I am curious. If I wanted a library that would let me play sounds at specific positions in the stereo field, then update that position as the user "moved" so that it would seem to be a fixed reference point, what would I use? For example, say the left/right arrows move you left and right. I

[Tutor] how i can change two lists into one directory

2010-07-22 Thread ANKUR AGGARWAL
hey i have just started making a app using python and just gt a problem.. i have two list a=["x","z"] b=[1,2] i want to make a directory like this c={"x":1,"z":2} is it possible i mean i tried it using loops and all but i cant append a directory so i m unable to do this... plz tell me if th

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] (no subject)

2010-07-22 Thread Alex Hall
This message was blank, I am not sure if that was the idea or not. On 7/22/10, ankur wrote: > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Have a gre

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how i can change two lists into one directory

2010-07-22 Thread Alex Hall
On 7/22/10, ANKUR AGGARWAL wrote: > hey i have just started making a app using python and just gt a problem.. > > i have two list > a=["x","z"] > b=[1,2] > > i want to make a directory like this It is called a dictionary, actually. > c={"x":1,"z":2} > > is it possible i mean i tried it using

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how i can change two lists into one directory

2010-07-22 Thread bob gailer
On 7/22/2010 7:51 PM, ANKUR AGGARWAL wrote: hey i have just started making a app using python and just gt a problem.. i have two list a=["x","z"] b=[1,2] i want to make a directory like this Do you mean "dictionary"? c={"x":1,"z":2} is it possible Indeed. There are several ways to

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2010-07-22 Thread ankur
___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] how i can change two lists into one directory

2010-07-22 Thread Steven D'Aprano
On Fri, 23 Jul 2010 09:51:37 am ANKUR AGGARWAL wrote: > hey i have just started making a app using python and just gt a > problem.. > > i have two list > a=["x","z"] > b=[1,2] > > i want to make a directory like this > c={"x":1,"z":2} The word you want is "dictionary" or "dict", not directory.

Re: [Tutor] sound libraries?

2010-07-22 Thread Luke Paireepinart
You can access openal through either pyglet or pygame I believe, and definitely thru panda3d. That would allow you to have true 3d sound positioning and I believe openal can automatically Doppler too, not sure though. Let us know what you go with or if you have questions. Sent from my iPhone O

Re: [Tutor] how i can change two lists into one directory

2010-07-22 Thread Luke Paireepinart
Hey quit spamming the list please. Sent from my iPhone On Jul 22, 2010, at 7:08 PM, Alex Hall wrote: > On 7/22/10, ANKUR AGGARWAL wrote: >> hey i have just started making a app using python and just gt a problem.. >> >> i have two list >> a=["x","z"] >> b=[1,2] >> >> i want to make a direct

Re: [Tutor] sound libraries?

2010-07-22 Thread Alex Hall
On 7/22/10, Luke Paireepinart wrote: > You can access openal through either pyglet or pygame I believe, and > definitely thru panda3d. That would allow you to have true 3d sound > positioning and I believe openal can automatically Doppler too, not sure > though. Let us know what you go with or if

Re: [Tutor] how i can change two lists into one directory

2010-07-22 Thread Robert
looks like this guy figured out how to send email in a loop ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor