Re: Beginner Question: 3D Models

2013-06-19 Thread Christian Gollwitzer
Am 19.06.13 04:47, schrieb andrewblun...@gmail.com: However, for one part of the program I'd like to be able to create a 3D model based on the user input. The model would be very basic consisting of a number of lines and objects. We have 3D models of each component within our CAD system so it

Re: python-django for dynamic web survey?

2013-06-19 Thread chip9munk
On 19-Jun-13 7:04 AM, Jason Friedman wrote: How random do the questions need to be? Is a handful or two different combinations sufficient? Can you manually create these different surveys using, for example, surveymonkey, and distribute them? There are a lot possible combinations and

Re: Don't feed the troll...

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 1:49 PM, ru...@yahoo.com wrote: On 06/18/2013 01:21 AM, Chris Angelico wrote: On Tue, Jun 18, 2013 at 2:39 PM, alex23 wuwe...@gmail.com wrote: tl;dr Stop acting like a troll and we'll stop perceiving you as such. This being Python-list, we duck-type. You don't have to

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel da...@davea.name wrote: Names are *one of* the ways we specify which objects are to be used. (We can also specify objects via an container and a subscript or slice, or via an attribute of another object. And probably another way or two.) But you

Re: Don't feed the troll...

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 17:07:28 +1000, Chris Angelico wrote: On the contrary, stereotyping is You are-a quality, therefore you will behave in manner. I don't think that's how stereotypes usually work. He wears a turban, therefore he's an Arab terrorist. He's wearing black, has pale skin,

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Wolfgang Maier
andrea crotti andrea.crotti.0 at gmail.com writes: 2013/6/18 Terry Reedy tjreedy at udel.edu On 6/18/2013 5:47 AM, andrea crotti wrote: Using a CouchDB server we have a different database object potentially for every request. We already set that db in the request object to make it easy to

Writing Extensions for Python 3 in C

2013-06-19 Thread Aditya Avinash
Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32, nvcc). Please help me. PS: Don't point me to Python Documentation. It is

Re: Don't feed the troll...

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 5:27 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 19 Jun 2013 17:07:28 +1000, Chris Angelico wrote: On the contrary, stereotyping is You are-a quality, therefore you will behave in manner. I don't think that's how stereotypes usually work.

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Νίκος
Στις 19/6/2013 8:08 πμ, ο/η Tim Roberts έγραψε: Nick the Gr33k supp...@superhost.gr wrote: On 16/6/2013 4:55 ??, Tim Roberts wrote: Nick the Gr33k supp...@superhost.gr wrote: Because Python lets you use arbitrary values in a Boolean context, the net result is exactly the same. What is an

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Wolfgang Maier
Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de writes: andrea crotti andrea.crotti.0 at gmail.com writes: 2013/6/18 Terry Reedy tjreedy at udel.edu Decorators are only worthwhile if used repeatedly. What you specified can easily be written, for instance, as def

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Dave Angel
On 06/19/2013 03:14 AM, Chris Angelico wrote: On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel da...@davea.name wrote: Names are *one of* the ways we specify which objects are to be used. (We can also specify objects via an container and a subscript or slice, or via an attribute of another object.

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 6:06 PM, Dave Angel da...@davea.name wrote: On 06/19/2013 03:14 AM, Chris Angelico wrote: On Wed, Jun 19, 2013 at 3:42 PM, Dave Angel da...@davea.name wrote: Names are *one of* the ways we specify which objects are to be used. (We can also specify objects via an

Re: Why is regex so slow?

2013-06-19 Thread Johannes Bauer
On 18.06.2013 22:30, Grant Edwards wrote: All the O() tells you is the general shape of the line. Nitpick: it only gives an *upper bound* for the complexity. Any function that is within O(n) is also within O(n^2). Usually when people say O() they actually mean capital Thetha (which is the

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 18:21:40 +1000, Chris Angelico wrote: You can't reference an object without somewhere having either a name or a literal to start it off. True, but not necessarily a name bound to the object you are thinking of: some_function() gives you an object, but it's not a literal,

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread Robin Becker
On 18/06/2013 11:24, Aditya Avinash wrote: Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32, nvcc). Please help me. PS:

Re: A certainl part of an if() structure never gets executed.

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 6:55 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 19 Jun 2013 18:21:40 +1000, Chris Angelico wrote: You can't reference an object without somewhere having either a name or a literal to start it off. True, but not necessarily a name bound to

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread Ulrich Eckhardt
Am 18.06.2013 12:24, schrieb Aditya Avinash: Hi. This is the last place where I want to ask a question. You are probably not saying what you mean here. The meaning of your sentence is more like Here is the forum that I dislike more than any other forum, but still I have to ask a question

Re: Don't feed the troll...

2013-06-19 Thread Antoon Pardon
Op 19-06-13 05:46, ru...@yahoo.com schreef: On 06/18/2013 02:22 AM, Antoon Pardon wrote: Op 17-06-13 19:56, ru...@yahoo.com schreef: I was using the photodetector/light system as a emotion-free analog of the troll/troll-feeders positive feedback system for which you claimed it was clearly

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 12:50:52 AM UTC-2:30, Steven D'Aprano wrote: On Tue, 18 Jun 2013 19:47:34 -0700, andrewblundon wrote: However, for one part of the program I'd like to be able to create a 3D model based on the user input. The model would be very basic consisting of a

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 3:30:41 AM UTC-2:30, Christian Gollwitzer wrote: Am 19.06.13 04:47, schrieb andrewblun...@gmail.com: However, for one part of the program I'd like to be able to create a 3D model based on the user input. The model would be very basic consisting of a number

Re: Beginner Question: 3D Models

2013-06-19 Thread Oscar Benjamin
On 19 June 2013 12:13, andrewblun...@gmail.com wrote: I've seen some information on Blender. Is it possible to have the entire program contained within a single exe (or exe and some other files) so that it can be passed around and used by others without having to install blender? I don't

Re: Beginner Question: 3D Models

2013-06-19 Thread Fábio Santos
On 19 Jun 2013 12:56, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 19 June 2013 12:13, andrewblun...@gmail.com wrote: I've seen some information on Blender. Is it possible to have the entire program contained within a single exe (or exe and some other files) so that it can be passed

Re: weird behavior. bug perhaps?

2013-06-19 Thread rusi
On Jun 18, 8:31 pm, zoom z...@yahoo.com wrote: yes, that's the hing. thanks a lot FYI this happens because   shape(mean(m,1)) (4, 1)   shape(mean(array(m),1)) (4,) thanks again And thank you for the 'Thank you' !! Given the noob-questions the list is currently dealing with, your

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
As I've said, I'm a fairly novice. I've compiled simple VB programs previously into exe files for use but nothing with pyton and nothing of this complexity. This application could potentially be distributed to hundreds of people throughout the world as our company is worldwide. Asking these

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
This sounds similar to what I might want. So you know of any online tutorials for this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is regex so slow?

2013-06-19 Thread Duncan Booth
Roy Smith r...@panix.com wrote: Except that the complexity in regexes is compiling the pattern down to a FSM. Once you've got the FSM built, the inner loop should be pretty quick. In C, the inner loop for executing a FSM should be something like: for(char* p = input; p; ++p) {

Re: another language with classes?

2013-06-19 Thread Ivan Shmakov
R Kantas r...@online.de writes: [Cross-posting to news:comp.lang.python, news:comp.lang.scheme, looking for more first-hand experience with these. Sadly, there's no news:comp.lang.go as of yet.] I came into first contact with objects and classes programming under

Re: Beginner Question: 3D Models

2013-06-19 Thread Oscar Benjamin
On 19 June 2013 14:14, andrewblun...@gmail.com wrote: This sounds similar to what I might want. So you know of any online tutorials for this? It's hard to tell what you're referring to since you haven't included any quoted context in your message (like I have above). I'll assume you're

A Beginner's Doubt

2013-06-19 Thread augustofec
Hello! This is my first post in this group and the reason why I came across here is that, despite my complete lack of knowledge in the programming area, I received an order from my teacher to develop a visually interactive program, until 20th July, so we can participate in a kind of contest.

Re: Beginner Question: 3D Models

2013-06-19 Thread Fábio Santos
On Wed, Jun 19, 2013 at 2:57 PM, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 19 June 2013 14:14, andrewblun...@gmail.com wrote: This sounds similar to what I might want. So you know of any online tutorials for this? It's hard to tell what you're referring to since you haven't

Re: Beginner Question: 3D Models

2013-06-19 Thread Rick Johnson
On Tuesday, June 18, 2013 9:47:34 PM UTC-5, andrew...@gmail.com wrote: I'm looking at developing a program for work that can be distributed to others (i.e. and exe file). The application would open various dialogue boxes and ask the user for input and eventually perform mathematical

Re: A Beginner's Doubt

2013-06-19 Thread Chris Angelico
On Wed, Jun 19, 2013 at 11:58 PM, augusto...@gmail.com wrote: My goal is to learn and program it by myself, as good as the time allows me. That said, what I seek here is advice from people who definitively have more experience than me on topics like: is it possible to develop this kind of

Re: A Beginner's Doubt

2013-06-19 Thread Neil Cerutti
On 2013-06-19, augusto...@gmail.com augusto...@gmail.com wrote: This is my first post in this group and the reason why I came across here is that, despite my complete lack of knowledge in the programming area, I received an order from my teacher to develop a visually interactive program, until

Re: A Beginner's Doubt

2013-06-19 Thread Rick Johnson
On Wednesday, June 19, 2013 8:58:19 AM UTC-5, augus...@gmail.com wrote: This is my first post in this group and the reason why I came across here is that, despite my complete lack of knowledge in the programming area, I received an order from my teacher to develop a visually interactive

Question about using dictionaries and QTableWidget

2013-06-19 Thread Sara Lochtie
I have a table that gets new entries added to it in real time. Each entry has an ID and I am storing the ID in a dictionary. What I am trying to do is to have each ID in its own row and update within that row instead of adding a new one each time. What I've done is store the ID in a dictionary

How much memory does Django consume compared to Rails?

2013-06-19 Thread Jason Hsu
I have deployed two Ruby on Rails sites on WebFaction, and Passenger Rack takes up around 60 MB of memory apiece. I was planning on replacing my Drupal web sites with Rails, but I'm now considering replacing these Drupal sites with Django. Given that the baseline memory consumption for a

Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread russ . pobox
I was mucking around, trying to code a prime sieve in one line. I don't know about filters and bit shifting and stuff like that but I thought I could do it with builtins, albeit a very long one line. This is the part of my stupid trick in question that got me wondering about a key parameter for

Re: Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:14 AM, russ.po...@gmail.com wrote: And the following, although the same thing really as all(xrange(10**9)), is not as instant and will take even longer than the above. all(map(lambda x: bool(x), xrange(10**9))) However if all by some chance (I don't know how this

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 11:47:36 AM UTC-2:30, Rick Johnson wrote: On Tuesday, June 18, 2013 9:47:34 PM UTC-5, andrew...@gmail.com wrote: I'm looking at developing a program for work that can be distributed to others (i.e. and exe file). The application would open various

Re: Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:32 AM, russ.po...@gmail.com wrote: All you need is the iterator version of map(). In Python 3, that's the normal map(); in Python 2, use this: from itertools import imap all(imap(lambda x: bool(x), xrange(10**9))) False It's roughly instant, like you would expect.

Re: Idea for key parameter in all() builting, would it be feasible?

2013-06-19 Thread russ . pobox
All you need is the iterator version of map(). In Python 3, that's the normal map(); in Python 2, use this: from itertools import imap all(imap(lambda x: bool(x), xrange(10**9))) False It's roughly instant, like you would expect. ChrisA This probably isn't the way to post a reply on your own

Re: A Beginner's Doubt

2013-06-19 Thread Joel Goldstick
On Wed, Jun 19, 2013 at 11:31 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Wednesday, June 19, 2013 8:58:19 AM UTC-5, augus...@gmail.com wrote: This is my first post in this group and the reason why I came across here is that, despite my complete lack of knowledge in the

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread Terry Reedy
On 6/18/2013 6:24 AM, Aditya Avinash wrote: Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32, nvcc). Please help me. I

Re: decorator to fetch arguments from global objects

2013-06-19 Thread Terry Reedy
On 6/19/2013 4:03 AM, Wolfgang Maier wrote: Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de writes: andrea crotti andrea.crotti.0 at gmail.com writes: 2013/6/18 Terry Reedy tjreedy at udel.edu Decorators are only worthwhile if used repeatedly. What you specified can easily be

RE: How much memory does Django consume compared to Rails?

2013-06-19 Thread Andriy Kornatskyy
A memory consumption by python web frameworks is relatively low. A `typical` web site developed using wheezy.web (a lightweight full-featured web framework) consumes about 14-23 Mb per worker on x86 platform. The django is not far from there. A minimal django hello world application hosted in

Re: A Beginner's Doubt

2013-06-19 Thread Joshua Landau
Please be aware, Augusto, that Rick is known to be a bit... OTT. Don't take him too seriously (but he's not an idiot either). On 19 June 2013 14:58, augusto...@gmail.com wrote: Hello! This is my first post in this group and the reason why I came across here is that, despite my complete lack

Re: A Beginner's Doubt

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:53 AM, Joshua Landau joshua.landau...@gmail.com wrote: Now, as I'm probably the most new programmer here I'll point out that I don't agree with Chris when he says that: One way or another, you will probably spend the next week writing code you throw away; if you try

Re: Timsort in Cpython

2013-06-19 Thread sean . westfall
On Sunday, June 16, 2013 1:16:02 PM UTC-7, Dennis Lee Bieber wrote: On Sun, 16 Jun 2013 09:15:11 -0700 (PDT), alphons...@gmail.com declaimed the following: sorry about that. I'm new to google groups. I'm trying to make sense of python's implementation of timsort through cpython:

Re: Writing Extensions for Python 3 in C

2013-06-19 Thread rusi
On Jun 18, 3:24 pm, Aditya Avinash adityaavinash...@gmail.com wrote: Hi. This is the last place where I want to ask a question. I have searched for lots of tutorials and documentation on the web but, didn't find a decent one to develop extensions for Python 3 using a custom compiler (mingw32,

Re: Timsort in Cpython

2013-06-19 Thread sean . westfall
On Sunday, June 16, 2013 1:33:17 PM UTC-7, Ian wrote: On Sat, Jun 15, 2013 at 10:05 PM, alphons...@gmail.com wrote: Yes I've read it. Very interesting read. There are other resources too online that make it very clear, for instance the wikipedia articles is pretty good. Though,

Re: A Beginner's Doubt

2013-06-19 Thread rusi
On Jun 19, 9:53 pm, Joshua Landau joshua.landau...@gmail.com wrote: Please be aware, Augusto, that Rick is known to be a bit... OTT. Don't take him too seriously (but he's not an idiot either). On 19 June 2013 14:58,  augusto...@gmail.com wrote: Hello! This is my first post in this group

Re: A Beginner's Doubt

2013-06-19 Thread Terry Reedy
On 6/19/2013 9:58 AM, augusto...@gmail.com wrote: Hello! This is my first post in this group and the reason why I came across here is that, despite my complete lack of knowledge in the programming area, I received an order from my teacher to develop a visually interactive program, until 20th

Re: Timsort in Cpython

2013-06-19 Thread Ian Kelly
On Wed, Jun 19, 2013 at 11:18 AM, sean.westf...@gmail.com wrote: The second argument takes the tuple which determines which varialble(key) to use the comparator on. And the third determines whether to return the list in ascending or descending order. That's not exactly correct. The

Re: A Beginner's Doubt

2013-06-19 Thread Joshua Landau
On 19 June 2013 17:39, Joel Goldstick joel.goldst...@gmail.com wrote: What is the subject that this teacher of yours teaches? Do you know anyone who has every done any programming? Why python? One of those questions is too easy :P. But, no, I'd actually point out that Python might *not* be

Re: Don't feed the troll...

2013-06-19 Thread Ian Kelly
On Wed, Jun 19, 2013 at 4:57 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: I don't remember making such a claim. What I do remember is you among others claiming that the problem was not (so much) the troll (Nikos) but the others. Count me among those who feel this way. And your last

Default Value

2013-06-19 Thread Ahmed Abdulshafy
I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me Important warning: The default value is evaluated only once. This makes a difference when the default is a mutable object such as a list, dictionary, or instances of most classes def

Re: A Beginner's Doubt

2013-06-19 Thread Rick Johnson
On Wednesday, June 19, 2013 12:57:06 PM UTC-5, Terry Reedy wrote: Terry (speaking to OP) said: Do you literally mean a full screen *window*, like a browser maximized,

Re: Default Value

2013-06-19 Thread Jussi Piitulainen
Ahmed Abdulshafy abdulsh...@gmail.com writes: I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me Important warning: The default value is evaluated only once. This makes a difference when the default is a mutable object such as a

Re: Default Value

2013-06-19 Thread Rick Johnson
On Wednesday, June 19, 2013 2:17:35 PM UTC-5, Ahmed Abdulshafy wrote: I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me Important warning: The default value is evaluated only once. This makes a difference when the default is a

Re: Why is regex so slow?

2013-06-19 Thread Roy Smith
On Wednesday, June 19, 2013 9:21:43 AM UTC-4, Duncan Booth wrote: I'd just like to point out that your simple loop is looking at every character of the input string. The simple 'ENQ' not in line test can look at the third character of the string and if it's none of 'E', 'N' or 'Q' skip to

Re: Default Value

2013-06-19 Thread Gary Herron
On 06/19/2013 12:17 PM, Ahmed Abdulshafy wrote: I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me Important warning: The default value is evaluated only once. This makes a difference when the default is a mutable object such as a

python game

2013-06-19 Thread jacksonkemp1234
I made this game where you move a player over bears, but the bears keep loading over the plaeyer making it hard to see it, also when i move down the player goes down to the right here is my code: import pygame, sys, random from pygame.locals import * from threading import Timer #set up pygame

Re: python game

2013-06-19 Thread Denis McMahon
On Wed, 19 Jun 2013 13:18:49 -0700, jacksonkemp1234 wrote: windowSurface.blit(playerImage, player) for bear in bears: windowSurface.blit(bearImage, bear) Try changing this to draw the bears first, then the player. -- Denis McMahon, denismfmcma...@gmail.com --

Re: Newbie: The philosophy behind list indexes

2013-06-19 Thread ian . l . cameron
Thanks everyone for taking the time to offer some very insightful replies. Learning a new language is so much more fun with a group of friendly and helpful people around! -- http://mail.python.org/mailman/listinfo/python-list

Re: python game

2013-06-19 Thread Denis McMahon
On Wed, 19 Jun 2013 13:18:49 -0700, jacksonkemp1234 wrote: if moveDown and player.right WINDOW_WIDTH: player.right += MOVE_SPEED Should this be moveRight instead of moveDown? -- Denis McMahon, denismfmcma...@gmail.com --

Re: Don't feed the troll...

2013-06-19 Thread rurpy
On 06/19/2013 04:57 AM, Antoon Pardon wrote: Op 19-06-13 05:46, ru...@yahoo.com schreef: On 06/18/2013 02:22 AM, Antoon Pardon wrote: Op 17-06-13 19:56, ru...@yahoo.com schreef: I was using the photodetector/light system as a emotion-free analog of the troll/troll-feeders positive feedback

Problem with the for loop syntax

2013-06-19 Thread arturo balbuena
Hello guys... I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble with this blank space. I would be greatful if you help me. :) Here's my code: http://snipplr.com/view/71581/hangman/ When I run the code it says: Invalid Syntax and this is the error:

Re: Problem with the for loop syntax

2013-06-19 Thread Dave Angel
On 06/19/2013 05:14 PM, arturo balbuena wrote: Hello guys... I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble with this blank space. I would be greatful if you help me. :) Here's my code: http://snipplr.com/view/71581/hangman/ When I run the code it says: Invalid

Re: Problem with the for loop syntax

2013-06-19 Thread John Gordon
In 18f427ef-7a9a-413d-a824-65c9df430...@googlegroups.com arturo balbuena a7xrturo...@gmail.com writes: Hello guys... I=B4m a begginer in Python, I'm doing a Hangman game, but I'm having troubl= e with this blank space. I would be greatful if you help me. :) Here's my code:

Re: Problem with the for loop syntax

2013-06-19 Thread Ian Kelly
On Wed, Jun 19, 2013 at 3:14 PM, arturo balbuena a7xrturo...@gmail.com wrote: Hello guys... I´m a begginer in Python, I'm doing a Hangman game, but I'm having trouble with this blank space. I would be greatful if you help me. :) Here's my code: http://snipplr.com/view/71581/hangman/ When

Re: Problem with the for loop syntax

2013-06-19 Thread Arturo B
Mmmm Ok guys, thank you I'm really sure that isn't a weird character, it is a space. My Python version is 3.3.2, I've runed this code in Python 2.7.5, but it stills the same. I've done what you said but it doesn't work. Please Check it again here is better explained:

Popen in Python3

2013-06-19 Thread Joseph L. Casale
I am trying to invoke a binary that requires dll's in two places all of which are included in the path env variable in windows. When running this binary with popen it can not find either, passing env=os.environ to open made no difference. Anyone know what might cause this or how to work around

Re: python game

2013-06-19 Thread Joshua Landau
This is prob'ly the freakiest thing I've ever run... Anyhoo, I recommend that when you post slabs of code to a mailing list you at least make it runnable for us. We don't have the images. I fixed it by doing: | playerImage = pygame.Surface((40, 40)) | bearImage = pygame.Surface((64, 64)) | |

Re: Problem with the for loop syntax

2013-06-19 Thread Joshua Landau
On 19 June 2013 23:53, Arturo B a7xrturo...@gmail.com wrote: Mmmm Ok guys, thank you I'm really sure that isn't a weird character, it is a space. My Python version is 3.3.2, I've runed this code in Python 2.7.5, but it stills the same. I've done what you said but it doesn't work.

Re: Problem with the for loop syntax

2013-06-19 Thread Arturo B
Sorry, I'm new in here So, if you want to see the complete code I've fixed it: http://www.smipple.net/snippet/a7xrturo/Hangman%21%20%3A%29 And here is the part of code that doesn't work: #The error is marked in the whitespace between letter and in def displayBoard(HANGMANPICS, missedLetters,

Re: Don't feed the troll...

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 12:40:15 -0600, Ian Kelly wrote: On the other hand, the flamers responding to the trolls are regular contributers to the list who presumably do care about keeping the list courteous, respectful, welcoming and enjoyable to participate in. Toward that end, I do not think it

Re: Problem with the for loop syntax

2013-06-19 Thread Arturo B
Fixed, the problem was in HANGMANPICS I didn't open the brackets. Thank you guys :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with the for loop syntax

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 11:02 AM, Arturo B a7xrturo...@gmail.com wrote: Fixed, the problem was in HANGMANPICS I didn't open the brackets. Thank you guys :) General debugging tip: Syntax errors are sometimes discovered quite some way below the actual cause. The easiest way to figure out

Re: Default Value

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 12:17:35 -0700, Ahmed Abdulshafy wrote: I'm reading the Python.org tutorial right now, and I found this part rather strange and incomprehensible to me Important warning: The default value is evaluated only once. This makes a difference when the default is a mutable

Re: A few questiosn about encoding

2013-06-19 Thread Rick Johnson
On Thursday, June 13, 2013 2:11:08 AM UTC-5, Steven D'Aprano wrote: Gah! That's twice I've screwed that up. Sorry about that! Yeah, and your difficulty explaining the Unicode implementation reminds me of a passage from the Python zen: If the implementation is hard to explain, it's a bad

Re: python game

2013-06-19 Thread Jackson Kemp
Thankyou this was very helpful -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with the for loop syntax

2013-06-19 Thread Cameron Simpson
On 20Jun2013 11:09, Chris Angelico ros...@gmail.com wrote: | On Thu, Jun 20, 2013 at 11:02 AM, Arturo B a7xrturo...@gmail.com wrote: | Fixed, the problem was in | HANGMANPICS | | I didn't open the brackets. | Thank you guys :) | | General debugging tip: Syntax errors are sometimes discovered

Re: Popen in Python3

2013-06-19 Thread Nobody
On Wed, 19 Jun 2013 23:03:05 +, Joseph L. Casale wrote: I am trying to invoke a binary that requires dll's in two places all of which are included in the path env variable in windows. When running this binary with popen it can not find either, passing env=os.environ to open made no

About GIL Questions!

2013-06-19 Thread Thanatos xiao
Hey everyone! Recently I see the python source code, but i still not understand about gil. first, why single core quicker multi-core ? who can explan this in bottom layery ? second, what the different between the mult-core and the single core to schecule threads? thanks! Forgive me bad english!

Re: About GIL Questions!

2013-06-19 Thread Chris Angelico
On Thu, Jun 20, 2013 at 2:13 PM, Thanatos xiao yanxiaopei...@gmail.com wrote: Hey everyone! Recently I see the python source code, but i still not understand about gil. first, why single core quicker multi-core ? who can explan this in bottom layery ? second, what the different between the

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-19 Thread Michael Torrie
On 06/18/2013 03:51 AM, Νίκος wrote: Στις 18/6/2013 12:05 μμ, ο/η Steven D'Aprano έγραψε: Names are *always* linked to objects, not to other names. a = [] b = a # Now a and b refer to the same list a = {} # Now a refers to a dict, and b refers to the same list as before I see, thank you

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-19 Thread Michael Torrie
On 06/19/2013 11:16 PM, Michael Torrie wrote: It turns out that lists, hashes (dicts), and classes can pretty much do anything with having to much about with C-style pointers and such. Oh wow. Parse error. should read, pretty much do anything without having to muck about with C-style pointers

Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.]

2013-06-19 Thread Steven D'Aprano
On Wed, 19 Jun 2013 23:16:51 -0600, Michael Torrie wrote: The real power and expressivity of Python comes from embracing the abstractions that Python provides to your advantage. There's a certain elegance and beauty that comes from such things, which I believe really comes from the elegance

[issue18261] Confusing description in Minimal DOM implementation

2013-06-19 Thread Ned Deily
Ned Deily added the comment: No, the intent really is to suggest using the ElementTree module rather than either minidom or any of the other XML modules in the standard library. Many people find the ElementTree API easier to understand and to use. -- nosy: +ned.deily resolution: -

[issue18262] ZipInfo.external_attr are not documented

2013-06-19 Thread anatoly techtonik
New submission from anatoly techtonik: zipfile doesn't restore file attributes when extracting. Documentation should at least contain example how to do this manually, because the ony way to do this - through ZipInfo.external_attr is too cryptic. -- assignee: docs@python components:

[issue18078] threading.Condition to allow notify on a specific waiter

2013-06-19 Thread João Bernardo
João Bernardo added the comment: (ping) It would be nice to have the feature on 3.4. What changes should I do to the patch? Is anyone else working on that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078

[issue17961] Use enum names as values in enum.Enum() functional API

2013-06-19 Thread Ethan Furman
Ethan Furman added the comment: Enum members have two pieces of easily accessible information: `name` and `value`. The name is taken from the attribute the value is assigned to; the value, obviously, is the value assigned. The question, then, is what should happen when the function syntax is

[issue18042] Provide enum.unique class decorator

2013-06-19 Thread Ethan Furman
Ethan Furman added the comment: I haven't seen any discouraging words regarding the decorator. If no one has any compelling reasons why it shouldn't be added, I'll craft a version and put it in (only real difference with Nick's would be catching all the duplicates at once instead of one at a

[issue18262] ZipInfo.external_attr are not documented

2013-06-19 Thread anatoly techtonik
anatoly techtonik added the comment: Here is the doc - http://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zip/6297838#6297838 -- ___ Python tracker rep...@bugs.python.org

[issue18202] Minor fixes for test_coding

2013-06-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 410ea970866e by Serhiy Storchaka in branch '3.3': Issue #18202: Fix minor bugs and cleanup test_coding.py. http://hg.python.org/cpython/rev/410ea970866e New changeset 959f4ce4d590 by Serhiy Storchaka in branch 'default': Issue #18202: Fix minor

[issue18202] Minor fixes for test_coding

2013-06-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not all other changes are cleanups and enhancements. Some of them also fix minor bugs. Thank you for review Victor. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue1159] os.getenv() not updated after external module uses C putenv()

2013-06-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: FYI, PyPy recently got bitten by this: https://bugs.pypy.org/issue1518 A posix.libc_getenv() function could be a solution. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering

2013-06-19 Thread Edward Catmur
Edward Catmur added the comment: Łukasz, thanks. When the most-derived class virtual-inherits two related ABCs U, V: object / | \ A W V | .` .` B` U` | .` C` The secondary `for` loop is necessary to ensure U and V are ordered correctly.

[issue18262] ZipInfo.external_attr are not documented

2013-06-19 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'd be +1 on extending the zipfile API in 3.4 (with a documentation update in older releases as suggested by anatoly): * Add a method or property to ZipInfo for (un)packing the external_attr field * Add an keyword argument to Zipfile.extract and

[issue18262] ZipInfo.external_attr are not documented

2013-06-19 Thread Ronald Oussoren
Ronald Oussoren added the comment: See also #15795 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18262 ___ ___ Python-bugs-list mailing list

  1   2   >